WLAN Commands

Last update: May 2018

Command ID Function Name Description
0001h Scan() Scans wireless LAN and get the list of available SSIDs.
0002h Connect(ssid, networkKey) Connects to wireless LAN AP as STA.
0E401h Connect8021X(ssid) Connection in EAP mode.
0003h Establish(ssid, networkKey, encMode) Establishes wireless LAN as AP.
0005h StartWPS(ssid, wpsMode, pin) Starts WPS for STA and connect to wireless LAN AP.
0007h Disconnect() Terminates the application and disconnect wireless LAN.

* "0004h:WiFiDirect(wpsMode, pin)" and "0006h:StartWPSAP(wpsMode, pin)" are unavailable in the FlashAir.

Scan()

A Host requests to scan connectable wireless LAN. The connectable SSID list (SSID List) is available from the Response Data Register Port as a result of the command process.

Command ID

0001h

Arguments

None

Response

The SSID List is available from the Response Data of the Command Response Data (See 2.2.2.3 iSDIO Command Response Data in [iSDIO]). The format of the SSID List is defined in 3.6.2 Wireless LAN SSID List.

Connect(ssid, networkKey)

A Host requests to connect the specified AP in the wireless LAN as the STA. The command process is finished when the Card has connected the AP successfully.

Command ID

0002h

Arguments

Name Type Size Description
ssid ASCII character Variable length The SSID of the AP to be connected. This value is not terminated by a null character.
networkKey ASCII character Variable length The ‘networkKey’ is the network key of the corresponding SSID. This value is not terminated by a null character. Note that this value is able to be omitted ("Length of Argument" is set to "00 00 00 00h") if encryption is not used for the WLAN connection.

Response

None.

Connect8021X(ssid)

Connect in EAP mode. In PEAP mode, specify ID and password, and CertificateFile specifies Argument length = 0, no value. In TLS mode, set the file path of the client certificate to CertificateFile.

Command ID

0E401h

Arguments

Name Type Size Description
ssid ASCII character Variable length The SSID of the AP to be connected. This value is not terminated by a null character.
Type integer 1 byte Specify the connection type.
0
PEAP mode
1
TLS mode
ID ASCII character Variable length Set the user ID as 1 to 32 characters.
password ASCII character Variable length Set PEAP password or TLS secret key password as 1 to 32 characters.
CertificateFile ASCII character Variable length Set the file path and TLS certificate. (.pfx or .p12 format) Up to 64 characters can be specified.

Response

None.

Establish(ssid, networkKey, encMode)

A Host requests to establish wireless LAN as the AP. A Card shall be the DHCP server, and shall handle the HTTP request/response messages defined in Appendix C in accordance with the sequence defined in D.4 Peer-to-Peer File Transfer Sequence with the Card’s accepting any other Card’s request (without the Host’s operation). The command process is finished when the Card has initiated the AP successfully or an error.

Command ID

0003h

Arguments

Name Type Size Description
ssid ASCII character Variable The SSID of the AP to be connected. This value is not terminated by a null character.
networkKey ASCII character Variable The ‘networkKey’ is the network key of the corresponding SSID. This value is not terminated by a null character. Note that this value is able to be omitted ("Length of Argument" is set to "00 00 00 00h") if encryption is not used for the WLAN connection.
encMode integer 1-byte The encMode denotes the network authentication and the data encryption scheme for the AP.
00h

Open System and no encryption

01h

Open System and WEP (Optional for a Card)

03h

WPA-PSK and TKIP (Optional for a Card)

04h

WPA-PSK and AES (Optional for a Card)

05h

WPA2-PSK and TKIP (Optional for a Card)

06h

WPA2-PSK and AES (Mandatory for a Card)

Note that supported combinations of network authentication and data encryption depend on the Card implementation, and a Host needs to check the "Encryption Mode Support" in the Capability Register. See 3.5 iSDIO Capability Register for Wireless LAN.

Response

None.

StartWPS(ssid, wpsMode, pin)

A Host requests to start the WPS with PIN method or with PBC method to the AP in the wireless LAN and connect the AP. The command process is finished when the Card has connected the AP successfully after the WPS process. This command doesn’t require the additional "Connect" command.

Command ID

0005h

Arguments

Name Type Size Description
ssid ASCII character Variable The SSID of the AP to be connected. This value is not terminated by a null character. Note that this value is able to be omitted ("Length of Argument" is set to "00 00 00 00h") and even if set this value is ignored for the WPS with PBC.
wpsMode integer 1-byte The wpsMode denotes the WPS mode.
01h
WPS with PIN
02h
WPS with PBC
pin Numeric character 4-byte or 8-byte The pin is the pin code for WPS with PIN. Note that this value is able to be omitted ("Length of Argument" is set to "00 00 00 00h") and even if set this value is ignored for the WPS with PBC.

Response

The 32-byte SSID in ASCII character and the 64-byte network key in ASCII character (total of 96 bytes) of the connected AP are available in this order as WPS List from the Response Data of the Command Response Data (3.6 iSDIO Response Data for Wireless LAN).

Disconnect()

A Host requests to disconnect or terminate the AP and terminate the current Application if it exists. In addition, current command processing requiring the WLAN connection is terminated. If the P2P Receiver Application is running, a Card shall send the HTTP request message to notify the termination (HTTP(END)) defined in C.2.6 HTTP(END). The command process is finished when the Card has disconnected or terminated the AP.

Command ID

0007h

Arguments

None.

Response

None.