GainSpan Wi-Fi library see: http://mbed.org/users/gsfan/notebook/gainspan_wifi/

Dependents:   GSwifi_httpd GSwifi_websocket GSwifi_tcpclient GSwifi_tcpserver ... more

Fork of GSwifi by gs fan

GainSpan Wi-Fi library

The GS1011 is an ultra low power 802.11b wireless module from GainSpan.

see: http://mbed.org/users/gsfan/notebook/gainspan_wifi/

/media/uploads/gsfan/gs_im_002.jpg /media/uploads/gsfan/gs1011m_2.jpg

ゲインスパン Wi-Fi モジュール ライブラリ

ゲインスパン社の低電力 Wi-Fiモジュール(無線LAN) GS1011 シリーズ用のライブラリです。

解説: http://mbed.org/users/gsfan/notebook/gainspan_wifi/

Revision:
19:cad912f5a6ba
Parent:
18:4b97804c37d1
Child:
20:151b5a4fdd29
--- a/GSwifi.cpp	Thu Nov 01 02:55:57 2012 +0000
+++ b/GSwifi.cpp	Tue Nov 06 08:54:19 2012 +0000
@@ -476,7 +476,7 @@
     }
 }
 
-int GSwifi::connect (GSSECURITY sec, char *ssid, char *pass, int dhcp) {
+int GSwifi::connect (GSSECURITY sec, const char *ssid, const char *pass, int dhcp) {
     int r;
     char cmd[GS_CMD_SIZE];
     
@@ -553,7 +553,7 @@
     return r;
 }
 
-int GSwifi::adhock (GSSECURITY sec, char *ssid, char *pass, IpAddr ipaddr, IpAddr netmask) {
+int GSwifi::adhock (GSSECURITY sec, const char *ssid, const char *pass, IpAddr ipaddr, IpAddr netmask) {
     int r;
     char cmd[GS_CMD_SIZE];
 
@@ -602,7 +602,7 @@
     return r;
 }
 
-int GSwifi::limitedap (GSSECURITY sec, char *ssid, char *pass, IpAddr ipaddr, IpAddr netmask) {
+int GSwifi::limitedap (GSSECURITY sec, const char *ssid, const char *pass, IpAddr ipaddr, IpAddr netmask) {
     int r;
     char cmd[GS_CMD_SIZE];
     
@@ -1039,7 +1039,7 @@
     return command(cmd, GSRES_NORMAL);    
 }
 
-int GSwifi::send (int cid, char *buf, int len) {
+int GSwifi::send (int cid, const char *buf, int len) {
     int i;
     Timer timeout;
 
@@ -1076,7 +1076,7 @@
     return _gs_ok == 1 ? 0 : -1;
 }
 
-int GSwifi::send (int cid, char *buf, int len, Host &host) {
+int GSwifi::send (int cid, const char *buf, int len, Host &host) {
     int i;
     Timer timeout;
 
@@ -1151,7 +1151,7 @@
     return _gs_sock[cid].connect;
 }
 
-int GSwifi::httpGet (Host &host, char *uri, char *user, char *pwd, int ssl, onGsReceiveFunc ponGsReceive) {
+int GSwifi::httpGet (Host &host, const char *uri, const char *user, const char *pwd, int ssl, onGsReceiveFunc ponGsReceive) {
     char cmd[GS_CMD_SIZE];
 
     if (! _connect || _status != GSSTAT_READY) return -1;
@@ -1197,11 +1197,11 @@
     return _cid;
 }
 
-int GSwifi::httpGet (Host &host, char *uri, int ssl, onGsReceiveFunc ponGsReceive) {
+int GSwifi::httpGet (Host &host, const char *uri, int ssl, onGsReceiveFunc ponGsReceive) {
     return httpGet (host, uri, NULL, NULL, ssl, ponGsReceive);
 }
 
-int GSwifi::httpPost (Host &host, char *uri, char *body, char *user, char *pwd, int ssl, onGsReceiveFunc ponGsReceive) {
+int GSwifi::httpPost (Host &host, const char *uri, const char *body, const char *user, const char *pwd, int ssl, onGsReceiveFunc ponGsReceive) {
     char cmd[GS_CMD_SIZE];
     int i, len;
 
@@ -1256,11 +1256,11 @@
     return _cid;
 }
 
-int GSwifi::httpPost (Host &host, char *uri, char *body, int ssl, onGsReceiveFunc ponGsReceive) {
+int GSwifi::httpPost (Host &host, const char *uri, const char *body, int ssl, onGsReceiveFunc ponGsReceive) {
     return httpPost (host, uri, body, NULL, NULL, ssl, ponGsReceive);
 }
 
-int GSwifi::certAdd (char *name, char *cert, int len) {
+int GSwifi::certAdd (const char *name, const char *cert, int len) {
     int i;
     char cmd[GS_CMD_SIZE];
 
@@ -1277,7 +1277,7 @@
     return cmdResponse(GSRES_NORMAL, GS_TIMEOUT);
 }
 
-int GSwifi::base64encode (const char *input, int length, char *output, int len) {
+int GSwifi::base64encode (char *input, int length, char *output, int len) {
     // code from 
     // Copyright (c) 2010 Donatien Garnier (donatiengar [at] gmail [dot] com)
     static const char base64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";