RESTful API Processing
143
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
HTTP Server
Table 9-4. IP Configurations (continued)
Name (code)
Description
Example
IPv4 mode (__SL_P_N.D)
IP acquisition mode for IPv4 address.
Options are: LLA DHCP, DHCP, and
Static
(__SL_P_N.D=DHCP)
IPv6 Local mode (__SL_P_I.S)
IP acquisition mode for local IPv6 local
address. Options are: Stateless, Static,
and Statefull
(__SL_P_I.S=Disable, __SL_P_I.S
=Stateless, __SL_P_I.S =Static,
__SL_P_I.S =Statefull)
IPv6 Local address (__SL_P_I.L)
Set the IPv6 link-local address (if local
mode is set to Static)
(__SL_P_I.S=fe80::ccaf:9519:0002:a5fd)
IPv6 Global mode (__SL_P_I.G)
IP acquisition mode for global IPv6 local
address. Options are: Stateless, Static,
and Statefull
(__SL_P_I.G=Disable, __SL_P_I.G
=Stateless, __SL_P_I.G =Static,
__SL_P_I.G =Statefull)
IPv6 Global address (__SL_P_I.B)
Set the IPv6 global address (if global
mode is set to Static)
(__SL_P_I.B==2001:0db8:3c4d:0015:000
0:0000:1a2f:1a2b)
IPv6 DNS address (__SL_P_I.K)
Set IPv6 primary DNS server
(__SL_P_I.K= 2001:4860:4860::8888)
For example, the following request sets the AP mode IP address to 10.10.10.10 without DHCP (Static):
POST /api/1/netapp/netcfg_ap HTTP/1.1
Host: mysimplelink.net
Content-Type: application/x-www-form-urlencoded
__SL_P_N.P=10.10.10.10&__SL_P_N.D=Static
9.4.3 URN Configuration
The device URN (uniform resource name) can be set by posting to
/api/1/netapp/set_urn
the parameters
listed in
. The maximum size of the URN is 33 characters (not including the null terminator).
Table 9-5. URN Configurations
Name (code)
Description
Example
Device URN (__SL_P_S.B)
Must not exceed 33 characters.
__SL_P_S.B=mysimplelink1.net
For example, the following request changes the device URN to my-urn:
POST /api/1/netapp/set_urn HTTP/1.1
Host: mysimplelink.net
Content-Type: application/x-www-form-urlencoded
__SL_P_S.B=my-urn
9.4.4 WLAN Profiles
WLAN connection profiles can be added by posting to either
/api/1/wlan/profile_add
or
/api/1/wlan/profile_p2p
the parameters listed in
(all are case sensitive).
Table 9-6. WLAN Profiles
Name (code)
Description
Example
SSID (__SL_P_P.A)
The SSID of the desired AP. Must not
exceed 32 characters.
__SL_P_P.A=TargetSSID
Security (__SL_P_P.B)
Security type for the connection.
0-Open, 1-WEP, 2-WPA1, 3-WPA2, 6-
WPS/Push-button, 7-WPS/Pin Keypad, 8-
WPS/Pin Display.
__SL_P_P.B=3
Security key (__SL_P_P.C)
Security key or PIN code. Must not
exceed 64 characters.
__SL_P_P.C=MySecurePassword
Priority (__SL_P_P.D)
Priority of the profile. Must be from 0 to
15.
__SL_P_P.D=1