GSwifiInterface (interface for GainSpan Wi-Fi GS1011 modules) see https://mbed.org/users/gsfan/notebook/GSwifiInterface/

Dependencies:   GSwifiInterface mbed

Fork of Wifly_HelloWorld by Samuel Mokrani

Committer:
gsfan
Date:
Sun Jan 27 14:37:15 2013 +0000
Revision:
6:2e3441cd9128
Parent:
5:867d16e948eb
Child:
7:3644ae697c52
1st build

Who changed what in which revision?

UserRevisionLine numberNew contents of line
samux 0:90ba0f51aa64 1 #include "mbed.h"
gsfan 6:2e3441cd9128 2 #include "GSwifiInterface.h"
samux 1:49e1e9ed6e39 3
samux 1:49e1e9ed6e39 4 Serial pc(USBTX, USBRX);
samux 1:49e1e9ed6e39 5
gsfan 6:2e3441cd9128 6 /* GSwifi object where:
gsfan 6:2e3441cd9128 7 * - p13 and p14 are for the serial communication
gsfan 6:2e3441cd9128 8 * - p12 and P0_22 are for the serial handshake (optional)
gsfan 6:2e3441cd9128 9 * - p9 is for the reset pin
gsfan 6:2e3441cd9128 10 * - "SSID" is the ssid of the network
gsfan 6:2e3441cd9128 11 * - "PHRASE" is the password
gsfan 6:2e3441cd9128 12 * - SEC_WEP is the security
samux 1:49e1e9ed6e39 13 */
gsfan 6:2e3441cd9128 14 //GSwifiInterface gs(p13, p14, p12, P0_22, p9, "SSID", "PHRASE", GSwifi::SEC_WPA_PSK);
gsfan 6:2e3441cd9128 15 GSwifiInterface gs(p13, p14, NC, NC, p9, "SSID", "PHRASE", GSwifi::SEC_WEP);
gsfan 6:2e3441cd9128 16 // TX, RX, CTS, RTS, RESET
samux 0:90ba0f51aa64 17
samux 1:49e1e9ed6e39 18 int main() {
gsfan 6:2e3441cd9128 19 gs.init(); // use DHCP
gsfan 6:2e3441cd9128 20 if (gs.connect()) return -1; // join the network
gsfan 6:2e3441cd9128 21 printf("IP Address is %s\n\r", gs.getIPAddress());
gsfan 6:2e3441cd9128 22 gs.disconnect();
gsfan 6:2e3441cd9128 23 }