Home
Command set reference guide for "AT full stack"
Contents
1. AT full stack commands Rel 1 0 Rel 2 0 Rel 3 3 Rel 3 4 AT S S S S AT CFUN S S s 1 S AT S HELP S S S S AT S GCFG S S S S AT S SCFG S S S S AT S SSIDTXT S S S S AT amp V S S S S AT amp F S S S S AT amp W S S S S AT S NVW S S Deprecated NS AT S STS S S S AT S PEERS New S AT S PING S S S AT S SOCKON S S S AT S SOCKOS S S Deprecated NS AT S SOCKW S S S S AT S SOCKQ S S S S AT S SOCKR S S S S AT S SOCKC S S S S AT S SOCKD New S AT S New S AT S HTTPGET S S S AT S HTTPPOST New S AT S FSC S S S 6 46 DoclD025531 Rev 5 3 UM1695 Command reference 2 1 3 Table 1 AT command list summary continued AT full stack commands Rel 1 0 AT S FSA Rel 2 0 Rel 3 3 Rel 3 4 AT S FSD AT S FSL AT S FSP OO nN Ww AT S MFGTEST Deprecated AT S PEMDATA Deprecated AT S WIFI AT S ROAM AT S GPIOC AT S GPIOR AT S GPIOW AT S FWUPDATE DI DN DI DI NDI NDI DN DN DN ND ON oO Nn AT S HTTPDFSUPDATE 8 DI DN DN NDI DN NDI DN DN DN ND ND oN Nn OO ND nN ND nN Oo AT S HTTPDFSERASE New AT S HTTPD New AT S SCAN New DIN ND DN nal ND nN nN on AT S ADC New AT S DAC AT S PWM New New AT S TLSCERT New AT S TLSCERT2 New AT S TLSDOMAIN New
2. OK AT OK Status amp Statistics version _ _SPWFOLS reset_reason 4 conf_flag 5 system_uptime 2083 system_sleeptime 0 gpio_enable 0 captiveportal 0 wifi_state 10 wifi_bssid 00 00 00 00 00 00 wifi_aid 0 wifi_channelnum 0 wifi_sup_rate_mask 0x003FFFCF wifi_bas_rate_mask 0x0000000F wifi_chan_activity2 0x00003FFE wifi_max_tx_power 18 wifi_reg_country DK wifi_dtim_period 0 wifi_sleeping 0 wifi_num_assoc 0 ip_ipaddr 0 0 0 0 ip_netmask 0 0 0 0 ip_gw 0 0 0 0 ip_dns 0 0 0 0 ip_sock_open 0 ip_sockd_port 0 free_heap 24176 min_heap 23088 current_time 2083 S STS system_uptime lt cr gt system_uptime 7001 DoclDO25531 Rev 5 3 UM1695 Command reference 2 11 3 AT S PEERS dump contents of the peer table AT S PEERS displays the current values of the peer table These values are useful to know additional information about the module connected to the AP or about the client connected to the module configured in Mini AP mode Arguments optional lt peer_number gt identifier of the peer lt peer_var gt displays the current value of the specified peer variable Example AT S PEERS lt cr gt Module connected to the AP Size of peer table 1 0 link id 0 state 4 2 62 1F 51 8F 08 6424 6379 ja w n ct K N 0 0 0 O last_tx O rx_drops 0 O tx_drops 0
3. AT S SETTIME New 1 Extended to manage low power configuration modes 2 The use of UART 2 and UART 3 interfaces is disabled 3 Command only supported on the HW versions SPWF01Sx 11 The following subsections cover each AT command in detail AT Attention AT by itself is a null command that always returns an OK result code It is useful for testing the module interface for readiness Arguments none Example DoclDO25531 Rev 5 7 46 Command reference UM1695 AT lt cr gt lt cr gt lt 1lf gt OK lt cr gt lt 1f gt 2 2 AT CFUN comm function AT CFUN sets a power mode with default values as it is indicated in the table 2 and includes a reset of the device Arguments lt num gt 0 switch to the active state and reset the device 1 keep the current state and reset the device 2 switch to the powersave state and reset the device 3 switch to the sleep state and reset the device 4 switch to the standby mode and reset the device Table 2 Power states default configuration Module states Shortcut command STM32 states WLAN states AT variables default values Rx Idle att s scfg sleep_enabled 0 Active CFUN 0 Run Rx Active at s scfg wifi_powersave 0 Tx Active attrs scfg standby enabled 0 attrs scfg sleep enabled 0 atrs scfg wifi powersave 1 Power save CFUN 2 Run PS or Fast PS atrs scfg wifi operational mode 11 at s scfg wifi_beacon_wakeup 1 at s scfg wifi_lis
4. Cor UM1695 Ts life augmented User manual Command set reference guide for AT full stack for SPWEFO1SX series of Wi Fi modules May 2015 Introduction This document is a guide to the AT full stack command set a firmware application embedded in the SPWFO01Sx series of Wi Fi modules The AT full stack command set is a user friendly interface of a complete TCP IP stack supporting both direct links with Wi Fi enabled devices and infrastructure communication modes with an access point Application utilities such as an http client and a web server are also featured in the software to allow easy integration with many Internet based applications This document provides a detailed description of each command supported by the AT full stack interface A description and explanation of configuration variables status variables and asynchronous indication messages are also integrated into the document respectively in Chapter 3 4 and 5 DoclDO25531 Rev 5 1 46 www st com Contents UM1695 Contents 1 OVEIVIEW 2 052005 AE EO EE OT OIE OE Sue Meee OS 4 2 Command reference iese RE EER RR ees 6 2 1 AT Attento ach stows we fea RE Ge ea dee ee EE Re ee 7 2 2 AT CFUN comm function EE ees 8 2 3 AT S HELP display help text 2 ss es es es ee ee ee ee 8 2 4 AT S GCFG get configuration value iis ee ee Ee eee 10 25 AT S SCFG set configuration value ee ee ee ke ee 10 26 AT
5. lt zero or more response lines gt lt cr gt lt 1lf gt lt responsecode gt lt cr gt lt 1f gt The AT command line up to the terminating lt cr gt is sent from the host The optional response lines followed by lt cr gt lt If gt lt responsecode gt lt cr gt lt lf gt are sent from the module The lt response code is one of the following OK ERROR descriptive text gt The AT command handler allows for the AT commands to be entered in upper or lower case DocIDO25531 Rev 5 ky UM1695 Overview 3 Command arguments are case sensitive The maximum command length is 512 characters Note that asynchronous indications are blocked from the time the initial A is sent to the module until the lt responsecode gt line is sent Any indications generated from events during the processing of an AT command are queued for delivery after the command is complete DoclDO25531 Rev 5 5 46 Command reference UM1695 2 Command reference This chapter details each of the AT commands including brief descriptions of the behavior syntax of the command example of use and types of responses The commands described are those listed in Table 1 Table key e S command is supported in this release e NS command is not supported in this release e New command is introduced with this release e Deprecated command is deprecated in this release Table 1 AT command list summary
6. 0x2000 Write len 4096 gt 0x3000 note deleted extra output for clarity Write len 4096 gt 0x41000 3 DoclDO25531 Rev 5 UM1695 Command reference 2 37 2 38 2 39 Note 3 write len 4096 gt 0x42000 Write len 2476 gt 0x43000 final Wrote 276904 bytes Complete Update will be applied on next reboot at cfun 1 AT CFUN 1 lt cr gt WIND 2 RESET WIND 17 Validating F W update WIND 17 Performing F W update note at this point the LEDS will blink rapidly until update is complete WIND 17 F W update complete WIND 1 Poweron 1203 120918 01 AT S HTTPDFSUPDATE update static HTTPD filesystem AT S HTTPDFSUPDATE downloads an updated file system via a single HTTP GET request to the named host and path much like the AT S HTTPGET command The SPWEFO1SX 11 will validate the image it downloads Flashes the contents and then prompts the user to issue a reset command in order to complete the file system update Arguments lt hostname gt Target host DNS resolvable name or IP address lt path amp queryopts gt document path and optional query arguments lt port gt Target host port Example AT S HTTPDFSUPDATE host example com custom_httpdfs img lt cr gt Image length 777 offset 0x00080000 block len 4096 Write len 784 gt 0x80000 final Wrote 780 bytes Complete Please reboot OK AT S HTTPDFSERASE erase the external flash memory The HTTPDFSERASE allows to
7. WIND 26 WiFi Started AP with network ond Radio successfully started the Mini AP where d network SSID WIND 27 STARTFAILED 04x Radio failed to start the Mini AP x status code WIND 28 Station m Associated d Client associated to the module in Mini AP m BSSID d peers assoc status 0 default 1 client re association WIND 29 DHCP reply for i m DHCP reply sent for the client i client IP address m client MAC Address WIND 30 WiFi BSS Lost Beacon missed from the BSS WIND 31 WiFi EXCEPTION lt data gt Radio reported an internal exception Radio is non functional from this point User must reboot the module WIND 32 WiFi Hardware Started Radio reports successful internal initialization WIND 33 WiFi Network Lost Connection to BSS lost due to excessive beacon misses WIND 34 WiFi Unhandled Event d WIND 35 Scan Complete 0x x Unhandled internal event occurred d identifier of the event occurred Scan Complete indication x result code 0 scan ok 1 scan error Note WIND hidden when fast reconnect 7 is performed WIND 36 WiFi UNHANDLED IND 02x lt hexdata gt Unparsed radio indication occurred WIND 37 WiFi UNHANDLED d lt hexdata gt Unhandled radio response message received WIND 38 WiFi Powered Down Radio and radio thread shut down WIND 39 HW in miniAP mode GPIO7 Low Module started in miniAP mode SSI
8. O rx_pkts 64213 O tx_pkts 73426 O tx_errs 5 O rate_mask 0x00003FCF O cur_rate_idx 13 O cur_rate_ok 4 O cur_rate_fail 0 O tx_consec_fail 0 O rx_seqnum 0x0000F510 O rx_seqnum_mc 0x00004F80 O rx_rssi 33 O rx_rateidx 0 O setprot 3 O listen_interval 0 0 capinfo 0x00000411 AT S PEERS 0 rx_rssi lt cr gt O rx_rssi 33 OK DoclDO25531 Rev 5 15 46 Command reference UM1695 2 12 2 13 Note 16 46 AT S PING send a ping to a specified host AT S PING issues a single ICMP ECHO request to the given host Arguments lt hostname gt Target host DNS resolvable name or IP address Example AT S PING 192 168 1 254 lt cr gt PING sendto 192 168 1 254 lt cr gt lt lf gt lt cr gt lt 1f gt OK lt cr gt lt 1f gt AT S PING example com lt cr gt PING sendto 192 0 43 10 lt cr gt lt lf gt lt cr gt lt 1lf gt OK lt cr gt lt 1f gt AT S PING nonexistent example com lt cr gt lt cr gt lt 1f gt ERROR DNS lookup failure lt cr gt lt lf gt AT S PING 192 168 1 1 lt cr gt PING sendto 192 168 1 1 lt cr gt lt lf gt lt cr gt lt 1lf gt ERROR Timed out lt cr gt lt 1lf gt AT S SOCKON open a network socket AT S SOCKON opens a TCP UDP socket to myserver on port Xxxx Arguments lt hostname gt target host DNS resolvable name or IP address lt port gt TCP UDP socket port lt protocol
9. S SSIDTXT get set a textual SSID ie EE EE Re Ee Ee ee 11 2 7 AT amp V display all configuration values asuaan aaua aaaea 11 2 8 AT amp F restore factory default settings EE Ee ee ee 13 29 AT amp W save current settings 2 0000 EE EE RE ee 13 2 10 AT S STS report current status statistics 14 2 11 AT S PEERS dump contents of the peer table 15 2 12 AT S PING send a ping to a specified host 16 2 13 AT S SOCKON open a network socket 0020 Ee 16 2 14 AT S SOCKW write len bytes of data to socket 17 2 15 AT S SOCKQ query pending data 2 eee eee eee 17 2 16 AT S SOCKR return len bytes of data from socket 17 2 17 AT S SOCKC close socket 0000 ccc tees 18 2 18 AT S TLSCERT configure SSL TLS certificates 18 2 19 AT S TLSCERT2 Cleanup SSL TLS certificate resources 18 2 20 AT S TLSDOMAIN set CA domain name It must match the secured site name EE Ee ee ee ee ee ee ee 18 2 21 ATTS SETTIME initiate module reference time 19 2 22 AT S SOCKD enable disable the socket server 19 2 23 AT S command mode to data mode 2020 ee 19 2 24 AT S HTTPGET issue an HTTP GET 0002 eee eee 20 2 25 AT S HTTPPOST issue an HTTP POST 200 0000 21 2 26 AT S FSC
10. UM1695 Configuration variable reference Table 5 Configuration data variables continued Variable Sample value Type Description Low signal strength wifi_rssi_thresh 50 INT threshold Amount of change in RSSI wifi_rssi_hyst 10 INT to trigger signal state change Seconds of inactivity to wifi_ap_idle_timeout 120 INT trigger disassociate of the client Number of consecutive wifi_beacon_loss_thres 10 INT loss beacon to detect the i AP disassociation Privacy Mode O none wifi_priv_mode 2 INT 1 WEP 2 WPA Personal TKIP AES or WPA2 Personal TKIP AES 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 wifi_wep_keys 0 HEX 16 WEP key buffer wifi_wep_keys 1 HEX 16 WEP key buffer wifi_wep_keys 2 HEX 16 WEP key buffer wifi_wep_keys 3 HEX 16 WEP key buffer 00 Four octets specifying the F AAAA length of the actual key wifi_wep_key_lens 00 00 00 00 HEX 4 data in each WEP key buffer wifi_wep_default_ key o INT secu ngs used f r 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 wifi_wpa_psk_raw 00 00 00 00 00 HEX 32 Pre calculated PSK key 00 00 00 00 00 00 00 00 00 00 00 00 3 DoclDO25531 Rev 5 35 46 Configuration variable reference UM1695 36 46 Table 5 Configura
11. WIND 71 DNS reply for d DNS reply from MiniAP to the client d client IP address WIND 72 Station m Disassociated d Client dissociated to the module in Mini AP m BSSID d reason code 802 11 Deauthentication Reason Code WIND 73 System Configuration Updated Run AT amp W to Save it The configuration variables have been updated it needs an AT amp W to save it this WIND is usually shown when an old FW version is updated 3 DoclD025531 Rev 5 43 46 Asynchronous indication reference UM1695 Table 8 Asynchronous indication messages continued Indication Notes A new scan needs to be scheduled due to a mismatch WIND 74 Rejected found Network between SPWF configuration variables and Access Point configuration Indicates an association failure yyy low memory reject WIND 75 Rejected Association yyy status code WIND 76 Authentication Timed Out Indicates that the authentication process is timed out WIND 77 Association Timed Out Indicates that the association process is timed out WIND 78 MIC Failure Michael MIC error is detected by the local driver 1 Fast reconnect feature allows fast reconnect to the last associated AP 3 44 46 DoclDO25531 Rev 5 UM1695 Revision history 6 3 Revision history Table 9 Document revision history Date Revision Changes 05 Dec 2013 1 Initial release Major review f
12. command line Arguments lt fname gt Filename max len Amount of bytes to be appended to an existing file The limit of bytes that can be appended depends on the space allocated during the file creation Example AT S FSA data json 165 lt cr gt HTTP 1 0 200 OK lt cr gt lt l1f gt Server MyProduct lt cr gt lt lf gt 3 DoclDO25531 Rev 5 UM1695 Command reference Connection close lt cr gt lt l1f gt Content Type application json lt cr gt lt lf gt lt cr gt lt lf gt lt cr gt lt lf gt lt cr gt lt lf gt device lt cr gt lt lf gt name SPWFO1SX 11 lt cr gt lt lf gt serial 802 11n lt cr gt lt lf gt lt cr gt lt lf gt lt cr gt lt lf gt lt cr gt lt lf gt 0K lt cr gt lt lf gt 2 28 AT S FSD delete an existing file AT S FSD deletes an existing file by name Static files may not be deleted only overridden Arguments lt fname gt Filename Example AT S FSD data json lt cr gt lt cr gt lt lf gt 0K lt cr gt lt lf gt 2 29 AT S FSL list existing filename s AT S FSL lists the types l Internal Flash Memory DERAM Memory E External Flash Memory sizes and names of all the existing files Note Internal Flash pages HTML header automatically added RAM memory pages HTML 3 header added not added depending on the lt http_header gt parameter External Flash pages HTML header added by default it can be disabled acting on httpd_gen c included in the FW package commen
13. end of the command line The host is expected to supply lt len gt characters of data after the end of the command line When the ok token has not been received is really important to handle properly the error stage In fact the attsockw command is not reentrant If bytes are lost during data transfer over the UART the module remains in waiting stage for incoming bytes Arguments lt ID gt socket identifier lt len gt data length to send in bytes up to 4096 bytes Example AT S SOCKW 00 11 lt cr gt Test_socket lt cr gt lt lf gt OK lt cr gt lt 1lf gt AT S SOCKQ query pending data AT S SOCKQ returns the number of bytes of data waiting on socket Arguments lt ID gt socket identifier Example AT S SOCKQ 01 lt cr gt lt cr gt lt lf gt DATALEN 12 lt cr gt lt lf gt OK lt cr gt lt 1lf gt AT S SOCKR return len bytes of data from socket AT S SOCKR allows to read data from socket Arguments lt ID gt socket identifier lt len gt data length to read Example DoclDO25531 Rev 5 17 46 Command reference UM1695 2 17 Note 2 18 Note 2 19 Note 2 20 Note 18 46 AT S SOCKR 01 12 lt cr gt Test socketl lt cr gt lt lf gt OK lt cr gt lt lf gt AT S SOCKC close socket The SOCKC command allows to close socket Both for TCP and UDP sockets flushing pending data using the AT S READ command is mandatory before closing the socket connection
14. 0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 wifi wpa psk text ip use dhcp 1 ip use httpd 1 ip mtu 1500 ip hostname iwm AA B9 BA ip _apdomainname captiveportal net ip _apredirect firstset html ip ipaddr 192 168 0 50 ip netmask 255 255 255 0 ip gw 192 168 0 1 ip_dns 192 168 0 1 ip http get recv timeout 3000 ip wait timeout 12000 ip dhcp timeout 20 ip sockd timeout 250 OK 2 8 AT amp F restore factory default settings AT amp F restores the factory default values of the configuration variables and writes them to non volatile storage Running this command is mandatory after every FW update Note To perform the HW factory reset of the variables the pin GPIOO must be high during the powerup operation Arguments none Example AT amp F lt cr gt lt cr gt lt l1f gt OK lt cr gt lt 1f gt 2 9 AT amp W save current settings 3 AT amp W stores the current RAM based settings to non volatile storage Arguments none Example AT amp W lt cr gt lt cr gt lt 1lf gt OK lt cr gt lt 1f gt DoclDO25531 Rev 5 13 46 Command reference UM1695 2 10 14 46 AT S STS report current status statistics AT S STS displays the current values of all the status variables Arguments optional lt sts_var gt displays the current value of the specified variable Example AT S STS lt cr gt
15. 2014 01 22 07 36 181370961643 lt LF gt Post body was 0 chars long lt CR gt lt LF gt lt CR gt lt LF gt DoclDO25531 Rev 5 21 46 Command reference UM1695 2 26 2 27 22 46 OK lt CR gt lt LF gt AT S FSC create a file AT S FSC creates a file inside the RAM of the module for delivery by the http server The lt name gt argument establishes the URL path that must be used in the HTTP GET froma remote client to access this file The file must include a complete HTTP response header plus the document content that will be delivered to the client The software includes some statically defined pages that cannot be removed but they can be overridden by creating a file of the same name To add content to a file see AT S FSA below Warning Space for files is allocated from available RAM in the module and extremely limited Minimize the requirement for these as much as possible Arguments lt fname gt Filename lt max_len gt Amount of space to allocate for file max 4096 bytes lt http_header gt O HTML header automatically added 1 HTML header not added as by default Example AT S FSC new html 1024 lt cr gt lt cr gt lt lf gt 0K lt cr gt lt lf gt AT S FSA Append to an existing file AT S FSA appends blocks of data to an existing file This command accepts data after the lt cr gt at the end of the command line The host is expected to supply lt datalen gt characters of data after the end of the
16. 3 C3 CHAN 01 RSSI 85 SSID PAWAM CAPS 0431 WPA lt CR gt lt LF gt 3 lt HT gt BSS 00 18 74 D3 53 C1 CHAN 01 RSSI 85 SSID AmbuM CAPS 0431 WPA2 lt CR gt lt LF gt 4 lt HT gt BSS 00 18 74 D3 53 C2 CHAN 01 RSSI 84 SSID Guest CAPS 0421 lt CR gt lt LF gt 5 lt HT gt BSS C8 D3 A3 15 98 14 CHAN 05 RSSI 79 SSID AmbulITguest CAPS 0431 WPA WPA2 WPS lt CR gt lt LF gt 6 lt HT gt BSS 02 62 1F 51 8F 0B CHAN 06 RSSI 41 SSID ciscosb2 CAPS 0411 WPA WPA2 lt CR gt lt LF gt 3 DoclDO25531 Rev 5 UM1695 Command reference 7 lt HT gt BSS 00 18 0A 31 EA 78 CHAN 11 RSSI 89 SSID ZyckoItalyWiFi CAPS 0531 WPA WPA2 lt CR gt lt LF gt 8 lt HT gt BSS 00 1F 33 FE 66 17 CHAN 11 RSSI 91 SSID TRI_AGRATE CAPS 0411 WPA2 lt CR gt lt LF gt lt CR gt lt LF gt OK lt CR gt lt LF gt AT S SCAN a r lt cr gt 1 lt HT gt BSS 00 18 74 D3 53 C0O CHAN 01 RSSI 81 SSID Ambu2 CAPS 0431 WPA2 lt CR gt lt LF gt 2 lt HT gt BSS O00 18 74 D3 53 C1 CHAN 01 RSSI 80 SSID AmbuM CAPS 0431 WPA2 lt CR gt lt LF gt 3 lt HT gt BSS 00 18 74 D3 53 C2 CHAN 01 RSSI 81 SSID Guest CAPS 0421 lt CR gt lt LF gt 4 lt HT gt BSS 00 18 74 D3 53 C3 CHAN 01 RSSI 81 SSID PAWAM CAPS 0431 WPA lt CR gt lt LF gt 5 lt HT gt BSS 00 18 74 D3 53 C1 CHAN 01 RSSI 81 SSID AmbuM CAPS 0431 WPA2 lt CR gt lt LF gt 6 lt HT
17. 3 are currently opened ip sockd port 0 Socket server port opened free_heap 30472 Current free heap space min_heap 26552 Minimum free heap space thus far current_time 90643 Current time in seconds Table 7 Peers table Variable Sample value Description link_id 0 Identifier of the client 0 Hardware Power Up 1 HW link initialization 2 Client Link identifier allocated state 4 3 Authenticated 4 Associated 5 Peer lost beacons 6 Peer in power save state addr 90 18 7C 96 0D 0B MAC address of the client last_rx 21244 Timestamp of last received packet last_tx 21244 Timestamp of last transmitted packet rx_drops 0 Count of frames dropped during reception tx_drops 1 Count of frames dropped during transmission rx_pkts 50 Count of received frames tx_pkts 44 Count of transmitted frames tx_errs 0 Count of errors detected during frame transmit rate_mask 0x00003FCF AP reported Operational data rate mask cur_rate_idx 3 Most significant byte of the rate_mask cur_rate_ok 5 Counter to perform rate step up cur_rate_fail 0 Counter to perform rate step down tx_consec_fail 0 Counter to perform disassociation DoclDO25531 Rev 5 39 46 Status variable reference UM1695 40 46 Table 7 Peers table continued Variable Sample value Description rx_seqnum OXOOOOAF40 Sequence number of last RX directed frame rx_seqnum_mc 0x00000000 Sequence number of last RX multicast frame rx_rssi 37 Signal s
18. 41 6 REVISION hiStory ss se vee ESE EERS SSG HEES eed eee eee cheese 45 ky DoclD025531 Rev 5 3 46 Overview UM1695 4 46 Overview The AT full stack command interface described in this user guide consists of a set of e AT style commands e configuration variables e status variables and e asynchronous indications also known as unsolicited responses or WINDs The communication of commands variables and asynchronous indications is executed via the serial port and implies the integration of the SPWF01Sx modules with a host processor as indicated in Figure 1 Figure 1 SPWF01S integration with an host processor UART Host EE Ee STM32 STM8 AT commands Conf Variables lt gt Status Variables lt _ lt Asynchronous Indications Asynchronous indications may arrive at any time except as noted below and have the format lt cr gt lt 1f gt WIND lt number gt lt descriptive string gt lt cr gt lt lf gt The lt number gt field of each asynchronous indication type is unique The descriptive string may be safely ignored Immediately after reset no commands should be sent and only asynchronous indications are present until the indication lt cr gt lt lf gt WIND 0 Console active lt cr gt lt lf gt is received After WIND 0 is received AT commands may be sent to the SPWF device AT commands are always in the form of AT lt cmd gt lt cr gt
19. 68 0 50 lt cr gt lt lf gt lt cr gt lt 1lf gt OK lt cr gt lt 1lf AT S SCFG set configuration value AT S SCFG sets the value of one named configuration variable See Chapter 3 Configuration variable reference for a list of available variables AT amp V provides the list of all variables and values on a running module Arguments lt key gt Name of the configuration variable lt value gt Value to store in the variable Example AT S SCFG ip_ipaddr 192 168 10 10 lt cr gt ip ipaddr 192 168 10 10 lt cr gt lt lf gt lt cr gt lt 1lf gt OK lt cr gt lt 1f gt 3 DoclDO25531 Rev 5 UM1695 Command reference 2 6 2 7 3 AT S SSIDTXT get set a textual SSID AT S SSIDTXT is a convenience command that when called with no arguments returns the current value of wifi_ssid and wifi_ssid_len configuration variables as a text string All non printable characters are displayed with the character When called with an argument the wifi_ssid and wifi_ssid_len configuration variables are set to the specified text string IEEE 802 11 and some access point implementations allow SSID values consisting of non printable octet values therefore the wifi_ssid variable is set and stored as a sequence of octets specified in hexadecimal and wifi_ssid_len cannot be set based on any given flag value or delimiter This command is only present as a convenience for those circumstances where the SSID is known to consist of prin
20. AT S SOCKC If the buffer is not erased the ERROR Pending data is raised Arguments lt ID gt socket identifier Example AT S SOCKC 00 lt cr gt lt cr gt lt lf gt OK lt cr gt lt 1lf gt AT S TLSCERT configure SSL TLS certificates AT S TLSCERT allows to store the certificates in the Flash memory of the module Refer to the SSL TLS Application Note for details Arguments lt f_ca f_cert f_key gt store the CA certificate the client certificate or the key file PEM format lt length gt size of the certificate AT S TLSCERT2 Cleanup SSL TLS certificate resources AT S TLSCERT2 allows to clean the certificates in the flash memory of the module Refer to the SSL TLS Application Note for details Arguments lt f_ca f_cert f_key f _domain all gt clean the CA certificate the client certificate the key file the server domain or all AT S TLSDOMAIN set CA domain name It must match the secured site name The TLSDOMAIN command allows to store the Certification Authority domain name in the Flash memory of the module Refer to the SSL TLS Application Note for details Arguments lt f_domain gt store the CA domain in the flash memory lt ca domain name gt domain name of the Certification Authority 3 DoclD025531 Rev 5 UM1695 Command reference 2 21 Note 2 22 2 23 3 AT S SETTIME initiate module reference time The SETTIME command allows to set the reference ti
21. D iwm XX YY ZZ where XXYYZZ are the last 6 digits of MAC Address WIND 40 WiFi Deauthentication d WIND 41 WiFi Disassociation d Radio Access point sent deauthentication d reason code 802 11 Deauthentication Reason Code Radio Access point sent disassociation d reason code 802 11 Disassociation Reason Code WIND 42 RX_MGMT 04x Unhandled management frame subtype received WIND 43 RX_DATA 04x Unhandled data frame subtype received WIND 44 RX_UNK 04x Unhandled frame type received WIND 45 D0T11 AUTHILLEGAL Illegal authentication type detected WIND 46 WPA Crunching PSK WIND 47 WPA s Creating PSK from PSK passphrase Factory Debug WIND 48 WPAC s Factory Debug WIND 49 WPA Terminated d WPA supplicant thread terminated DoclDO25531 Rev 5 3 UM1695 Asynchronous indication reference Table 8 Asynchronous indication messages continued Indication WIND 50 WPA Supplicant failed to initialize Notes WPA supplicant thread initialization failed WIND 51 WPA Handshake Complete WPA 4 way handshake successful WIND 52 GPIO d d GPIO line changed state d GPIO changed d GPIO logic state WIND 53 Wakeup GPIO6 High Device woken up from sleep from external signal WIND 54 ETF 04d Factory Debug WIND 55 Pending Data d d Pending data from the socket d socket identifier d pend
22. INT Reserved Channel number to use for MiniAP operation The wifi_channelnum 6 INT user must properly set the channel number to not violate IEEE 802 11 Wi Fi WLAN standards Kys DoclD025531 Rev 5 33 46 Configuration variable reference UM1695 34 46 Table 5 Configuration data variables continued Variable wifi_opr_rate_mask Sample value OxFFFFFFFF INT Type Description BITO 1 Mbps BIT1 2 Mbps BIT2 5 5 Mbps BIT3 11 Mbps BIT6 6 Mbps BIT7 9 Mbps BIT8 12 Mbps BIT9 18 Mbps BIT10 24 Mbps BIT11 36 Mbps BIT12 48 Mbps BIT13 54 Mbps BIT14 MCSO 6 5Mbps BIT15 MCS1 13Mbps BIT16 MCS2 19 5Mbps BIT17 MCS3 26Mbps BIT18 MCS4 39Mbps BIT19 MCS5 52Mbps BIT20 MCS6 58 5Mbps BIT21 MCS7 65Mbps wifi_bas_rate_mask OXOOOOOOOF INT Basic data rate mask 0x0000000f is 1 2 5 5 11 wifi_mode INT Radio Mode O IDLE 1 STA Supported Security Modes OPEN WEP OpenSystem WEP SharedKey WPA WPA2 2 IBSS Supported Security Modes OPEN WEP OpenSystem WEP SharedKey 3 MiniAP Supported Security Modes OPEN WEP OpenSystem Supported Classes b g wifi_auth_type INT Authentication type used in IBSS mode 0 OpenSystem 1 SharedKey wifi_powersave INT Allows choosing between Active 0 PS 1 or Fast PS 2 wifi_tx_power 18 INT Transmit power from 0 to 18 in dBm DoclDO25531 Rev 5 ky
23. ables PWM on GPIO1 with a specified frequency and duty cycle The max frequency value 10 KHz allows user to set any duty cycle between 0 and 100 Arguments lt frequency gt value between 1 and 10 KHz 0 disables PWM on GPIO1 lt Duty Cycle gt value between 0 and 100 default 50 3 DoclDO25531 Rev 5 UM1695 Configuration variable reference 3 3 Configuration variable reference The configuration variable space is split into two areas production data PDATA and configuration data The production data space contains factory set variables that can be modified in RAM AT S SCFG but cannot be saved to non volatile storage The configuration data space contains variables that can be written in RAM AT S SCFG and written to non volatile storage AT amp W Additionally the non volatile values can be restored to their factory state using the AT amp F command Variables have the following types Table 3 Variable types Type code Description TEXT lt len gt Printable text up to lt len gt characters HEX lt len gt Octets specified in hexadecimal up to lt len gt octets INT Integer IP IP address or netmask specified as a dotted quad The following table lists the production data variables Table 4 Production data variables Variable Sample Value Type Description nv_manuf ST TEXT 32 Manufacturer ID string nv_model SPWF01Sxyz TEXT 32 Manufacturer model string nv_
24. clD025531 Rev 5 UM1695 Command reference 2 25 3 lt p gt This page was delivered from the SPWF01Sx 11 internal HTTP server lt p gt lt p gt lt a href config shtml gt SPWF01Sx 11 Configuration Settings Page lt a gt lt p gt lt p gt lt a href status shtml gt SPWFO1Sx 11 Status Page lt a gt lt p gt lt body gt lt html gt OK AT S HTTPGET nonexistent example com lt cr gt lt cr gt lt l1f gt ERROR host not found lt cr gt lt 1f gt AT S HTTPPOST issue an HTTP POST The HTTP POST performs a post of the given path to the specified host The module can be only used as an HTTP POST client Arguments lt hostname gt target host DNS resolvable name or IP address lt path amp queryopts gt document path lt formcontent gt form to be submitted lt port gt target host port Optional Example at s httppost posttestserver com post php name demo amp email mymail amp subject subj amp body message lt CR gt HTTP 1 1 200 OK lt CR gt lt LF gt Date Wed 22 Jan 2014 15 36 18 GMT lt CR gt lt LF gt Server Apache lt CR gt lt LF gt Access Control Allow Origin lt CR gt lt LF gt Vary Accept Encoding lt CR gt lt LF gt Content Length 141 lt CR gt lt LF gt Connection close lt CR gt lt LF gt Content Type text html lt CR gt lt LF gt lt CR gt lt LF gt Successfully dumped 4 post variables lt LF gt View it at http www posttestserver com data
25. complete 6 Join in progress 7 Joined 8 Access point started 9 802 11 handshake complete 10 Ready to transmit data i e Link Up wifi_bssid 00 18 F8 3C D9 18 BSSID of current association wifi_aid 0 Association ID of current association wifi_channelnum 11 Current radio channel number wifi_sup_rate_mask 0x003FFFCF Radio supported data rate mask wifi_bas_rate_mask OXOOOOOOOF AP reported basic data rate mask Channels where we are allowed to transmit wifi chan activity2 0x00003FFF Channel mask i e OXOOOOSFFF gt from channel 0 to channel 13 max allowed transmit power for the defined reg wifi_max_tx_power 18 i aaa domain wifi_reg_country IT Current regulatory domain wifi_dtim_period 1 AP reported DTIM period used in STA mode wifi_sleeping 0 Radio sleeping state 0 active 1 sleep DoclDO25531 Rev 5 ky UM1695 Status variable reference 3 Table 6 Status variable continued Variable wifi_num_assoc Sample value 1 Description Number of the client associated to the module ip_ipaddr 192 168 121 184 Current IP address ip_netmask 255 255 252 0 Current IP netmask ip_gw 192 168 123 20 Current IP default gateway ip_dns 192 168 123 20 Current IP DNS server Bitmask of Socket Client ID currently opened expressed in base 10 ip_sock_open 13 ip_sock_open 0 00001101 in binary means that socket 0 socket 2 and socket
26. create a file ES ee ee 22 2 27 AT S FSA Append to an existing file EE EE ee 22 2 46 DoclD025531 Rev 5 ky UM1695 Contents 2 28 AT S FSD delete an existing file 002 eee eee 23 2 29 AT S FSL list existing filenamel S EE Ee eee 23 2 30 AT S FSP Print the contents of an existing file 24 2 31 ATTS WIFi enable disable Wi Fi device 005 24 2 32 AT S ROAM trigger Wi Fi reassociation sequence 24 2 33 AT S GPIOC configure general purpose inputs outputs 25 2 34 AT S GPIOR query general purpose input 25 2 35 AT S GPIOW set general purpose output 205 26 2 36 AT S FWUPDATE perform a firmware update 26 2 37 AT S HTTPDFSUPDATE update static HTTPD filesystem 27 2 38 AT S HTTPDFSERASE erase the external flash memory 27 2 39 AT S HTTPD Disable Enable web server 0 27 2 40 AT S SCAN perform site survey scan 0 000 eee eee 28 2 41 AT S ADC Read ADC value on GPIO8 005 29 2 42 AT S DAC enable disable DAC on GPIO15 04 29 243 AT S PWM set PWM on GPIO1 EE Ee SE ee 30 3 Configuration variable reference 00 00 cece ee eee eee 31 4 Status variable reference iss ska ss ss se RR eee 38 5 Asynchronous indication reference iss s ss EE RR RR RR ee
27. erase the content of the external flash Arguments lt none gt AT S HTTPD Disable Enable web server The HTTPD command enables or disables the module s web server Command only available on the module s versions SPWFO1Sx ly Arguments lt on off gt 0 to disable 1 to enable DoclD025531 Rev 5 27 46 Command reference UM1695 2 40 Note 28 46 Example AT S HTTPD 0 lt CR gt lt CR gt lt LF gt OK lt CR gt lt LF gt AT S SCAN perform site survey scan AT S SCAN performs an immediate scan for available networks Infrastructure AP and IBSS Ad Hoc networks are both reported Network type Channel BSSID SSID Signal strength RSSI and 802 11 capabilities are all reported The module supports the active passive scan and the filtered unfiltered scan Default is active and filtered The automatic scan performed by the module to connect to the Access Point is passive by default This is done to avoid violating spectral emission The switch to active scan only happens when the module finds an AP advertising the country IE Therefore the current scan policy is not compatible with band steering mode Arguments lt al p gt Perform an active scan a or a passive scan p lt r gt duplicated networks are displayed unfiltered Example AT S SCAN lt cr gt 1 lt HT gt BSS 00 18 74 D3 53 C0O CHAN 01 RSSI 85 SSID Ambu2 CAPS 0431 WPA2 lt CR gt lt LF gt 2 lt HT gt BSS 00 18 74 D3 5
28. gt t for TCP socket u for UDP socket s for secure socket ind indicate when data has arrived optional this option requires to read the socket when a pending indication message is received Up to 8 TCP or UDP sockets can be opened contemporary In this case it is strictly suggested to immediately empty the buffer using sockr command when a pending data is received Up to 4 consecutive 730 Bytes Pending data messages w o SOCKR are guaranteed To prevent data loss it is suggested to empty the buffer by using the AT S SOCKR command and to avoid exceeding 4 indications When a socket client receives an indication about socket server gone only for TCP sockets WIND 58 the socket connection is not automatically closed Moreover both for TCP and UDP sockets flushing pending data using the AT S READ command is mandatory before closing the socket connection AT S SOCKC If the buffer is not erased the ERROR Pending data is raised 3 DoclDO25531 Rev 5 UM1695 Command reference 2 14 Note 2 15 2 16 3 Example AT S SOCKON myserver 1234 t lt cr gt ID 00 lt cr gt lt 1f gt lt cr gt lt lf gt OK lt cr gt lt 1lf gt AT S SOCKON myserver 456 u ind lt cr gt ID O1l lt cr gt lt lf gt lt cr gt lt lf gt OK lt cr gt lt 1lf gt AT S SOCKW write len bytes of data to socket AT S SOCKW allows to write data to socket This command accepts data after the lt cr gt at the
29. gt BSS 00 18 74 D3 53 C0O CHAN 01 RSSI 81 SSID Ambu2 CAPS 0431 WPA2 lt CR gt lt LF gt 7 lt HT gt BSS 00 18 74 D3 53 C3 CHAN 01 RSSI 80 SSID PAWAM CAPS 0431 WPA lt CR gt lt LF gt 8 lt HT gt BSS 00 18 74 D3 53 C1 CHAN 01 RSSI 81 SSID AmbuM CAPS 0431 WPA2 lt CR gt lt LF gt 9 lt HT gt BSS C8 D3 A3 15 98 14 CHAN 05 RSSI 79 SSID AmbulITguest CAPS 0431 WPA WPA2 WPS lt CR gt lt LF gt 10 lt HT gt BSS 02 62 1F 51 8F 0B CHAN 06 RSSI 39 SSID ciscosb2 CAPS 0411 WPA WPA2 lt CR gt lt LF gt 11 lt HT gt BSS 02 62 1F 51 8F 0B CHAN 06 RSSI 45 SSID ciscosb2 CAPS 0411 WPA WPA2 lt CR gt lt LF gt 12 lt HT gt BSS 00 1F 33 FE 66 17 CHAN 11 RSSI 91 SSID TRI_AGRATE CAPS 0411 WPA2 lt CR gt lt LF gt lt CR gt lt LF gt OK lt CR gt lt LF gt 2 41 AT S ADC Read ADC value on GPIO8 AT S ADC returns ADC value on GPIO8 between 0 and 2500 mV Note Measurement accuracy is around 10 mV Arguments lt raw gt returns raw ADC value on GPIO8 unprocessed between 0 and 4096 This argument is optional and when it is not specified the value is returned processed between 0 and 2500 mV 2 42 AT S DAC enable disable DAC on GPIO15 3 The DAC command enables DAC on GPI015 DoclD025531 Rev 5 29 46 Command reference UM1695 2 43 Note 30 46 Arguments lt Value gt must be set in mV between 1 and 2500 0 disables DAC on GPIO15 AT S PWM set PWM on GPIO1 The PWM command en
30. ing byte available for reading WIND 56 Insert message to client d Input_demo indicator displayed when the input_demo shtml page is requested by a client d is the Nth input SSI into html page WIND 57 lt data gt Firstset indicator displayed during the remote configuration of the module WIND 58 Socket Closed d Socket closed d identifier of the socket WIND 59 Back to Command Mode Command mode is active after the escape sequence WIND 60 Now in Data Mode Data mode is active WIND 61 Incoming Socket Client i Socket client is connected to the module i client IP address WIND 62 Socket Client Gone i Socket client disconnected i client IP address WIND 63 Sockd Dropping Data d d Data dropped due to low memory d bytes dropped d free heap WIND 64 Sockd Pending Data c d e Data pending while module is in command mode c number of message received d bytes received in the last message e tot bytes received WIND 65 HW Factory Reset GPIOO High Factory variables are restored via GPIOO WIND 66 Low Power mode enabled d Power Save Mode enabled d 1 for PS or 2 for Fast PS WIND 67 Going into Standby d WIND 68 Resuming from Standby WIND 69 Going into DeepSleep Standby mode enabled d is time in sec Standby mode disabled Sleep mode enabled WIND 70 Resuming from DeepSleep Sleep mode disabled
31. laces information previously supplied in any prior versions of this document 2015 STMicroelectronics All rights reserved 3 46 46 DoclDO25531 Rev 5
32. leep_enabled 0 standby_enabled 0 10 wifi_tx_msdu_lifetime standby_time wifi_rx_msdu_lifetime wifi_operational_mode wifi_beacon_wakeup wifi_beacon_interval wifi_listen_interval wifi_rts_threshold wifi_ssid 53 54 54 65 73 74 00 00 00 00 00 00 00 00 00 4E ME OR MH t t MR HR RM ME HR ME HEHEHE E E E MR HR wifi ssid len 6 wifi txfail thresh wifi ht mode 0 wifi channelnum 6 wifi opr rate mask wifi bas rate mask wifi mode 1 wifi auth type 0 wifi atim window 0 wifi powersave 0 wifi tx power 18 wifi rssi thresh 0 wifi rssi hyst 0 wifi ap idle timeout wifi beacon loss thre wifi priv mode 0 0000 0x00000000 00000 00 0 0 0x00000011 100 0 3000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0x00003FCF 0x0000000F 120 sh 10 wifi_wep_keys 0 wifi_wep_keys 1 wifi_wep_keys 2 wifi_wep_keys 3 wifi_wep_key_lens 00 00 00 00 00 00 00 00 00 200 200 200 00 00 00 00 00 00 00 00 00 00 00 00 wifi_wep_default_key 0 00 00 00 00 00 200 200 200 DoclDO25531 Rev 5 00 00 00 00 00 00 00 00 00 00 200 00 00 00 00 00 00 00 00 00 00 00 00 00 00 200 00 200 00 00 00 00 00 00 00 00 3 UM1695 Command reference wifi_wpa_psk_raw 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0
33. lt fname gt Delete an existing file AT S FSL List existing filename s AT S FSP lt fname gt lt offset gt lt length gt Print the contents of an existing file AT S GPIOC lt num gt lt in out gt lt 0 R F B gt Configure specified GPIO Optional IRQ AT S GPIOR lt num gt Read specified GPIO AT S GPIOW lt num gt lt val gt Write specified GPIO AT S DAC lt 0 value gt Disable Enable DAC on GPIO15 AT S ADC raw Read raw ADC value on GPIO8 AT S PWM frequency duty_cycle Set PWM on GPIO1 AT S WIFI lt 0 1 gt Disable Enable WiFi AT S ROAM Trigger a WiFi Roam AT S SCAN lt a p gt lt r gt Perform a scan lt active passive gt lt duplicated values filter off gt Default is active filter on AT S SSIDTXT lt ssidtxt gt Set a textual SSID not hex otherwise prints current SSID AT S PEERS peer_number peer_var Dump contents of the peer table AT S TLSCERT lt f_ca f_cert f_key gt lt length gt Configure SSL TLS certificates AT S TLSCERT2 clean lt f_ca f_cert f_key f_domain all gt Cleanup SSL TLS certificates resources AT S TLSDOMAIN lt f_domain gt lt ca domain name gt Set CA domain name It must match the secured site name EXACTLY AT S SOCKD lt 0 port gt lt t u gt Disable Enable socket server Default is TCP AT S SOCKON lt hostname gt lt port gt lt t u s gt ind Open a ne
34. me used for secure socket connections The module reference time must be initialized after each module reset The time refers to UTC format and must be expressed as the time in seconds since 1970 Jan 01 Refer to the SSL TLS Application Note for details Arguments lt time_in_sec gt set the reference time in seconds AT S SOCKD enable disable the socket server The SOCKD command enables the socket server listening on incoming connection on the xxx port When the port argument is equal to zero the command is used to turn off the socket server Arguments lt port gt server listening port from 1 to 65634 0 to disable the socket server lt protocol gt t for TCP u for UDP protocol Default is TCP Example Listening on port 32000 using TCP AT S SOCKD 32000 lt CR gt lt CR gt lt LF gt OK lt CR gt lt LF gt Listening on port 32000 using UDP AT S SOCKD 32000 u lt CR gt lt CR gt lt LF gt OK lt CR gt lt LF gt Turn off the socket server AT S SOCKD 0 lt CR gt lt CR gt lt LF gt OK lt CR gt lt LF gt AT S command mode to data mode The AT S command allows switching from command mode to data mode Arguments lt none gt DoclDO25531 Rev 5 19 46 Command reference UM1695 Note 2 24 Note 20 46 The switch from data mode to command mode switch can be done by using the at s escape sequence This sequence can be customized by using the escape_seq co
35. nfiguration variable The sequence is case sensitive and it must be sent in a single complete packet with no CR or LF in the sequence Example WIND 59 Back to Command Mode lt CR gt lt LF gt AT S lt CR gt lt CR gt lt LF gt WIND 60 Now in Data Mode lt CR gt lt LF gt AT S HTTPGET issue an HTTP GET AT S HTTPGET performs a single HTTP GET request to the named host and path The GET request and server response are printed on the module s console Any url encoding required for special characters in the lt path amp queryopts gt argument must be performed by the host prior to command submission NOTE the lt cr gt lt lf gt pairs in the example responses below are part of the data sent from the server and not inserted by the module Arguments lt hostname gt Target host DNS resolvable name or IP address lt path amp queryopts gt document path and optional query arguments lt port gt Target host port Optional Example AT S HTTPGET host example com index html lt cr gt GET index html HTTP 1 0 User Agent SPWFO01S Host 192 168 0 103 Connection close HTTP 1 0 200 OK Server lwIP 1 3 1 http savannah nongnu org projects lwip Content type text html lt html gt lt head gt lt title gt SPWF01Sx 11 lt title gt lt head gt lt body bgcolor white text black gt lt hi gt ST SPWFO1Sx 11 WiFi Module lt h1 gt lt p gt Welcome to the ST SPWFO1SX 11 WiFi Module lt p gt 3 Do
36. or alignment with commands and alae EO IE 2 variables introduced in the release 3 1 of AT full stack 08 Oct 2014 3 Minor changes Deleted the Appendix A 28 Nov 2014 4 Minor changes related to fix introduced in the release 3 3 Changes throughout the document related to features 21 May 2015 5 introduced in release 3 4 of the AT full stack see Table 1 DoclD025531 Rev 5 45 46 UM1695 IMPORTANT NOTICE PLEASE READ CAREFULLY STMicroelectronics NV and its subsidiaries ST reserve the right to make changes corrections enhancements modifications and improvements to ST products and or to this document at any time without notice Purchasers should obtain the latest relevant information on ST products before placing orders ST products are sold pursuant to ST s terms and conditions of sale in place at the time of order acknowledgement Purchasers are solely responsible for the choice selection and use of ST products and ST assumes no liability for application assistance or the design of Purchasers products No license express or implied to any intellectual property right is granted by ST herein Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for such product ST and the ST logo are trademarks of ST All other product or service names are the property of their respective owners Information in this document supersedes and rep
37. p allocation failed RequiredSize FreeSpace WIND 11 lt error gt Radio Initialization failure WIND 12 WiFi PS Mode Failure s d WIND 13 lt copyright information gt Radio Failed to enter power saving state s step d state Copyright information of SPWF01SX WIND 14 WiFi BSS Regained Radio regained association after loss WIND 15 WiFi Signal LOW d Radio low signal threshold triggered WIND 16 WiFi Signal OK d Radio signal level recovered WIND 17 F W update lt state gt Firmware update in progress WIND 18 Keytype d Not implemented WIND 19 WiFi Join m Encryption key type not recognized BSS join successful m BSSID WIND 20 JOINFAILED 04x BSS join failed x status code WIND 21 WiFi Scanning Radio is scanning for a BSS that matches the currently configured SSID Note WIND hidden when fast reconnect is performed WIND 22 SCANBLEWUP Radio failed to accept scan command WIND 23 SCANFAILED 04x WIND 24 WiFi Up i Radio failed to execute scan command Radio has successfully connected to a BSS and initialized the IP stack i IP Address 3 DoclD025531 Rev 5 41 46 Asynchronous indication reference UM1695 42 46 Table 8 Asynchronous indication messages continued Indication WIND 25 WiFi Association with s successful Notes Radio successfully associated to the s BSS
38. serial 1214003 TEXT 32 Manufacturer serial number nv_wifi_macaddr 02 4D 53 4D 00 01 HEXI6 Manufacturer assigned 02 MAAG Address The following table lists the configuration data variables DoclDO25531 Rev 5 31 46 Configuration variable reference UM1695 32 46 Table 5 Configuration data variables Variable blink_led Sample value 0 INT Type Description Enable disable the blinking LED default 0 In MiniAP the blinking indicates the number of clients associated to the module wind_off_low 0x00000000 INT Wind 0 31 mask OxFFFFFFFF are disabled all the 32 Wind indicator wind_off_medium 0x00000000 INT Wind 32 63 mask wind_off_high 0x00000000 INT Wind 64 95 mask user_desc anonymous TEXTIGA Free form textual field for host use used as basic authentication during Mini AP configuration escape seg atts TEXT 7 Escape sequence from data mode to command mode max 7 chars localecho1 console1_speed 1 INT 115200 INT Echo command input O off 1 on Serial port speed from 9600 to 921600 default 115200 console1_hwfc 0 INT Hardware flow control O off 1 0n console1_enabled sleep_enabled 1 INT 0 INT Enable console on UART1 Enable disable the sleep mode standby_enabled 0 INT Enable disable the standby mode standby_time wifi_tx_msdu_lifetime 10 INT 0 INT S
39. t 1lf gt OK lt cr gt lt 1f gt AT S ROAM trigger Wi Fi reassociation sequence AT S ROAM tells the module to disassociate from its current access point and to re acquire the network This is particularly useful if the network settings have been changed and a DoclD025531 Rev 5 ky UM1695 Command reference reboot is not desired The function is not active when the module is configured in Mini AP mode Arguments none Example AT S ROAM lt cr gt lt cr gt lt lf gt 0K lt cr gt lt lf gt 2 33 AT S GPIOC configure general purpose inputs outputs AT S GPIOC is used to configure the function of the various GPIOs on the module GPIOs can be configured as inputs or outputs Additionally inputs can be configured to generate an indication when their state changes Hint Use an external pull up pull down connected to a given GPIO to prevent unwanted commutations Arguments lt num gt GPIO Number 0 15 on the SPWF01SX 11 lt direction gt in or out lt interrupt gt Optional parameter 0 Off R Rising edge F Falling edge B Both rising and falling edges Example AT S GPIOC 7 out lt cr gt lt cr gt lt lf gt 0K lt cr gt lt lf gt AT S GPIOC 11 in B lt cr gt lt cr gt lt lf gt 0K lt cr gt lt lf gt 2 34 AT S GPIOR query general purpose input 3 AT S GPIOR is used to read the value and the direction of a previously configured GPIO Arguments lt num gt GPIO Number 0 15 on SPWFO1SX DoclDO25531 Re
40. table characters NOTE due to the SPWFO1SX command parser s use of the comma character as an argument delimiter any SSID containing a comma must be set as a sequence of hexadecimal octets using the AT S SCFG command Arguments lt ssid gt Textual SSID 1 32 characters Example AT S SSIDTXT AnSSID lt cr gt lt cr gt lt lf gt 0K lt cr gt lt lf gt AT S GCFG wifi_ssid lt cr gt wifi ssid 41 6E 53 53 49 44 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 lt cr gt lt 1f gt lt cr gt lt lf gt OK lt cr gt lt 1lf gt AT S GCFG wifi_ssid_len lt cr gt wifi ssid len 6 lt cr gt lt l1f gt lt cr gt lt 1lf gt OK lt cr gt lt 1f gt Example AT S SSIDTXT lt cr gt SSID AnSSID lt cr gt lt cr gt lt 1lf gt OK lt cr gt lt 1f gt AT amp V display all configuration values AT amp V prints the name and value of all configuration variables in the module Arguments none Example AT amp V lt cr gt Dumping All Configuration Keys nv manuf ST nv model SPWFOLS nv serial 0813015002 nv wifi macaddr 00 80 E1 AA B9 BA blink_led 0 DoclDO25531 Rev 5 11 46 Command reference UM1695 12 46 Sp ME MH MH HEHEHE HEHEHE HR ME MH ME MH HR E E HH wind off low 0x0000 wind off medium wind off high 0x000 user desc anonymous escape seg atts localechol 0 consolel_speed 1152 consolel_hwfc 0 consolel_enabled 1 s
41. tandby mode time in seconds Up to 2321 sec MSDU lifetime From 0 to 232 1 TUs 1 TUs 1024us Zero is default automatic wifi_rx_msdu_lifetime 0 INT MSDU lifetime From 0 to 232 1 TUs 1 TUs 1024us Zero is default automatic wifi_operational_ mode 0x00000011 INT Allows choosing Doze 11 or quiescent 12 power device modes DoclD025531 Rev 5 ky UM1695 Configuration variable reference Table 5 Configuration data variables continued Variable Sample value Type Description Set the wakeup interval of the WLAN device from 1 wifi_beacon_wakeup 1 INT to 255 if wifi_listen_interval 0 from 1 to 65535 if wifi_listen_interval 1 Beaconing interval in wifi_beacon_interval 100 INT MiniAP mode from 0 to 216 1 Define the wakeup mode 0 sleep up to the wifi_listen_interval 0 INT beacon_wakeup specified 1 sleep at least to the beacon_wakeup specified Frame size over which wifi_rts_threshold 3000 INT RTS CTS is used Limit from 0 to 3000 50 72 6F 64 75 63 74 69 6F 6E Desired SSID specified in 31 00 00 00 00 hex All 32 octets should wifi_ssid 00 00 00 00 00 HEX 32 be written Note that 00 00 00 00 00 wifi_ssid_len must also be 00 00 00 00 00 set 00 00 Length of the actual SSID Mn len u pu in the 32 byte buffer Maximum number of lost wifi_txfail_thresh 5 INT packets before disassociation wifi_ht_mode 0
42. ten_interval 0 atts scfg sleep_enabled 1 at s scfg wifi_powersave 1 Sleep CFUN 3 Stop PS or Fast PS at s scfg wifi_operational_mode 11 at s scfg wifi_beacon_wakeup 1 atrs scfg wifi listen interval 0 Atrs scfg standby enabled 1 Standby CFUN 4 Standby Standby Atts scfg standby_time 10 atrs scfg sleep enabled 0 Example AT CFUN 1 lt cr gt lt cr gt lt 1f gt WIND 2 Reset lt cr gt lt l1f gt 2 3 AT S HELP display help text AT S HELP prints a list of all commands supported with a brief help text for each command Arguments 3 8 46 DoclDO25531 Rev 5 UM1695 Command reference ky none Example AT S HELP lt cr gt Recognized commands AT Null cmd always returns OK AT CFUN lt 0 1 2 3 4 gt Enable common functionalities AT S Switch to data mode AT S HELP This text AT amp F Restore factory default settings AT amp V Dump all settings AT amp W Save current settings to flash AT S GCFG lt key gt Get config key AT S SCFG lt key gt lt value gt Set config key AT S STS lt sts_var gt Report current status statistics AT S SETTIME lt time_in_sec gt Set current time AT S FSC lt fname gt lt max_len gt lt http_header gt Create a file for httpd use AT S FSA lt fname gt lt datalen gt lt CR gt lt data gt Append to an existing file AT S FSD
43. tic usage DHCP off IP default gateway for static usage DHCP off DoclDO25531 Rev 5 ky UM1695 Configuration variable reference 3 Table 5 Configuration data variables continued Variable Sample value Type Description IP DNS server for static ip_dns 192 168 0 1 IP usage DHCP off ip_http_get_recv_timeo 1000 INT HTTP GET connection ut timeout in milliseconds ip_wait_timeout 12000 INT Amount or umen time_wait state ip_dhcp_timeout 20 INT DHCP client timeout in seconds Socket server buffer timeout management from 5 to 250 ip_sockd_timeout 250 INT ed Warning 250 ms is suggested to avoid data loss DoclDO25531 Rev 5 37 46 Status variable reference UM1695 4 38 46 Status variable reference Table 6 Status variable Variable Sample value Description 140128 caf4b79 version SPWF01S SPWFO1S Software Version H W reported reason for last reset 0 POWER ON reset reason 2 1 WATCHDOG 2 SOFT RESET 3 LOW POWER conf_flag 5 Module HW revision system_uptime 22006 System running time in seconds system_sleeptime 500 System sleeping time in seconds Interrupt enabled GPIO bitmask expressed in gpio_enable 0 base 10 captiveportal 1 Mini AP enabled disabled 0 Hardware power up 1 Hardware failure 2 Radio task terminated by user 3 Radio idle 4 Scan in progress wifi_state 10 5 Scan
44. ting the define APPEND_HEADER Arguments none Example D 1965 wifidemo html 461 input_demo shtml 180 message shtml 384 output demo html 614 index html 157 peers shtml 193 config shtml 174 status shtml 212 4A04 html 2022 firstset html H H H H H HHHH DoclDO25531 Rev 5 23 46 Command reference UM1695 2 30 2 31 2 32 24 46 I 2898 remote html OK AT S FSP Print the contents of an existing file AT S FSP prints the contents of an existing file Arguments lt fname gt Filename lt offset gt Offset from where the file is printed Optional lt len gt Lenght in bytes Mandatory if Offset is specified Example AT S FSP t2 json lt cr gt HTTP 1 0 200 OK lt cr gt lt 1f gt Server MyProduct lt cr gt lt lf gt Connection close lt cr gt lt l1f gt Content Type application json lt cr gt lt lf gt lt cr gt lt lf gt lt cr gt lt lf gt lt cr gt lt lf gt device lt cr gt lt lf gt name SPWFO1SX 11 lt cr gt lt 1lf gt serial 802 11n lt cr gt lt lf gt lt cr gt lt lf gt lt cr gt lt lf gt lt cr gt lt 1lf gt OK lt cr gt lt 1f gt AT S WiFi enable disable Wi Fi device AT S WIFI allows the radio to be enabled or disabled at runtime Please note that the configuration variable wifi_mode controls the state of the radio at powerup Arguments 0 or 1 for disabled or enabled respectively Example AT S WIFI 0 lt cr gt lt cr gt l
45. tion data variables continued Variable wifi_wpa_psk_text Sample value a_psk_pass Type TEXT 64 Description WPA 2 PSK passphrase if set the actual PSK will be generated from this Used in STA IBSS and MiniAP ip_use_dhcp ip_use_httpd INT INT DHCP server on off Used in STA IBSS and MiniAP O off in STA mode the variables ip_ipaddr ip_netmask and ip_gw must be properly set to connect to the AP 1 on in STA mode the ipaddr netmask and gw will be provided by the AP 2 on amp customize in MiniAP mode user can customize the ip_ipaddr of the MiniAP the ip_address of the client is automatically assigned by the MiniAP HTTP server on off O off 1 on ip_mtu 1500 INT IP maximum transmission unit size Limit from 634 to 2412 1500 for maximum compatibility with Ethernet networks ip hostname iwm 02 09 97 TEXT 32 IP local hostname ip_apdomainname captiveportal net TEXT 32 IP domain name in Mini AP mode If the AP domain name is not quickly opened it s suggested to turn off an eventual proxy server check the connection settings of the device or the browser preferences ip_apredirect firstset html TEXT 16 Default homepage opening the ip apdomainname in miniAP ip_ipaddr 192 168 0 50 IP address for static usage DHCP off ip_netmask ip_gw 255 255 255 0 192 168 0 1 IP netmask for sta
46. trength of last received packet rx_rateidx 0 Rate index of last received packet setprot 0 Bitmask to indicate protection for TX bit 1 and or RX bit 0 IEEE 802 11 frames listen_interval 10 AP reported listen interval capinfo 0x00000000 Information about the AP capabilities DoclDO25531 Rev 5 3 UM1695 Asynchronous indication reference 5 Asynchronous indication reference SPWF01SX modules can output asynchronous indications at any time except while an AT command is in progress The format for all asynchronous indications is lt cr gt lt 1f gt WIND lt num gt lt description gt lt cr gt lt 1lf gt Table 8 Asynchronous indication messages Indication WIND 0 Console active Notes Console task is running and can accept AT commands WIND 1 Poweron s Initial powerup indication with f w version WIND 2 RESET System reset is being asserted triggered WIND 3 Watchdog Running Watchdog task initialized and running WIND 4 Heap too small Selected heap allocation is too small for normal operation WIND 5 WiFi Hardware Failure d WiFi Radio Failure reset pending WIND 6 Watchdog Terminating reset pending Watchdog reset asserted WIND 7 SysTickConfigure WIND 8 Hard Fault Failure to configure System Tick Clock OS hard fault detected WIND 9 StackOverflow OS stack overflow detected WIND 10 MallocFailed d d OS hea
47. twork socket AT S SOCKQ lt id gt Query socket for pending data DoclD025531 Rev 5 9 46 Command reference UM1695 2 4 2 5 10 46 AT S SOCKC lt id gt Close socket AT S SOCKW lt id gt lt len gt Write data to socket AT S SOCKR lt id gt lt len gt Read data from socket AT S HTTPD lt 0 1 gt Disable Enable web server Hh MH ME OE HE AT S HTTPGET lt hostname gt lt path amp queryopts gt port Http GET of the given path to the specified host port AT S HTTPPOST lt hostname gt lt path amp queryopts gt lt formcontent gt port Http POST of the given path to the specified host port AT S HTTPDFSERASE Erase the external httpd filesystem AT S HTTPDFSUPDATE lt hostname gt lt path amp queryopts gt port Download a new httpd filesystem from the specified host port AT S FWUPDATE lt hostname gt lt path amp queryopts gt port Upgrade the onboard firmware from the specified host port AT S PING lt hostname gt Send a ping to a specified host OK AT S GCFG get configuration value AT S GCFG prints the value of one named configuration variable See Chapter 3 Configuration variable reference for a list of available variables AT amp V provides the list of all variables and values on a running module Arguments lt key gt Name of the configuration variable Example AT S GCFG ip_ipaddr lt cr gt ip ipaddr 192 1
48. v 5 25 46 Command reference UM1695 2 35 2 36 Note 26 46 Example at s gpior 4 lt CR gt GPIO 4 0 in lt CR gt lt LF gt lt CR gt lt LF gt OK lt CR gt lt LF gt AT S GPIOW set general purpose output AT S GPIOW is used to set the value of a previously configured GPIO Arguments lt num gt GPIO Number 0 15 on the SPWF01SX lt value gt 0 or 1 for off and on respectively Example AT S GPIOW 7 1 lt cr gt lt cr gt lt 1lf gt OK lt cr gt lt 1f gt AT S FWUPDATE perform a firmware update AT S FWUPDATE downloads an updated firmware image via a single HTTP GET request to the named host and path much like the AT S HTTPGET command The SPWFO1SX 11 will validate the firmware image it downloads load it into a staging area then prompt the user to issue a reset command in order to complete the update A restoring of factory default settings AT amp F is mandatory after every FW update Command only enabled on the module s versions SPWFO1Sx 1y Arguments lt hostname gt Target host DNS resolvable name or IP address lt path amp queryopts gt document path and optional query arguments lt port gt Target host port Optional Example AT S FWUPDATE host example com 1203 120918_01 o0ta lt cr gt Staging F W update for SPWFO1SX 11 version 1203 120918 01 F W length 276824 0x00002800 offset 0x00000000 block len 4096 Write len 4096 gt 0x0 Write len 4096 gt 0x1000 Write len 4096 gt
Download Pdf Manuals
Related Search
Related Contents
Laser Distance Meter LDM70 User Manual MONITEUR DE CRISES ÉPILEPTIQUES TONICO 030073_Manual Combinado_Rev 19_06_2015.cdr MBS A USB SERIES Altina A600 User's Manual DESIGN – Horloge murale radio pilotée samsung clp775nd Betriebsanleitung - Stoewer Téléviseur LED Incurvé UE40JU6570 L`immersion en 取扱説明書 - エー・アンド・デイ Copyright © All rights reserved.
Failed to retrieve file