This application note provides instructions for configuring the eS-WiFi module for WiFi Network Access Point Association via HTTP Commands. The HTTP Commands allow for scanning of Access Points and Associating to an Access Point. These instructions can also be used in a Smartphone, mobile, and embedded Applications.
Once the desired Access Point has been found, the module can be set use that Access Point on a future start up by saving the Access Point configuration information to the eS-WiFi Module User FLASH Memory space. (Application Note .pdf )
For testing purposes, a simple plug-in called ‘HTTP Requester’ can be used with Firefox to ‘POST’ and ‘GET’ HTTP formatted messages to and from the eS-WiFi Module.
The instruction in the application note can be applied to Inventek System’s ISM43362, and ISM43340
The eS-WiFi configuration webserver must be set up and started before using the HTTP Commands to configure the eS-WiFi module for Access Point Association. To start the eS-WiFi configuration webserver, use the ‘A0’ IWIN-AT Command on the eS-WiFi Module.
eS-WiFi CONIFIGURATION WEBSERVER SETUP
The eS-WiFi Modules Configuration Soft Access Point can be set up with a unique ‘Name’, ‘Password’, and ‘MAC Address Name Prefix’. Once set up, the Soft Access Point configuration data can be saved the eS-WiFi Module’s User Configuration FLASH Storage Area. After executing the steps below, the eS-WiFi Module Soft Access Point will start up, and wait for Access Point Configuration request.
eS-WiFi Soft Access Point Set Up Example
Start Soft Access Point Using Default Soft Access Point Name, eS-WiFi_AP_<MAC_ADDRESS>, and Open Security
The eS-WiFi Soft Access Point steps below are optional, and can be used to create a secure
eS-WiFi Soft Access Point.
Set Soft Access Point Security Mode to WPA2-MIXED
Set Soft Access Point Password
Set Soft Access Point Name to <Access Point Name>_<eS-WiFi MAC Address>
Start Soft Access Point
A0\r //The ‘A0’ command is blocking until a network has been joined, it can be exited by sending a Ctrl-Q (0x11) character.
Save Soft Access Point Configuration to eS-WiFi User Configuration FLASH Storage Area
EXAMPLE HTTP POST and GET
MODULE CONFIGURATION MESSAGES
The first step in configuring the eS-WiFi module for Access Point Association via HTTP Commands is to submit a HTTP ‘GET’ message requesting the eS-WiFi module to scan for available Access Points. Make sure the eS-WiFi Soft Access Point has been started before executing any HTTP Configuration Commands.
GET Command: GET HTTP://192.168.10.1/ws?SCAN. Where ‘192.168.10.1’ is the eS-WiFi Access Point server IP Address, and ‘ws?SCAN’ is the scan request.
Description: This command asks the eS-WiFi Module to perform a Wi-Fi Access Point Scan and return the scan response in a XML formatted message.
XXX = Record number
HTTP Requester Example:
Open Fire Fox and start HttpRequester to send ‘GET HTTP://192.168.10.1/ws?SCAN‘ to the eS-WiFi module, which will send a HTTP request to the eS-WiFi Soft Access Point running on the eS-WiFi module. After executing this command, a response containing a XML formatted eS-WiFi Access Point Scan results will be return to ‘HttpRequester’. Below in figure 1 is an example output from ‘HttpRequester’.
Figure 1, Example HttpRequest ‘GET ‘Response.
After selecting an Access Point from parsing the eS-WiFi Module’s Soft Access Point Scan XML response from the HTTP ‘GET’ Command, a HTTP ‘POST’ command can be used to configure the eS-WiFi to associate to the selected Access Point. Information needed to complete the POST Command can be filled in with data returned from the HTTP GET Access Point Scan Command.
POST Command: POST HTTP://192.168.10.1/connect? ssid=ism_demo&sec=4194310&chan=2&bssid=20AA4B93848B& pwd=ism1234. Where ‘192.168.10.1’ is the eS-WiFi Access Point Server IP Address, ‘ssid’ is the name of the Access Point to associate with, ‘sec’ is the security mode, ‘chan’ is the Access Point channel number, ‘bssid’ is the Access Point MAC Address, and ‘pwd’ is the Access Point Password.
Description: This HTTP Command asks the eS-WiFi Module to set the Logon parameters for the selected Access Point.
Security Modes: The follow security modes, table 1, are used to associate the eS-WiFi Module with an Access Point using a HTTP POST message.
Table 1, Access Point Security Modes
HTTP Requester Example:
Open Fire Fox and start HttpRequester to send HTTP://192.168.10.1/connect? ssid=ism_demo&sec=4194310&chan=2&bssid=20AA4B93848B&pwd=ism12345,
which will send a HTTP POST command to eS-WiFi Module Soft Access Point to set the eS-WiFi Module to Associate to the selected Access Point. In the example above, the Access Point is ‘ism_demo’. Below in figure 2 is an example of ‘HttpRequester’ for the HTTP ‘POST’ Command.
Figure 2, Example HttpRequest ‘POST ‘.
After the above POST Command, has execute to configure the eS-WiFi module to associate to the selected Access Point, the eS-WiFi Module’s Soft Access Point Web Server will shut down. The eS-WiFi Module will then connect to the selected Access Point (AP). During this process, messages similar to what is below will be written to the host from the eS-WiFi Module.
> [AP ] SSID: eS-WiFi_AP_020AF7D3C49E,6,192.168.10.1
[WEB SVR] Server started
[AP DHCP] Assigned AC:FD:CE:90:C6:49 has 192.168.10.100
[JOIN ] ism_demo,10.109.70.1070,0
STORING ACCESS POINT CONFIGURATION SETTINGS
After the eS-WiFi module has been configured to Associate to an Access Point, the configuration settings for the Access Point can be save to the eS-WiFi module’s User Configuration FLASH Storage. During the next startup of the eS-WiFi module, it will reference the User Configuration FLASH Storage area for Access Point Configuration Setting, and use the Access Point Configuration Settings to Associate to the Access Point.
USER CONFIGURATION FLASH STORAGE SAVE METHOD
Issue a ‘Z1’ IWIN-AT Command to save the Access Point Network Configuration to FLASH.