Reset the WiFi module
AT&F
restores the factory default values of the configuration variables and writes them to non-volatile storage.
AT+S.SCAN
SOCKET
Open a network socket
AT+S.SOCKON
= ID, PORT, PROTOCOL, ind
ID
== Host Name - IP or Internet name (www.google.com)
PORT
== The IP of the Computer or Host that you need connect (TCP/UDP)
PROTOCOL
== t for TCP socket, u for UDP socket
ind
== indicate when data has arrived (optional)
Up to 8 socket connections at same time.
Attention:
the WiFi module at the moment (January 2014) is CLIENT this means
that only the WiFi module have the possibility to open a socket for
connect a remote SERVER (PC, HOST, www...).
In
other words, is not possible for a PC or a HOST open a socket to
connect the WiFi module.
The possibility of connection are shown below.
Below there is an example that open a socket to send a string of data to the PC.
For PC with WINDOWS
For PC with LINUX
Open TeraTerm and follow the step below.
NOTE:
BOLD == command that you must write on TeraTerm
BLUE == answer from the WiFi module
ITALIC == character that must be type on Teraterm but that you don't see on TeraTerm but you must see on the server.exe window.
AT+S.SOCKON=192.168.1.6,32000,t,ind<CR>
ID: 00
OK
AT+S.SOCKW=00,13<CR>
Hello World<CR>
OK
+WIND:55:Pending Data:0:13
AT+S.SOCKC=00<CR>
The above command Close the socket 00
Below is what you must see in server.exe screen.
Below is what you must see in TeraTerm
NOTE:
MINI AP without password
AT+S.SCFG=wifi_mode,3
AT+S.SCFG=wifi_priv_mode,0
at+s.ssidtxt=EM
at&w
at+cfun=1
NOTE:
MINI AP with password
at+s.scfg=wifi_mode,3
at+s.ssidtxt=EM
at+s.scfg=wifi_priv_mode,1
AT+S.SCFG=wifi_wep_keys[0],7465737431
AT+S.SCFG=wifi_wep_key_lens,05
AT+S.SCFG=wifi_wep_default_key,0
at&w
at+cfun=1
NOTE:
Also is available a web page, for the configuration of your WiFi module.
http://captiveportal.net
Some connection examples to an AP
ANDROID - the configuration si:
HotSpot
WPA2
PSK
Below the commands to use on WiFi module.
at+s.ssidtxt=AndroidEM
at+s.scfg=wifi_wpa_psk_text,cb41c492e2a9
at+s.scfg=wifi_priv_mode,2
at+s.scfg=wifi_mode,1
at+s.scfg=ip_use_dhcp,1
at&w
at+cfun=1
ROUTER VodafonStation 2
at+s.ssidtxt=Vodafone-26666521
at+s.scfg=wifi_wpa_psk_text,enrico
at+s.scfg=wifi_priv_mode,2
at+s.scfg=wifi_mode,1
at+s.scfg=ip_use_dhcp,1
at&w
at+cfun=1
ROUTER-Belkin N150 and BlackBerry (HotSpot) used during STDay 2013 in Italy
at+s.ssidtxt=BBMHem
at+s.scfg=wifi_wpa_psk_text,enrico321
at+s.scfg=wifi_priv_mode,2
at+s.scfg=wifi_mode,1
at+s.scfg=ip_use_dhcp,1
at&w
at+cfun=1
ROUTER-FRITZ Box 7390
at+s.ssidtxt=EMCU7390
at+s.scfg=wifi_wpa_psk_text,enrico
at+s.scfg=wifi_priv_mode,2
at+s.scfg=wifi_mode,1
at+s.scfg=ip_use_dhcp,1
at&w
at+cfun=1
Mode Point to Point / AD-HOC or IBSS network
Associate the iOS device with the ADHOC network created using the WiFi module
AT+S.SSIDTXT=emADHOC
AT+S.SCFG=wifi_priv_mode,0
AT+S.SCFG=wifi_mode,2
AT+S.SCFG=ip_ipaddr,192.161.0.3
AT+S.SCFG=ip_gw,192.161.0.255
AT+S.SCFG=ip_dns,192.161.0.255
AT+S.SCFG=ip_netmask,255.255.255.0
AT+S.SCFG=ip_use_dhcp,0
AT&W
AT+CFUN=1
After the restart of the WiFi module, find your IP address, type:
AT+S.STS
Open the SAFARI web browser (on iPAD) and insert your IP address + /index.html.
192.168.1.3/index.html
General purpose commands
***
Reset - restores the factory default values of the configuration
variables and writes them to non-volatile storage.
AT&F
***
Lists the types, sizes, and names of all the existing files present
on the WiFi module.
AT+s.fsl
***
Deletes an existing file by name. Static files may not be deleted,
only overridden.
at+s.fsd=file_name
***
Displays the name and value of all configuration variables in the
WiFi module
AT&V
***
Displays the current values of all the status variables.
AT+S.STS
***
enable/disable Wi-Fi device
0
disable
1
enable
AT+S.WIFI=0
AT+S.WIFI=1
***
trigger Wi-Fi reassociation sequence
AT+S.ROAM
Example:
***
Set the IP addres
AT+S.SCFG=ip_ipaddr,192.168.178.36
***
Return the IP addres
AT+S.GCFG=ip_ipaddr
***
ReStart the WiFi