Beijing Winner Microelectronics WMSP02 WIFI module User Manual

Beijing Winner Microelectronics Co., Ltd. WIFI module

User manual

                                    Beijing Winner Microelectronics Co., Ltd.             AT Command User Manual V1.0.0                     Beijing Winner Microelectronics Co., Ltd.     Addr: 7th floor, Zhixing Building, No.3 Shangyuancun, Haidian District, Beijing, P.R.China Tel: +86-10-62161900 Company Website: www.winnermicro.com
                                    Beijing Winner Microelectronics Co., Ltd. Document history Version Completion Date Revision Record Author Review Approval V1.0.0 2015-10-12 Draft Zhang Pengfei
                                      Beijing Winner Microelectronics Co., Ltd. Content 1 Introduction ....................................................................................................................................................... 2 1.1 Overview ...................................................................................................................................... 2 1.2 Control command protocol ........................................................................................................... 2 1.2.1 Command code ..................................................................................................................... 2 1.2.2 Error code ............................................................................................................................. 5 2 AT Command Protocol ................................................................................................................................. 5 2.1 Syntax introduction ...................................................................................................................... 5 2.1.1 Syntax format ....................................................................................................................... 6 2.2 Command set ................................................................................................................................ 9 2.2.1 System control type .............................................................................................................. 9 2.2.2 Parameter setting type ........................................................................................................ 13 2.2.3 Network control class ......................................................................................................... 28 2.2.4 System debug type .............................................................................................................. 39 3 Common operation ..................................................................................................................................... 43 3.1 Create AP process ....................................................................................................................... 43 3.2 Scan AP process ......................................................................................................................... 44 3.3 STA joins AP process ................................................................................................................. 44 3.4 How to disconnect AP by STA ................................................................................................... 45 3.5 How to view the current status by STA ...................................................................................... 45 3.6 How to use socket function ........................................................................................................ 45
                                      Beijing Winner Microelectronics Co., Ltd. 1 Introduction 1.1 Overview This  manual  describes  the  AT+  command  communication  protocol  of  Winner  Micro’s Embedded Wi-Fi chip. AT + command protocol is a command format based on ASCII command style, communication via the UART interface with Wi-Fi chip.  1.2 Control command protocol 1.2.1 Command code The  content  of  this  part  is  the  user  command,  which  shall  be  open  to  end  users  of  the products  for  achieving  product  parameter  configuration,  networking  transmission  and  other functions, the command list is as follows:  Command Name Use 1.  (null) Null   2.  ATLT Set/query the automatic framing data length 3.  ATM Set/query operating mode of the module   4.  ATPT Set/query the automatic framing period   5.  ATRM Set/query socket connection message automatically created by the module in automatic operating mode   6.  BSSID Set/query BSSID address of target AP   7.  BRDSSID Enable and disable AP SSID broadcast 8.  CHL Set/query target wireless channel number   9.  CHLL Set/query wireless channel list   10.  CMDM Set/query the system's default command mode   11.  DNS Set NIC domain   12.  E Switch serial characters echo   13.  ENCRY Set/query encryption mode of wireless network   14.  ENTM Set the module into the serial transparent transmission mode
                                      Beijing Winner Microelectronics Co., Ltd. 15.  ENTS Enter the sleeping mode   16.  ESPC Set/query escape character used to exit the transparent transmission mode   17.  ESPT Set/query escape time used to exit the transparent transmission mode   18.  IOM Set/query GPIO mode   19.  KEY Set/query key of the wireless network   20.  LKSTT Query the network connection status   21.  LKSTT2 Query the network connection status2, apsta mode is valid   22.  NIP Set/query local IP address 23.  PASS Set/query system password   24.  PMTF Update all the parameters in memory to Flash   25.  QMAC Query the physical address   26.  QMAC2 Query the physical address2, apsta mode is valid   27.  QVER Query version information   28.  RSTF Factory Default Setting   29.  SKCLS Close socket connection   30.  SKCT Create socket connection   31.  SKRCV Receive data through socket connection 32.  SKSDF Set default sending socket connection   33.  SKSND Send data through socket connection 34.  SKSTT Query socket connection status   35.  SSID Set/query SSID   36.  SSID2 Set/query SSID2, apsta mode is valid 37.  UART Set/query serial data format   38.  WARC Set/query automatic retry times in the automatic operating mode   39.  WARM Set/query wireless roaming   40.  WATC Set/query automatically create Ad hoc network   41.  WBGR Set/query wireless BG mode and the maximum transmission rate   42.  WEBS Set/query Web server
                                      Beijing Winner Microelectronics Co., Ltd. 43.  WJOIN Join/create a wireless network   44.  WLEAV Disconnect the wireless network   45.  WPRT Set/query wireless network mode   46.  WPSM Turn on/off power saving mode   47.  WSCAN Scan the network   48.  Z Reset   49.  SKSRCIP Query socket data source IP address 50.  SKRPTM Turn on/off socket initiative sending and receiving data function 51.  ONESHOT  Turn on/off one-shot configuration function 52.  HTTPC http post get data function 53.  SKGHBN Get the server IP. 54.  WREG Set/query wireless channel national region 55.  AOLM Set/query the always-online mode of the module (Note, this mode is only valid when the module is in automatic operation mode and the network type is STA). 56.  PORTM Set the module interface Function:0 serial; 1 high-speed serial; 2 SPI interface 57.  UPNP Set upnp (close/enable);   58.  WWPS Set/query WPS function 59.  CUSTDATA Receiving user data via one-shot configuration tool 60.  CNTPARAM Query network configuration parameters 61.  SLIST Query the sta information already connected. Valid only in ap, apsta mode  The  content  of  this  section  is  reserved  as  a  system  command  only  for  manufacturers  to implement products maintenance and test function, the command list is as follows: AT+ commnad Function &DBG Set the system debugging mode &REGR Read register or internal RAM space
                                      Beijing Winner Microelectronics Co., Ltd. &REGW Modify register or internal RAM space &RFR Read RF register space &RFW Modify RF register space &FLSR Read SPI Flash address space &FLSW Modify SPI Flash address space &UPDM Set the user interface (UART/SPI) firmware upgrade mode &UPDD Send firmware upgrade data &UPDP Setting factory parameters 1.2.2 Error code The error code supported by this system is defined as follows, which  applies to response message in AT + command protocol: ASCII Meaning - Success -1 Invalid command format   -2 Command is not supported   -3 Invalid operation symbol   -4 Invalid parameter   -5 Operation not permitted   -6 Lack of Memory   -7 FLASH Error   -10 Failed to Join the Network   -11 No Available Socket   -12 Invalid Socket   -13 Socket Connection Failed   -100 Undefined Error  2 AT Command Protocol 2.1 Syntax introduction This  module uses  AT + command  protocol as  the  user control  protocol.  AT + command protocol  is  a  command  format  based  on  ASCII  command  style.  Its  syntax  format  and management process is described as follows.
                                      Beijing Winner Microelectronics Co., Ltd. 2.1.1 Syntax format  Format description <>: Indicates the part must be included []: Indicates the optional part  Command message AT+<CMD>[op][para1],[para2],[para3],[para4]…<CR> AT+: Command message prefix CMD: Command string   [op]  :  Command  operator,  when  the  command  requires  parameter,  it  can  specify  the operation type of parameters, including, =, Parameter/returned value prefix characters =!,  Synchronize  the  modified  parameter  to  flash  in  the  command  of  parameter setting type =?, Query the current setting in the command of parameter setting type <CR> : Enter. It is 0x0d in ASCII  Response message +<RSP>[op][para1],[para2],[para3],[para4]…<CR><LF><CR><LF> +: Response message prefix RSP: Response string   OK      Success   ERR    Failure <CR>: Enter. It is 0x0d in ascii <LF>: Newline. It is 0x0a in ascii  Data type String:  String,  enclosed  by  double  quotation  marks,  but  the  content  does  not  include  the quotation marks, such as “this is a string”. Dec: Number in decimalist, such as 10 Hex: Number in hexadecimal, such as a Ip: IP address string, such as 192.168.0.1 MAC: Formed with 12 hexadecimal numbers, such as 001EE3A80102
                                      Beijing Winner Microelectronics Co., Ltd. 2.1.1.1 Process flow AT+  command  protocol  uses  the  form  of  command+  response.  The  vast  majority  of commands need the response messages returned by the receiver after the completion of process. If the previous command is processing and a new command is received again, it will be silently discarded without returning any news, as shown below.   For certain special commands, such as AT + SKSND, AT + SKRCV, binary data shall be transmitted after the command or response, at this time, the data receiver temporarily turns into the transparent transmission mode and starts to receive the binary data flow until it receives the data length specified by the <size> field of command or message or waits for timeout, and then it automatically exits transparent transmission status, the process is shown as follows.
                                      Beijing Winner Microelectronics Co., Ltd. 2.1.1.2 Format examples Example 1: Responsing successful message  Example 2: Responsing failure message  Example 3: Using input parameter  Example 4: Using parameter sync to Flash operator <!>  Example 5: Using query operator <?>  2.1.1.3 Error code  Value Meaning   -1 Invalid command format   -2 Command is not supported   -3 Invalid operation symbol   AT+ATPT=? +OK=500  AT+ATPT=!500 +OK  AT+UART=9600,1,1,0 +OK AT+WJOIN +ERR=-10  AT+ +OK
                                      Beijing Winner Microelectronics Co., Ltd. -4 Invalid parameter   -5 Operation not permitted   -6 Lack of Memory   -7 FLASH Error   -10 Failed to Join the Network   -11 No Available Socket   -12 Invalid Socket   -13 Socket Connection Failed   -100 Undefined Error 2.2 Command set 2.2.1 System control type 2.2.1.1 AT+ Function: Null command, to detect whether there is a normal response of the program. Format (ASCII):   AT+<CR> +OK<CR><LF><CR><LF> Parameter:    None  2.2.1.2 AT+Z Function: Reset system. Format (ASCII): AT+Z<CR> +OK<CR><LF><CR><LF> Parameter:    None
                                      Beijing Winner Microelectronics Co., Ltd.  2.2.1.3 AT+E Function: Switch serial command echo. Format (ASCII): AT+E<CR> +OK<CR><LF><CR><LF> Parameter:    None  2.2.1.4 AT+ENTS Function:   The  system  enters  in  sleeping  mode.  The  system  will  be  automatically  awaked  after receiving any at+ in sleeping state. Format (ASCII): AT+ENTS=[ps_type],[wake_type],[delay_time],[wake_time]<CR> +OK<CR><LF><CR><LF> Parameter:    ps_type: power saving type   Value Meaning 0 Sleep 1 Standby wake_type: awake type Value Meaning 0 gpio 1 Timer0 delay_time: delay time, only valid when timer0 wake, unit ms, 100  ~10000ms wake_time: wake time, only valid when timer0 wake, unit ms, 1000  ~65535ms
                                      Beijing Winner Microelectronics Co., Ltd.  2.2.1.5 AT+ENTM Function:   Serial enters in the transparent transmission mode. In the transparent transmission mode, the system will exit this mode while receiving escape character in line with the trigger conditions. Note: before entering the transparent transmission mode, 1、ensure networking, 2、create a socket, 3、set the default connection of the transparent transmission is the current created socket. Format (ASCII): AT+ENTM<CR> +OK<CR><LF><CR><LF> Parameter:    None  2.2.1.6 AT+RSTF Function:   Return to the factory setting in FLASH. The system needs to restart and then the setting will become effective. Format (ASCII): AT+RSTF<CR> +OK<CR><LF><CR><LF> Parameter:    None  2.2.1.7 AT+PMTF Function: All the parameters stored in memory shall be updated to FLASH to ensure that USER defined parameter won’t disappear after power down. Format (ASCII):
                                      Beijing Winner Microelectronics Co., Ltd. AT+PMTF<CR> +OK<CR><LF><CR><LF> Parameter:    None  2.2.1.8 AT+QMAC Function:   Acquire the physical address of the module. Format (ASCII): AT+QMAC<CR> +OK=<mac address><CR><LF><CR><LF> Parameter:  mac address: The length is 12 hexadecimal numbers, the format is 001EE3A34455  2.2.1.9 AT+QMAC2 Function:   Acquire the soft ap physical address of the module created in apsta mode. Format (ASCII): AT+QMAC2<CR> +OK=<mac address><CR><LF><CR><LF> Parameter:  mac address: The length is 12 hexadecimal numbers, the format is 001EE3A34455  2.2.1.10 AT+QVER Function:   Acquire the system version information, including hardware version and firmware version. Format (ASCII): AT+QVER<CR> +OK=<hard,firm,time,date><CR><LF><CR><LF>
                                      Beijing Winner Microelectronics Co., Ltd. Parameter:  hard: hardware version information, string format, such as “H1.00.00.1029”   firm: firmware version information, string format, such as “ F0.02.02@ 18:25:25 Jul 28 2010” time: time of firmware creation date: date of firmware creation  2.2.2 Parameter setting type 2.2.2.1 AT+NIP   Function:   When the module is STA, this command is used to set/query the local ip address. It should be noted that when the address type is set to DHCP, the actual dynamic IP address information of the module can’t be queried by using this  command. AT+LKSTT command can be used to query.   When the module as AP, this command is used to set/query the local ip address, enable and disable  DHCP  Server.  It  means that  the  meaning  of the  command  “type”  field  in  AP  mode  is different  from  that  in  STA  mode.  IP  address  of  the  module  may  be  queried  by  using  this command in enable DHCP Server. Format (ASCII): AT+NIP=[!?][type],[ip],[netmask],[gateway],[dns]<CR> +OK[=type,ip,netmask,gateway,dns]<CR><LF><CR><LF> Parameter:  type: address type Value Meaning 0 Use DHCP to dynamically allocate/enable DHCP Server   1 Use a static IP address/disable DHCP Server   ip: ip address, data format is “192.168.1.22”, without the quotation marks netmask: subnet mask, data format is in line with ip address gateway: gateway address, data format is in line with ip address dns: DNS address, data format is in line with ip address
                                      Beijing Winner Microelectronics Co., Ltd. 2.2.2.2 AT+DNS Function:   Set/query NIC module domain name, the setting is effective only when the module is AP. Format (ASCII): AT+DNS=[!?][dnsname]<CR> +OK[=dnsname]<CR><LF><CR><LF> Parameter:  dns  name:  NIC  module  domain  name,  1~31  characters  and  surrounded  by  double  quotation marks.  2.2.2.3 AT+ATM Function:   Set/query the operating mode of the module. Format (ASCII): AT+ATM=[!?][mode]<CR> +OK[=mode]<CR><LF><CR><LF> Parameter:  mode: operating mode Value Meaning 0 Automatic mode   1 Command mode    2.2.2.4 AT+ATRM Function:   Set/query  the  socket  connection  information  automatically  created  by  the  module  in automatic operating mode. Format (ASCII): AT+ATRM=[!?][protocol],[cs],[host/timeout],[port]<CR> +OK[=protocol,cs, host/timeout,port]<CR><LF><CR><LF>
                                      Beijing Winner Microelectronics Co., Ltd. Parameter:  protocol: protocol type, Value Meaning 0 TCP 1 UDP cs: C/S mode, Value Meaning 0 Client 1 Server   host_timeout: According to the protocol and cs, the meanings are respectively as follows. cs protocol Meaning 0 X The target server name, input domain name or ip address, such as “192.168.1.100” or “www.sina.com.cn” 1 0 TCP  connection  timeout  period,  the  client connecting  to  this  server  will  be  automatically kicked  off  if  it  does  not  send  any  data  in  this period. The effective value range is1~10000000, unit: second, 0 means never, the default setting is 120 seconds 1 1 No meanings   port: port number  2.2.2.5 AT+SSID Function:  Set/query the wireless network name, that’s ssid. Format (ASCII): AT+SSID=[!?][ssid]<CR> +OK[=ssid]<CR><LF><CR><LF>
                                      Beijing Winner Microelectronics Co., Ltd. Parameter:  ssid:  the  wireless  network  name,  1~32  characters  and  surrounded  by  double  quotation marks.  2.2.2.6 AT+SSID2 Function:   Set/query the soft ap name of the module created in apsta mode, that’s ssid. Format (ASCII): AT+SSID2=[!?][ssid]<CR> +OK[=ssid]<CR><LF><CR><LF> Parameter:  ssid:  the  wireless  network  name,  1~32  characters  and  surrounded  by  double  quotation marks.  2.2.2.7 AT+ENCRY Function:   Set/query  wireless  network  encryption  mode.  It  should  be  specially  noted  that  other encryption  modes  except  OPEN  mode  need  to  set  correct  network  key  cooperating  with AT+KEY command. In addition, the module only supports setting OPEN, WEP64 and WEP128 in AP or AD-HOC mode. Format (ASCII): AT+ENCRY=[!?][encry mode]<CR> +OK[=encry mode]<CR><LF><CR><LF> Parameter:    encry mode: encryption mode Value Meaning 0 OPEN 1 WEP64 2 WEP128
                                      Beijing Winner Microelectronics Co., Ltd. 3 WPA-PSK(TKIP) 4 WPA-PSK(CCMP/AES) 5 WPA2-PSK(TKIP) 6 WPA2-PSK(CCMP/AES)  2.2.2.8 AT+KEY Function:   Set/query the network key. It should be noted that before using this command to set network key, the encryption mode must be firstly set by the command AT+ENCRY. Format (ASCII): AT+KEY=[!?][format],[index],[key]<CR> +OK[=format,index,key]<CR><LF><CR><LF> Parameter:  format: key format Value Meaning 0 HEX 1 ASCII index:  The  key  index  number,  1~4  is  used  in  WEP  encryption  key,  and  it’s  set  0  in  other encryption mode. key: Key string, it’s embedded in double quotation marks. According to the different encryption modes, key size and key format are defined as follows, Encryption mode Key format HEX ASCII WEP64 10 hexadecimal characters (Note 1)   5 ASCII characters (Note 2)   WEP128 26 hexadecimal characters   13 ASCII characters   WPA-PSK(TKIP) 64 hexadecimal characters   8 ~ 63 ASCII characters   WPA-PSK(CCMP/AES) 64 hexadecimal characters   8 ~ 63 ASCII characters   WPA2-PSK(TKIP) 64 hexadecimal characters   8 ~ 63 ASCII characters   WPA2-PSK(CCMP/AES) 64 hexadecimal characters   8 ~ 63 ASCII characters
                                      Beijing Winner Microelectronics Co., Ltd. Note 1: 16 hexadecimal characters represents 0 ~ 9, a ~ f (case insensitive), such as “11223344dd”   Note 2: ASCII character refers to numbers 0~9 and characters a ~ z (case-sensitive) in the standard ASCII character set specified by the International Organization for Standardization (ISO), such as “14u6E”  2.2.2.9 AT+BSSID Function:   Set/query specified bssid address of the target AP. This setting is effective only in the infra network when the module is STA. Format (ASCII):   AT+BSSID=[!?][mode],[bssid]<CR> +OK[=mode,bssid]<CR><LF><CR><LF> Parameter:  mode: BSSID mode Value Meaning 0 Automatic   1 Specified   bssid: network BSSID, the length is 12 hexadecimal numbers, the format is 001EE3A34455  2.2.2.10 AT+CHL Function:   Set/query the specified wireless channel mode. Format (ASCII): AT+CHL=[!?][mode],[channel]<CR> +OK[=mode,channel]<CR><LF><CR><LF> Parameter:  mode: channel mode Value Meaning 0 Automatic   1 Specified
                                      Beijing Winner Microelectronics Co., Ltd. channel: wireless channel number, the effective range is 1 ~ 14.  2.2.2.11 AT+CHLL Function:   Set/query  wireless  channel  list.  The  parameter  in  wireless  channel  list  is  used  to  specify working  channel  range  of  the  module,  channels  not  included  in  the  list  will  not  be  scanned. Reasonably using this parameter may speed up the module scanning and networking speed. Format (ASCII): AT+CHLL=[!?][channel list]<CR> +OK[=channel list]<CR><LF><CR><LF> Parameter:  channel list:  wireless  channel  list,  in  hexadecimal  format,  beginning  from  the  lowest  bit, each bit represents a channel, the default setting is 3fff, that represents all the 1~14 channels  2.2.2.12 AT+WPRT Function:   Set/query wireless network mode. Format (ASCII): AT+WPRT=[!?][type]<CR> +OK[=type]<CR><LF><CR><LF> Parameter:  type: network mode Value Meaning 0 infra network (the module as STA) 1 adhoc network 2 infra network (the module as AP) 3 infra network (the module as APSTA) 2.2.2.13 AT+WATC Function:
                                      Beijing Winner Microelectronics Co., Ltd.   Set/query  whether  to  automatically  create  the  enabled  adhoc  network.  This  setting  is effective only when the wireless network type is set to adhoc, which means whether to create an adhoc network with the same SSID when networking is failed. Format (ASCII): AT+WATC= [!?][enable]<CR> +OK[=enable]<CR><LF><CR><LF> Parameter:  enable: The symbol of enabling Value Meaning 0 Disabled 1 Enabled 2.2.2.14 AT+WPSM Function:   Turn on/off automatic power saving mode. Format (ASCII): AT+WPSM=[!?][enable]<CR> +OK[=enable]<CR><LF><CR><LF> Parameter:  enable: The symbol of enabling Value Meaning 0 Disabled 1 Enabled 2.2.2.15 AT+WARM Function:   Set/query whether to enable wireless roaming function, the setting is effective only in the infra network when the module as STA. Format (ASCII): AT+WARM=[!?][enable]<CR> +OK[=enable]<CR><LF><CR><LF>
                                      Beijing Winner Microelectronics Co., Ltd. Parameter:  enable: The symbol of enabling Value Meaning 0 Disabled 1 Enabled 2.2.2.16 AT+WARC Function:   Set/query  the  function  of  automatic  retry  after  the  wireless  network  is  disconnected  or networking is failed. This  parameter is  only effective in  the infra network that the  module as STA and the module is in the automatic operating mode. Format (ASCII):   AT+WARC=[!?][count]<CR> +OK[=count]<CR><LF><CR><LF> Parameter:  count: Times of Retry Value Meaning 0 No retry 1~254 Times of retry 255 Retry forever 2.2.2.17 AT+WBGR Function:   Set/query BG mode of the wireless network and the maximum sending rate. Format (ASCII): AT+WBGR= [!?][bg_mode],[max_rate]<CR> +OK[=bg_mode,max_rate]<CR><LF><CR><LF> Parameter:  bg mode: BG mode   Value Meaning 0 B/G mixed
                                      Beijing Winner Microelectronics Co., Ltd. 1 B max rate: The maximum sending rate, in B mode, only 0-3 is effective. Value Meaning 0 1 Mbps 1 2 Mbps 2 5.5 Mbps 3 11 Mbps 4 6 Mbps 5 9 Mbps 6 12 Mbps 7 18 Mbps 8 24 Mbps 9 36 Mbps 10 48 Mbps 11 54 Mbps 2.2.2.18 AT+BRDSSID Function:   Enable/disable AP SSID broadcast, and this setting is only valid when the module is as AP. Format (ASCII): AT+BRDSSID=[!?][enable]<CR> +OK[=enable]<CR><LF><CR><LF> Parameter:  enable: Whether to enable SSID broadcast Value Meaning 0 Disable AP SSID broadcast   1 Enable AP SSID broadcast    2.2.2.19 AT+UART Function:
                                      Beijing Winner Microelectronics Co., Ltd.   Set/query data format of uart interface. Format (ASCII): AT+UART=[!?][baudrate],[databit],[stopbit],[parity],[flowcontrol]<CR> +OK[=baudrate,databit,stopbit,parity]<CR><LF><CR><LF> Parameter:  baud rate: baud rate, the valid range is from 1200~115200,   Value Meaning 115200 115200 bps 57600 57600 bps 38400 38400 bps 19200 19200 bps 9600 9600 bps 4800 4800 bps 2400 2400 bps 1200 1200 bps data bit: data bits Value Meaning 0 8 bits   1 7 bits stop bit: stop bits Value Meaning 0 1 bit 1 Not support 2 2 bits parity: parity Value Meaning 0 No parity   1 Odd parity
                                      Beijing Winner Microelectronics Co., Ltd. 2 Even parity    2.2.2.20 AT+ATPT Function:   Set/query the automatic framing period of the data. This parameter is only effective in serial transparent transmission mode. Format (ASCII): AT+ATPT=[!?][period]<CR> +OK[=period]<CR><LF><CR><LF> Parameter:  period: automatic framing period, 50~10000ms, the unit is millisecond, the minimum step size is 50ms  2.2.2.21 AT+ATLT Function:   Set/query the automatic framing length of the data. This parameter is only effective in serial transparent transmission mode. Format (ASCII): AT+ATLT=[!?][length]<CR> +OK[=length]<CR><LF><CR><LF> Parameter:  length: automatic framing length, 32~1024 bytes  2.2.2.22 AT+ESPC Function:   Set/query  the  escape  characters.  This  parameter  is  used  for  serial  to  exit  the  transparent transmission mode. Format (ASCII):
                                      Beijing Winner Microelectronics Co., Ltd. AT+ESPC=[!?][escape]<CR> +OK[=escape]<CR><LF><CR><LF> Parameter:  escape:  escape  characters,  the  format  is  2  hexadecimal  numbers  representing  ASCII characters, for example, ASCII characters “+ ”should be expressed as “2B”.  2.2.2.23 AT+ESPT Function:   Set/query  the  escape  time.  This  parameter  is  used  for  serial  to  exit  the  transparent transmission mode. Format (ASCII): AT+ESPT=[!?][time]<CR> +OK[=time]<CR><LF><CR><LF> Parameter:  time: escape time, 100~10000ms, the unit is millisecond, the minimum step size is 100ms  2.2.2.24 AT+WEBS Function:   Set/query whether to enable WEB management server. Format (ASCII): AT+WEBS=[!?][enable],[port]<CR> +OK[=enable,port]<CR><LF><CR><LF> Parameter:  enable: The symbol of enabling Value Meaning 0 Disabled 1 Enabled port: server port number, the default setting is 80.
                                      Beijing Winner Microelectronics Co., Ltd. 2.2.2.25 AT+PASS Function:   Set/query system login password. Format (ASCII): AT+PASS=[!?][password]<CR> +OK[=password]<CR><LF><CR><LF> Parameter:  pass: 6 ASCII characters  2.2.2.26 AT+IOM Function:   Set/query GPIO1 operating mode. Format (ASCII): AT+IOM=[!?][mode]<CR> +OK[=mode]<CR><LF><CR><LF> Parameter:  mode: Operating mode      2.2.2.27 AT+CMDM Function:   Set/query the default command mode of the system. Format (ASCII): AT+CMDM=[!?][mode]<CR> +OK[=mode]<CR><LF><CR><LF> Parameter:  Value Meaning 0 System Function   1 Input   2 Output
                                      Beijing Winner Microelectronics Co., Ltd. mode: Command mode      2.2.2.28 AT+CUSTDATA Function:   Receiving user data via one-shot configuration tool. The first to send AT + ONE SHOT = 1 command before using, the module is configured to one-shot mode. Format (ASCII): AT+CUSTDATA[=?]<CR> +OK=data<CR><LF><CR><LF> Parameter:  None  2.2.2.29 AT+CNTPARAM Function:   Query network configuration parameters. Format (ASCII): AT+CNTPARAM[=?]<CR> +OK=<bssid_en>,[bssid],[ssid],<key><CR><LF><CR><LF> Parameter:  return:bssid_en     Enable BSSID,return 1 , bssid, key Value Meaning 0 AT + command   1 Compatible protocol   Value Meaning 0 Disable BSSID connecting   1 Enable BSSID connecting
                                      Beijing Winner Microelectronics Co., Ltd.   Disable BSSID,return 0, ssid, key  2.2.3 Network control class 2.2.3.1 AT+UPNP Function: Set/query upnp function. Format (ASCII): AT+UPNP=[!?][enable] <CR> +OK[=enable]<CR><LF><CR><LF> Parameter: enable: whether to enable upnp function Value Meaning 0 Disabled 1 Enabled  Description: UPnP is  a P2P connection structure around the world  achieved by various smart devices, wireless devices and personal computers.    2.2.3.2 AT+PORTM Function: Set/query the module interface mode.   Format (ASCII): AT+PORTM=[!?][mode]<CR> +OK[=mode]<CR><LF><CR><LF> Parameter: mode: interface mode Value Meaning 0 Low-speed UART 1 High-speed UART
                                      Beijing Winner Microelectronics Co., Ltd.   2.2.3.3 AT+ AOLM Function: Set/query the always-online mode of the module (Note, this mode is only valid when the module is in automatic operation mode and the network type is STA). Format (ASCII): AT+AOLM=[!?][enable],[ssid],[encry],[key]<CR> +OK[=enable],[ssid],[encry],[key]<CR><LF><CR><LF> Parameter: enable: whether to enable always-online mode ssid: wireless network name, 1~32 characters encry: encryption mode Value Meaning 0 Open 1 Encryption (WPA2-PSK, CCMP/AES) key: key, the length is fixed at 8 ASCII characters  2.2.3.4 AT+ SKGHBN Function: Get IP of the extranet domain name.   Format (ASCII): AT+ SKGHBN =[!?][ URL] <CR> +OK[=IP]<CR><LF><CR><LF> Parameter: URL: extranet domain name IP: ip address.  2.2.3.5 AT+WWPS Function: 2 H-SPI
                                      Beijing Winner Microelectronics Co., Ltd. Set/query WPS function Format (ASCII): AT+WWPS=[!?][mode],[pin]<CR> +OK[=mode],[pin]<CR><LF><CR><LF> Parameter: mode: WPS function selection Value Meaning 0 Button method 1 PIN method pin_len: the length of PIN code (only for HEX format command) pin: wireless router PIN code, hexadecimal format  2.2.3.6 AT+WREG Function:   Set/query wireless channel national region. Format (ASCII): AT+WREG=[!?][region] <CR> +OK[=region]<CR><LF><CR><LF> Parameter: region: national region code  2.2.3.7 AT+WJOIN Function:   This  command  is  only  valid  when  the  module  as  STA  is  used  to  join/create  a  wireless network. If the current network mode is adhoc, and no specified SSID network can be detected, the module will automatically create a new network. If it is already networking, then the network connection information will be directly returned. Format (ASCII): AT+WJOIN<CR>
                                      Beijing Winner Microelectronics Co., Ltd. +OK=<bssid>,<type>,<channel>,<encry>,<ssid>,<rssi><CR><LF><CR><LF> Parameter:  bssid: Network BSSID with the length of 12 hexadecimal numbers in the format of 001EE3A34455 type: network mode Value Meaning 0 Infra network(STA) 1 Adhoc network 2 infra network (AP) channel: channel number encry: encryption mode Value Meaning 0 Open 1 Encryption ssid: wireless network name, 1~32 characters, surrounded by double quotation marks rssi: network signal  strength, none minus,  its unit is  Db,  i.e., 50 indicates that the strength is -50Db.  2.2.3.8 AT+WLEAV Function:   This command is only valid when the module is STA, and it can be used to disconnect the current wireless network. Format (ASCII): AT+WLEAV<CR> +OK<CR><LF><CR><LF> Parameter:    None
                                      Beijing Winner Microelectronics Co., Ltd. 2.2.3.9 AT+WSCAN Function:   This command is only valid when the module is STA, and it can be used to scan wireless network and return after the completion. Format (ASCII): AT+WSCAN<CR> +OK=<bssid>,<type>,<channel>,<encry>,<ssid>,<rssi><CR><LF> <bssid>,<type>,<channel>,<encry>,<ssid>,<rssi><CR><LF> …… <CR><LF> Parameter:    The same with AT+WJOIN  2.2.3.10 AT+LKSTT Function:   Query the network connection status. Format (ASCII): AT+LKSTT<CR> +OK[=status,ip,netmask,gateway,dns1,dns2]<CR><LF><CR><LF> Parameter:  status: connection status Value Meaning 0 Disconnect 1 Connect ip: ip address, data format is “192.168.1.22”, without the quotation marks netmask: subnet mask, data format is in line with ip address gateway: gateway address, data format is in line with ip address dns1: DNS address, data format is in line with ip address dns2: DNS address, data format is in line with ip address
                                      Beijing Winner Microelectronics Co., Ltd.  2.2.3.11 AT+LKSTT2 Function:   Query the soft ap network connection status of the module created in apsta mode. Format (ASCII): AT+LKSTT2<CR> +OK[=status,ip,netmask,gateway,dns1,dns2]<CR><LF><CR><LF> Parameter:  status: connection status Value Meaning 0 Disconnect 1 Connect ip: ip address, data format is “192.168.1.22”, without the quotation marks netmask: subnet mask, data format is in line with ip address gateway: gateway address, data format is in line with ip address dns1: DNS address, data format is in line with ip address dns2: DNS address, data format is in line with ip address  2.2.3.12 AT+SLIST Function:   Query the sta information already connected. Valid only in ap, apsta mode. Format (ASCII): AT+SLIST<CR> +OK[=sta_number,sta_mac1,sta_ip1,sta_mac2,sta_ip2…]<CR><LF><CR><LF> Parameter:  sta_number: the number of station already connected. sta_mac: station mac address already connected sta_ip: station ip address already connected
                                      Beijing Winner Microelectronics Co., Ltd. 2.2.3.13 AT+SKCT Function:   Create the socket. In client mode, waiting for connection completion (success or failure) and then return; in server mode, directly return after the completion of creation. Format (ASCII): AT+SKCT=[protocol],[cs],[host_timeout],<remote_port>,<local_port><CR> +OK=<socket><CR><LF><CR><LF> Parameter:  protocol: protocol type, Value Meaning 0 TCP 1 UDP cs:C/S mode, Value Meaning 0 Client 1 Server   host_timeout: According to the protocol and cs, the meanings are respectively as follows. cs protocol Meaning 0 X The target server name, input domain name or ip address,  such  as  “192.168.1.100”  or “www.sina.com.cn” 1 0 TCP  connection  timeout  period,  the  client connecting  to  this  server  will  be  automatically kicked  off  if  it  does  not  send  any  data  in  this period. The effective value range is1~10000000, unit: second, 0 means never, the default setting is 120 seconds 1 1 No meanings   remote_port: remote port number
                                      Beijing Winner Microelectronics Co., Ltd. local_port: local port number socket: socket number  2.2.3.14 AT+SKSND Function:   Send  data  by  the  specified  socket  and  return  after  the  completion.  This  command  sends binary  data.  Users  should  begin  to  send  original  data  after  receiving  the  response  (+OK)  of module. The module will automatically exit  transmission process after receiving the specified data length  and  send  data to  the  network,  the redundant  date will  be  rejected. Otherwise,  the module will be forced to constrainedly exit transmission mode and send the received data to the network when the module has been waiting for timeout period (1 second). Format (ASCII): AT+SKSND=<socket>,<size><CR> +OK=<actualsize><CR><LF><CR><LF> [data steam] Parameter:  socket: socket number size: the prepared sending data length, the number of bytes actualsize: the allowed sending data length, the number of bytes   data steam: original data  2.2.3.15 AT+SKRCV Function:   Read data form receive  buffer of the target socket, and return after the completion. After receiving this command, the module will transmit the specified size binary data after finishing sending the correspondent message (+OK). Format (ASCII): AT+SKRCV=<socket>,<maxsize><CR> +OK=<size><CR><LF><CR><LF>
                                      Beijing Winner Microelectronics Co., Ltd. [data steam] Parameter:  socket: socket number maxsize: the maximum length of the receivable data   size: the length of the actual received data   data steam: original data  2.2.3.16 AT+SKSTT Function:   Get the specified socket status, the first line of the return value means user-specified socket status information. If the socket type is TCP server, then from the next line, each line represents a socket status of a connected client. Format (ASCII): AT+SKSTT=<socket><CR> +OK=<socket>,<status>,[host],[HostPort],[LocalPort],[rx_data]<CR><LF>   [socket],[status],[host],[HostPort],[ LocalPort],[rx_data]<CR><LF>   ...   <CR><LF>  Parameter:  socket:socket number   status:socket status Value Meaning 0 Disconnection   1 Detecting   2 Connection   host: ip address of the opposite terminal HostPort: port number of the opposite terminal LocalPort: the local port number rx_data: data size in the receiving buffer
                                      Beijing Winner Microelectronics Co., Ltd.  2.2.3.17 AT+SKCLS Function:   Close the specified socket. Format (ASCII): AT+SKCLS=<socket><CR> +OK<CR><LF><CR><LF> Parameter:  socket: socket number  2.2.3.18 AT+SKSDF Function:   Set  the  default  sending  socket  of  the  system.  If  users  need  to  enter  the  transparent transmission  mode in  command mode,  using this  command can  specify the  transparent  serial data transmission destination. Format (ASCII): AT+SKSDF=<socket><CR> +OK<CR><LF><CR><LF> Parameter:  socket: socket number  2.2.3.19 AT+SKSRCIP Function:   Get current socket receiving data source IP address. Format (ASCII): AT+SKSRCIP=?<CR> +OK=[host]<CR><LF><CR><LF> Parameter:  Host: IP address of data source
                                      Beijing Winner Microelectronics Co., Ltd.  2.2.3.20 AT+SKRPTM Function:   Turn on/off socket initiative reporting and receiving data function. Format (ASCII): AT+SKRPTM=<mode><CR> +OK<CR><LF><CR><LF> Parameter:    Mode: Value Meaning 0 Close 1 Open  2.2.3.21 AT+ONESHOT Function:   Turn on/off one-shot configuration function. Format (ASCII): AT+ONESHOT=<status><CR> +OK<CR><LF><CR><LF> Parameter:    status: Value Meaning 0 Close 1 Open  2.2.3.22 AT+HTTPC Function:  Http post get function. Format (ASCII):
                                      Beijing Winner Microelectronics Co., Ltd. AT+HTTPC=<url>,<verb>,<postdata><CR> +OK<CR><LF><CR><LF> Parameter:    url: remote http server-side address;   verb: Value Meaning 0 http get 1 - 2 http post 3 http put   post data:       Upload data to http when verb is 2, 3.  2.2.4 System debug type 2.2.4.1 AT+&DBG Function: Set the system debugging mode. Format (ASCII): AT+&DBG=<bit_enable><CR> +OK[=bit_enable]<CR><LF><CR><LF> Parameter: bit_enable: hexadecimal notation, each bit refers to a debugging function, 0 - disable, 1 –enable  2.2.4.2 AT+&REGR Function: Read register or memory space, the unit is 32bit word, the maximum is 8 words. Format (ASCII): AT+&REGR=<address>,[num]<CR>
                                      Beijing Winner Microelectronics Co., Ltd. +OK=<value1>,[value2]...<CR><LF><CR><LF> Parameter: address: register base address num: register number, the default setting is 1 value: register value  2.2.4.3 AT+&REGW Function: Modify register or memory space, the unit is 32bit word, the maximum is 8 words. Format (ASCII): AT+&REGW=<address><value1>,[value2]...<CR> +OK=<CR><LF><CR><LF> Parameter: address: register address num: register number value: register value 2.2.4.4 AT+&RFR Function: Read RF register space, the unit is 16bit word, the maximum is 8 words. Format (ASCII): AT+&RFR=<address>,[num]<CR> +OK=<value1>,[value2]...<CR><LF><CR><LF> Parameter: address: register base address num: register number, the default setting is 1 value: register value  2.2.4.5 AT+&RFW Function:
                                      Beijing Winner Microelectronics Co., Ltd. Modify RF register space, the unit is 16bit word, the maximum is 8 words. Format (ASCII): AT+&RFW=<address><value1>,[value2]...<CR> +OK=<CR><LF><CR><LF> Parameter: address: register address num: register number ( only for HEX format command) value: register value  2.2.4.6 AT+&FLSR Function: Read SPI Flash space, the unit is 32bit word, the maximum is 8 words. Format (ASCII): AT+&FLSR=<address>,[num]<CR> +OK=<value1>,[value2]...<CR><LF><CR><LF> Parameter: address: register base address num: register number, the default setting is 1 value: register value  2.2.4.7 AT+&FLSW   Function: Modify SPI Flash space, the unit is 32bit word, the maximum is 8 words. Format (ASCII): AT+&FLSW=<address><value1>,[value2]...<CR> +OK=<CR><LF><CR><LF> Parameter: address: register base address num: register number, the default setting is 1
                                      Beijing Winner Microelectronics Co., Ltd. value: register value  2.2.4.8 AT+&UPDM   Function: Firmware upgrade mode set by the user interface (UART/SPI). Format (ASCII): AT+&UPDM=?![mode]<CR> +OK[=mode]<CR><LF><CR><LF> Parameter: mode: system operation mode 0 - normal 1 –upgrade mode  2.2.4.9 AT+&UPDD   Function: Send online upgrade data. Format (ASCII): AT+&UPDD=<size><CR>[data stream] +OK<CR><LF><CR><LF> Parameter: size: data length data stream: upgrade date  2.2.4.10 AT+&UPDP Function: Used to change the factory settings. Format (ASCII): AT+&UPDP=<mode><CR> +OK<CR><LF><CR><LF>
                                      Beijing Winner Microelectronics Co., Ltd. Parameter: mode: Value Meaning 1 Enable  modify  factory  parameter  area,  save  the modified  parameters  to  the  user  factory parameters area after setting. 0 Disable modify factory parameter  area,  save  the modified parameters  to  the  user  parameters  area after setting If you need to change the parameters of the user parameter area of the factory, the first UPDP mode is set to 1, and then modify the parameters you need, UPDP mode is set to 0 after modify completed, so that the modified parameters are saved to the user area of the factory parameters.  3 Common operation 3.1 Create AP process (1)WPRT   Set wireless NIC operating mode as AP AT+WPRT=2 (2)SSID    Set wireless NIC network name of STA as MyAp AT+SSID=MyAp (3)ENCRY    Set wireless NIC encryption mode as WEP64 AT+ENCRY=1 Parameter:open:0,WEP64:1,WEP128:2 (4)KEY    Set wireless NIC key as 12345 AT+KEY=1,1,12345 Parameter 1: key format, 0 represents HEX, 1 represents ASCII Parameter 2: index: key index number, 1~4 for WEP encryption key, other encryption method is fixed at 0   Parameter 3: wireless key. For example: 12345
                                      Beijing Winner Microelectronics Co., Ltd. (5)NIP      Set ip address and subnet mask AT+NIP=1,192.168.1.1,255.255.255.0,192.168.1.1,192.168.1.1     Parameter 1: address type, 0 refers to using DHCP dynamic allocation, 1 refers to the static address     Parameter 2: ip: 192.168.1.1     Parameter 3: netmask: 255.255.255.0     Parameter 4: gateway: 192.168.1.1     Parameter 5: dns: 192.168.1.1 (6)PMTF   Save parameters to spi flash AT+PMTF (7)Z      Reset wireless NIC AT+Z (8)Delay 1 second (9)WJOIN    Create wireless network MyAp AT+WJOIN 3.2 Scan AP process AT cmd for wireless NIC scanning AP: AT+WSCAN 3.3 STA joins AP process (1)WPRT   Set operating mode as STA AT+WPRT=0 (2)SSID    Set the added AP name , such as WinnerMicro AT+SSID=WinnerMicro (3)KEY    Set the added AP wireless key 12345 AT+KEY=1,0,12345678 Parameter 1: key format, 0 represents HEX, 1 represents ASCII Parameter 2: index: key index number, 1~4 for WEP encryption key, other encryption method is fixed at 0   Parameter 3: wireless key. For example: 12345678
                                      Beijing Winner Microelectronics Co., Ltd. (5)NIP      Start DHCP AT+NIP=0 (6)PMTF   Save parameters to spi flash AT+PMTF (7)Z      Reset wireless NIC AT+Z (8)Delay 1 second (8)WJOIN    Join wireless network WinnerMicro AT+WJOIN 3.4 How to disconnect AP by STA   AT cmd for wireless NIC disconnecting AP: AT+WLEAV 3.5 How to view the current status by STA AT cmd for wireless NIC querying current NIC status: AT+LKSTT  3.6 How to use socket function   (1)Build a PC-side TCP server. If using TCP debugging assistant, TCP server address is 192.168.253.1, listening port 1000.
                                      Beijing Winner Microelectronics Co., Ltd.  (2)Set up Socket:   TX:   AT+SKCT=0,0,192.168.253.1,1000,1000 RX:   +OK=1          ---> 1 is socket number
                                      Beijing Winner Microelectronics Co., Ltd.  (3)Sending data: TX:   AT+SKSND=1,5 kevin RX:  +OK=5
                                      Beijing Winner Microelectronics Co., Ltd.  The data interface received by TCP server is as follows:  (4)Receiving data:
                                      Beijing Winner Microelectronics Co., Ltd. Input sending data hello in the TCP debugging assistant interface, and click Sending.  TX:  AT+SKRCV=1,5 RX:  +OK=5 hello
                                      Beijing Winner Microelectronics Co., Ltd.  (5)Query Socket status: TX:  AT+SKSTT=1 RX:  +OK=1,2,"192.168.253.1",1000,1000,0  (6)Close Socket connection
                                      Beijing Winner Microelectronics Co., Ltd. TX:  AT+SKCLS=1 RX:  +OK
 FCC Caution: Any changes or modifications not expressly approved by the party responsible for compliance could void the user's authority to operate this equipment. This device complies with Part 15 of the FCC Rules. Operation is subject to the following two conditions:(1)This device may not cause harmful interference, and (2) this device must accept any interference received, including interference that may cause undesired operation. NOTE: This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to Part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications. However, there is no guarantee that interference will not occur in a particular installation. If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one or more of the following measures: FCC RF Radiation Exposure Statement: This equipment complies with FCC radiation exposure limits set forth for an uncontrolled environment End users must follow the specific operating instructions for satisfying RF exposure compliance. This transmitter must not be collocated or operating in conjunction with any other antenna or transmitter.This equipment complies with FCC radiation exposure limits set forth for an uncontrolled environment. This equipment should be installed and operated with minimum distance 20cm between the radiator & your body.  The end product (host system) shall have a label showing: Contains FCC ID 2AGQ7WMSP02

Navigation menu