GainSpan Wi-Fi module library
breakout,
gainspan,
GS1011M,
socket,
SSL,
TCP,
UDP,
WiFly,
xbee
GainSpan Wi-Fi module library
| This page is written in Japanese as well. Please find it in 2nd half of this page. | このページは日本語でも記載されています。日本語版はこのページ後半をご覧ください。 |
Pseudo English:
Overview
The GS1011 is an ultra low power 802.11b wireless module from GainSpan.
It has a security protocol and access point mode.
If you want to get documentation, software and tools, you must contract the NDA of GainSpan.
Warning
This page has nothing to do with GainSpan.
Please do not contact the manufacturer for the content of this page.
Features
GS1011M
- Low power, peak 150mA (3.3V)
- Deep Sleep 150uA
- Standby 7uA
- RF Output Power 8dBm
- Distance about 100m (actual survey)
- Radio Protocol: 802.11b/g/n
- Data Rates: max 11Mbps
- Security Protocols: WEP, WPA, WPA2, WPS
- Network Protocol: ARP, UDP, TCP, DHCP, DNS, NTP, HTTP/HTTPS (IPv4)
- Sessions: max 16 connection
- Infrastructure, Ad Hock, Limited AP mode
- including DHCP Server (Limited AP)
- Security HTTPS(SSL) access
http://www.gainspan.com/docs2/GS1011M-PB.pdf
GSwifiInterface Library
This library is compatible with EthernetInterface.
GSwifi Library
You can use a lot of features that the module has.
» Import this library into a programGSwifi
GainSpan Wi-Fi library see: http://mbed.org/users/gsfan/notebook/gainspan_wifi/
» Import this library into a programGSwifi_old
GainSpan Wi-Fi library see: http://mbed.org/users/gsfan/notebook/gainspan_wifi/
GSwifi Examples
#include "mbed.h"
#include "GSwifi.h"
GSwifi gs(p13, p14, p20); // TX, RX, Reset (no flow control)
// GSwifi gs(p13, p14, p20, NC, 9600); // TX, RX, Reset, Alarm (no flow control)
// GSwifi gs(p13, p14, p12, P0_22, p20); // TX, RX, CTS, RTS
// GSwifi gs(p13, p14, p12, P0_22, p20, p19, 115200); // TX, RX, CTS, RTS, Reset, Alarm, 115200bps
int main () {
if (gs.connect(GSSEC_WPA_PSK, "SSID", "passkey")) {
return -1;
}
- Examples
- TCP/UDP client
- TCP server
- UDP server
- HTTPS(SSL) client and NTP client
- SMTP client (send mail)
- HTTP server (web server)
- RPC over HTTP server (Remote Procedure Call)
- Twitter (HTTP POST, HTTP AUTH)
- Limited AP
- WebSocket
Wirefree Library
ported from Wirefree (Arduino)
» Import this programWirefree_sample
http://mbed.org/users/gsfan/notebook/gainspan_wifi/ porterd from: http://electronics.trev.id.au/2012/02/07/gainspan-wifi-library-for-chipkit-and-arduino/
Connection
| GS1011 | mbed | LPC1768 | LPC11U24 | KL25Z | |
|---|---|---|---|---|---|
| UART0_RX | <-- | TXD | p13 etc. | p13 | PTD2 etc. |
| UART0_TX | RXD | p14 etc. | p14 | PTD3 etc. | |
| UART0_RTS | CTS | p12 | p21 | - | |
| UART0_CTS | <-- | RTS | P0_22 | p22 | - |
Connection
mbed GS1011M
p13 (TXD) ----- UART0_RX
p14 (RXD) ----- UART0_TX
( p12 (CTS) ----- UART0_RTS )
( P0_22 (RTS) --- UART0_CTS )
3.3V ------+--- VBATT
+--- VDDIO, VIN_3V3
+--- EN_1V8
GND ----------- GND, DGND
Connection
mbed GS1011M
p13 (TXD) ----- UART0_RX
p14 (RXD) ----- UART0_TX
( p12 (CTS) ----- UART0_RTS )
( P0_22 (RTS) --- UART0_CTS )
3.3V +-----+--- VBATT
| +--- VIN_3V3
|
| +--- DC_DC_CNTL
| +--+--- EN_1V8
| |
+-[ ]----- VDDIO
GND ----------- GND, DGND
Information
if not connect the RTS and CTS, easy to buffer underrun. (when it's faster 115.2kbps)
P0_22 is connected directly to the pins of the CPU. (optional)

Distribution
- DIY Sandbox - Hydrogen (GS1011MIP)
- Sparkfun - GainSpan WiFi Breakout (GS1011MIP)
- Suga koubou (GS1011MIC)
ゲインスパン Wi-Fi モジュール ライブラリ

ゲインスパン社の低消費電流 Wi-Fiモジュール(無線LAN) GS1011MIC はTELEC認証を取得している。
ゲインスパン社のSoC(System on Chip)を搭載したモジュールは、日本国内でもいくつかのメーカーが製造しており、同じコマンドセットで使えるものと思われる。
SoCの中身はARMデュアルコアであり、一つはWLAN RF制御、もう一つはユーザアプリケーションに使用される。
標準では Serial to WiFi (s2w) ファームウェアが書き込まれており、UART経由のATコマンドで各種コントロールができる。
開発キットを購入すればSoC単体で UART, SPI, I2C, ADC などが使用できる。(通常の利用であれば不要)
スリープやスタンバイ機能を活用すると、かなりの低消費電流になるため、電池駆動のアプリケーションで、 the Internet of Things 、センサーネットワークやリモコン等への活用が期待できる。
※ ゲインスパン社が製造しているモジュールの詳しい資料は、NDA(秘密保持契約)を締結したうえで入手できる。
(ウェブサイトで登録後、ダウンロードしたNDA文書へサインし、指定のアドレスへ送信する。数日後、ウェブサイトで多数の資料が閲覧できるようになる)
コマンドリファレンスは秘密事項になるためここでは割愛する。
http://www.gainspan.com/japanese/
Warning
このページはGainSpan社とは関係ありません。
このページの内容についてメーカーへ問い合わせしないでください。
特徴
GS1011MIC
- 低消費電流 3.3V 最大150mA
- Deep Sleep 150uA
- Standby 8uA
- RF出力 8dBm
- 電波到達距離 約100m(市街地の路上にて実測)
- 802.11b/g
- 転送レート 最大11Mbps
- 接続モード:WEP, WPA, WPA2, WPS
- プロトコル:ARP, UDP, TCP, DHCP, DNS, NTP, HTTP/HTTPS (IPv4)
- セッション 最大16(同時接続数)
- インフラストラクチャ(Infrastructure)、アドホック(Ad Hock)に加え、簡易アクセスポイント(Limited AP)の各モード
- DHCPサーバ機能搭載(Limited AP)
- HTTPS(SSL)アクセス機能搭載
http://www.gainspan.com/docs2/GS1011MIC-PB.pdf
GSwifiInterface ライブラリ
EthernetInterfaceのAPIと互換性があるライブラリ。
GSwifi ライブラリ
モジュールに備わった多くの機能を使えるライブラリ。
» Import this library into a programGSwifi
GainSpan Wi-Fi library see: http://mbed.org/users/gsfan/notebook/gainspan_wifi/
» Import this library into a programGSwifi_old
GainSpan Wi-Fi library see: http://mbed.org/users/gsfan/notebook/gainspan_wifi/
MITライセンス(無償、無保証)
Information
ライブラリは大幅に更新されています。 下のサンプルは変更が必要な場合があります。
GSwifi サンプル
#include "mbed.h"
#include "GSwifi.h"
GSwifi gs(p13, p14, p20); // TX, RX, Reset (no flow control)
// GSwifi gs(p13, p14, p20, NC, 9600); // TX, RX, Reset, Alarm (no flow control)
// GSwifi gs(p13, p14, p12, P0_22, p20); // TX, RX, CTS, RTS
// GSwifi gs(p13, p14, p12, P0_22, p20, p19, 115200); // TX, RX, CTS, RTS, Reset, Alarm, 115200bps
int main () {
if (gs.connect(GSSEC_WPA_PSK, "SSID", "passkey")) {
return -1;
}
- サンプルプログラム
- TCP/UDPクライアント
- TCPサーバー
- UDPサーバー
- HTTPS(SSL)クライアント と NTPクライアント
- SMTPクライアント(メール送信)
- HTTPサーバー(ウェブサーバー)
- RPC over HTTPサーバー(リモートプロシージャコール)
- Twitter (HTTP POST, HTTP AUTH)
- Limited AP
- WebSocket
Wirefree ライブラリ
Arduino用 Wirefree ライブラリからの移植
» Import this programWirefree_sample
http://mbed.org/users/gsfan/notebook/gainspan_wifi/ porterd from: http://electronics.trev.id.au/2012/02/07/gainspan-wifi-library-for-chipkit-and-arduino/
接続
| GS1011 | mbed | LPC1768 | LPC11U24 | KL25Z | |
|---|---|---|---|---|---|
| UART0_RX | <-- | TXD | p13 etc. | p13 | PTD2 etc. |
| UART0_TX | RXD | p14 etc. | p14 | PTD3 etc. | |
| UART0_RTS | CTS | p12 | p21 | - | |
| UART0_CTS | <-- | RTS | P0_22 | p22 | - |
Connection
mbed GS1011MIC
p13 (TXD) ----- UART0_RX
p14 (RXD) ----- UART0_TX
( p12 (CTS) ----- UART0_RTS )
( P0_22 (RTS) --- UART0_CTS )
3.3V ------+--- VBATT
+--- VDDIO5
+--- DCDC_OUT
+--- VDDIO4
GND ----------- GND, DGND
Information
TX, RX だけでなく CTS, RTS も接続しておくことをお勧めする。
ハンドシェイクがないとデータを取りこぼしやすい。(115.2kbpsより早い場合)
P0_22 はmbedのピンに出ていないので、CPUの足から直接引き出した。(オプション)

入手
- メーカー、商社
- 佐鳥電機 GainSpan
- 佐鳥電機 WLANモジュール(IEEE802.11b)
- アルプス電気 W-LANモジュール UGFZ1 (GS1011MICはこれのOEMと思われる)
- アルティマ GainSpan
- 村田製作所 - TypeSN
- North Pole Engineering
- RFM
- Wiznet WizFi210
- モジュール、変換基板、小売
- Arduino Shield
資料
4 comments on GainSpan Wi-Fi module library:
Please login to post comments.



Very nice work.
Would it be possible to combine firmware updater and GSwifi?