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:
Wed Jan 30 05:53:39 2013 +0000
Revision:
7:3644ae697c52
Parent:
6:2e3441cd9128
fix

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 7:3644ae697c52 15 GSwifiInterface gs(p13, p14, NC, NC, p9, "SSID", "PHRASE", GSwifi::SEC_WPA_PSK);
gsfan 6:2e3441cd9128 16 // TX, RX, CTS, RTS, RESET
samux 0:90ba0f51aa64 17
samux 1:49e1e9ed6e39 18 int main() {
gsfan 7:3644ae697c52 19 pc.baud(115200);
gsfan 6:2e3441cd9128 20 gs.init(); // use DHCP
gsfan 7:3644ae697c52 21 if (gs.connect() == false) return -1; // join the network
gsfan 6:2e3441cd9128 22 printf("IP Address is %s\n\r", gs.getIPAddress());
gsfan 6:2e3441cd9128 23 gs.disconnect();
gsfan 6:2e3441cd9128 24 }