leaps_wifi_cfg_set

Sets the WiFi credentials (SSID and passphrase) and regulatory region. The configuration is stored in non-volatile memory. A system restart is required for the change to take effect.


Example

TLV Request

Type

Length

Value

Byte 0 (region): WiFi region code
Byte 1–3 (reserved): 0x00 0x00 0x00
Byte 4 (ssid_len): number of SSID bytes that follow
Byte 5..5+ssid_len-1 (ssid): ASCII, no null
Byte 5+ssid_len (psk_len): number of PSK bytes that follow
Byte (5+ssid_len+1)..end (psk): ASCII, no null

0x9C

0x1C

00 00 00 00 09 4D 79 4E 65 74 77 6F 72 6B 0D 4D 79 50 61 73 73 77 6F 72 64 31 32 33

In this example:

  • region 0x00

  • SSID “MyNetwork” (9 bytes)

  • PSK “MyPassword123” (13 bytes)

Type 0x9C (156) means command leaps_wifi_cfg_set

TLV response

Type

Length

Value

0x40

0x01

0x00

Type 0x40 means status code