![Texas Instruments CC3220 Скачать руководство пользователя страница 144](http://html.mh-extra.com/html/texas-instruments/cc3220/cc3220_programmers-manual_1094609144.webp)
RESTful API Processing
144
SWRU455A – February 2017 – Revised March 2017
Copyright © 2017, Texas Instruments Incorporated
HTTP Server
For EAP connections, the URL for posting is
/api/1/wlan/profile_eap
, and the parameters are listed in
(all are case sensitive).
Table 9-7. WLAN EAP Profiles
Name (code)
Description
Example
SSID (__SL_P_P.H)
The SSID of the desired AP. Must not
exceed 32 characters.
__SL_P_P.H=TargetSSID
Identity (__SL_P_P.I)
User identity. Must not exceed 64
characters.
__SL_P_P.I=MyIdentity
Anonymous Identity (__SL_P_P.J)
Anonymous user identity. Must not exceed
64 characters.
__SL_P_P.J=MyAnonymousIdentity
Password (__SL_P_P.K)
Connection password. Must not exceed
63 characters.
__SL_P_P.K=MySecurePassword
Priority (__SL_P_P.L)
Priority of the profile. Must be from 0 to
15.
__SL_P_P.L=1
EAP Method (__SL_P_P.M)
Can be TLS / TTLS / PEAP0 / PEAP1 /
FAST.
__SL_P_P.M=TLS
Pahse2 Authentication (__SL_P_P.N)
Can be None / TLS / MSCHAPV2 / PSK
__SL_P_P.N=None
EAP Provisioning Type (__SL_P_P.O)
Can be None / 0 / 1 / 2
__SL_P_P.O=0
A post to
/api/1/wlan/profile_del
with the parameters listed in
erases it from the file system.
Table 9-8. Erase Profiles
Name (code)
Description
Example
Delete profile (__SL_P_PRR)
Delete the profile with the specified index
such that 0 < Index < 9.
__SL_P_PRR=2
A post to
/api/1/wlan/profile_del_all
deletes all profiles stored on the file system (this includes all profiles
and is not limited to those created through the HTTP interface). Information on the existing profiles can be
accessed using the __SL_G_PN1 to __SL_G_PP7 tokens (see
).
For example, the following request adds a profile for connecting to a secure (3) network with SSID
mySSID, password 0123456789, and priority 5:
POST /api/1/wlan/profile_add HTTP/1.1
Host: mysimplelink.net
Content-Type: application/x-www-form-urlencoded
__SL_P_P.B=3&__SL_P_P.A=mySSID&__SL_P_P.C=0123456789&__SL_P_P.D=5
9.4.5 WLAN Scan
A WLAN scan for nearby access points may be triggered by posting to
/api/1/wlan/en_ap_scan
using the
parameters listed in
Table 9-9. WLAN Scan
Name (code)
Description
Example
Number Of Scan Cycles (__SL_P_SC2)
Number of scan cycles to execute. Must
be greater than zero and smaller than
2^32.
__SL_P_SC2=64
Time Between Scan Cycles
(__SL_P_SC1)
Time (in seconds) to wait between each
two cycles.
__SL_P_SC1=10
For example, the following request triggers 3 scan cycles with 10-second intervals between them:
POST /api/1/wlan/en_ap_scan HTTP/1.1
Host: mysimplelink.net
Content-Type: application/x-www-form-urlencoded