WIFLY: Connecting to Georgia Tech Wireless
Wifly RN-131G is an 802.11G networking module which we used to connect to GTother network of Georgia Tech. There are several mobile wireless applications of this module so by following this page for the correct connections and configuration, one will be able to do a lot of cool stuff with this module.
Interfacing with mbed
A basic hardware configuration for RN-131g Wifly and Mbed (if you don't use a battery to power the module) is:
|Wifly Pins||Mbed Pins|
|GPIO 6||any DigitalIn|
The connections should be done beneath the wifly module as shown in the figure below
In order to test that your hardware has been set up correctly, you can use this program:
Connect to any terminal e.g Hyper-terminal to configure this code.
If everything is connected correctly, do the following on Hyper-terminal:
$$$ - will take the wifly to command line mode
get mac - to get mac address of wifly
get wlan auth - to check the configuration settings of wifly
Following picture shows this along with the response
set wlan ssid GTother - to set the ssid of wifly to GTother (we cannot use GTWpa because wifly does not support wpa-enterprise)
Go to LAWN Authentication Page to find the pass phrase/key for GTother using your username and password.
set wlan phrase phrase - to connect to wpa-psk using phrase from authentication page
set wlan join 1 - to join the access point that matches the stored SSID, passkey and channel. Channel can be set to 0 for scanning. (Default)
set wlan auth 4 - to connect to wpa-psk that both wifly and GTother support
save - overwrites the default configuration data stored in non-volatile memory. If the wifly loses power the proper data will be restored.
exit - to exit the command line mode
For the complete set of commands, visit Wifly User Manual
Authentication on Georgia Tech LAWN
Now your wifly device is ready to connect to the GTother network and obtain an IP address using DHCP.
- This is a necessary step. If you don't use DHCP to obtain an IP address, you will not be able to authenticate your device with the LAWN service. As long as you use wifly.init() method this won't be a problem.
Once the device has obtained an IP address you need to authenticate the MAC address.
Go to LAWN authentication page and enter GT user name, password, and mac address of the wifly module
Note: Do not use the mac address of the mbed! This will not work.
The authentication will time out after 30 minutes of inactivity. If this happens simply go back to the LAWN page and re-enter your credentials.
Wifly cannot be made to authenticate itself using the HTTPClient.h as the LAWN page uses https.
After authentication, perform the GET and POST request of HTTP using following code
Following is the video showing the outcome of the above code
Please log in to post comments.