leaps_inet_cfg_set
Sets the local network interface mode: DHCP or static IP, and selects Ethernet or WiFi as the active interface. 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 (flags): Bit 0 = is_static, Bit 1 = use_wifi, Bits[7:2] = reserved
- is_static: IP mode. 0 = DHCP (addr/netmask/gw ignored), 1 = static IP
- use_wifi: Interface. 0 = Ethernet, 1 = WiFi
Byte 1–3 (reserved): 0x00 0x00 0x00
Byte 4–7 (addr): IPv4 address, little-endian uint32
Byte 8–11 (netmask): IPv4 netmask, little-endian uint32
Byte 12–15 (gw): IPv4 gateway, little-endian uint32
|
||
0x98 |
0x10 |
01 00 00 00 0A 01 A8 C0 00 FF FF FF 01 01 A8 C0 |
In this example:
Static IP is 192.168.1.10/24
Gateway is 192.168.1.1
via Ethernet (is_static=1, use_wifi=0)
Type 0x98 (152) means command leaps_inet_cfg_set
TLV response |
||
|---|---|---|
Type |
Length |
Value |
0x40 |
0x01 |
0x00 |
Type 0x40 means status code