leaps_wifi_cfg_set

This call is available only on the ethernet gateway. It sets the WiFi credentials (SSID and passphrase) and regulatory region. The configuration is stored in non-volatile memory. Call leaps_reset to apply changes. See also the shell command wifi.


Input
  • region: ‘0’ | ‘1’ | ‘2’ (WiFi regulatory region code)

    • ‘0’: Europe

    • ‘1’: North America

    • ‘2’: Asia

  • ssid: ASCII string (SSID, max 31 characters on wire, no null terminator)

  • psk: ASCII string (WPA2 passphrase, 8–31 characters on wire, no null terminator)

Output

Example

Region 0, SSID MyNetwork (9 bytes), PSK MyPassword123 (13 bytes):

TLV Request

Type

Length

Value

byte 0: region
bytes 1–3: reserved (0x00 0x00 0x00)
byte 4: ssid_len
bytes 5..(5+ssid_len-1): ssid (ASCII, no null)
byte 5+ssid_len: psk_len
(5+ssid_len+1)..end: psk (ASCII, no null)

0x9C

0x1C

0x00 0x00 0x00 0x00 0x09 0x4D 0x79 0x4E 0x65 0x74 0x77 0x6F 0x72 0x6B 0x0D 0x4D 0x79 0x50 0x61 0x73 0x73 0x77 0x6F 0x72 0x64 0x31 0x32 0x33

In this example:

  • region 0x00

  • SSID “MyNetwork” (9 bytes)

  • PSK “MyPassword123” (13 bytes)

Type 0x9C (156 dec) means command leaps_wifi_cfg_set

TLV response

Type

Length

Value

0x40

0x01

0x00

Type 0x40 means status code