RESTful API Processing
146
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
HTTP Server
Table 9-12. AP Control
Name (code)
Description
Example
Blacklist Filter Enable (__SL_P_C.M)
Enables the station MAC address
blacklist filter:
0-Filter disabled
1-Filter enabled
__SL_P_C.M=1
Add station to the blacklist filter
(__SL_P_CRL)
Adds the station of the specified index to
the blacklist filter (if filter is enabled it will
not be allowed to connect again).
__SL_P_CRL=1
Remove station from the blacklist filter
(__SL_P_CRS)
Removes the station of the specified index
from the blacklist filter (station can
connect).
(__SL_P_CRS=1)
Remove station from the blacklist filter
(__SL_P_C.B)
Sets the maximum number of
simultaneousl -connected stations. Must
be smaller than 5.
(__SL_P_C.B=3)
For example, the following request enables the filter and adds a station at index 1, preventing it from
connecting to the device:
POST /api/1/wlan/en_ap_scan/ap_aclist HTTP/1.1
Host: mysimplelink.net
Content-Type: application/x-www-form-urlencoded
__SL_P_C.M=1&__SL_P_CRL=1
AP black list information can be accessed using the __SL_G_SR1 to __SL_G_CL8 tokens (see
).
9.4.10 Date and Time
The device time and date can be set by posting to
/api/1/wlan/en_ap_scan/set_time
the parameters listed
in
.
Table 9-13. Date and Time
Name (code)
Description
Example
Set date and time (__SL_P_S.J)
This parameter sets the time and date
according to the following format:
yyyy,mm,dd,hh,mm,ss
(year,month,day,hours,minutes,seconds)
Each number must not contain more than
four characters.
__SL_P_S.J=2016,01,01,12,45,30
For example, the following request sets the date to 30/5/2016 and the time to 13:45:00:
POST /api/1/wlan/en_ap_scan/set_time HTTP/1.1
Host: mysimplelink.net
Content-Type: application/x-www-form-urlencoded
__SL_P_S.J=2016,05,30,13,45,00
9.5
Device Parameter Querying Through HTTP (Device Tokens)
The SimpleLink HTTP server supports querying various device parameters through a mechanism called
device tokens. These tokens can be requested directly through an HTTP GET request, or embedded
inside any serveable resource where they are replaced by their value when it is served. The token name
has a rigid convention of “__SL_G_” followed by three characters of the parameter ID (for example,
__SL_G_T.A).