Difference between revisions of "JUNIPER- WiFi Shield for Arduino Based on GainSpan Module"

From LinkSprite Playgound
Jump to: navigation, search
(Schematic)
(Schematic)
Line 164: Line 164:
 
== Schematic  ==
 
== Schematic  ==
  
[https://s3.amazonaws.com/linksprite/Shields/JUNIPER-WiFi_Shield_Based_on_GainSpan/Schematics_of_Juniper_GainSpan_WiFi_Shield.pdf Schematics of Juniper - GainSpan WiFi Shield for Arduino]
+
*[https://s3.amazonaws.com/linksprite/Shields/JUNIPER-WiFi_Shield_Based_on_GainSpan/Schematics_of_Juniper_GainSpan_WiFi_Shield.pdf Schematics of Juniper - GainSpan WiFi Shield for Arduino]
  
 
== Specification  ==
 
== Specification  ==

Revision as of 16:43, 8 July 2013

Introduction

A low-power WiFi shield that is compatible with Arduino and STM32 Spruce board. Gainspan GS1011 module is a highly integrated ultra low power wireless single chip which contains an 802.11b radio, media access controller (MAC) and baseband processor, on-chip flash memory and SRAM, and an applications processor all on a single package.

The GS1011 module is a highly integrated ultra low power wireless single chip which contains an 802.11b radio, media access controller (MAC) and baseband processor, on-chip flash memory and SRAM, and an applications processor all on a single package.

Along with its embedded software stack it offers a highly scalable, reliable, manageable and secure wireless link to meet the growing demand of wireless sensor networks utilizing the broadly accepted IEEE 802.11b,g,n standards infrastructure.


Video Introduction

JUNIPER.jpg

Features

  • Supports IEEE 802.11
  • Seamlessly integrates with existing 802.11b/g infrastructure and utilizes the 802.11 security, manageability, ease-of-use, and quality of service
  • 802.11i/WPA2 Authentication, AES Hardware encryption
  • Optimized for battery powered application with very low power consumption for multiple years of battery life
  • PCB antenna: Range 200-300M+ Outdoor (Typical Estimate)
  • Two 32-bit ARM7 CPU @44MHz, 1 for applications (APP) : 1 dedicated to radio (WLAN)
  • 2 UART , I2C, 2 SPI, 2 ADC, 3 PWM, and 32 GPIO
  • Operates at 3.3V

Application Ideas

  • Juniper Gainspan Shield Sample Code for Spruce

<syntaxhighlight lang="c"> //LinkSprite.com Spruce Sample Code //This sample code will move the data between serial port

int inByte; void setup() {

   Serial1.begin(9600);
   Serial2.begin(9600);
   
   delay(1000);
   
   Serial2.println("AT");
   delay(100);
   Serial2.println("AT+WD");
   delay(100);
   Serial2.println("AT+WS");   // Search for server
   delay(100);
   Serial2.println("AT+NDHCP=1");
   delay(100);
   //Serial2.print("AT+WWPA=12345678");
   //delay(100);
   Serial2.println("AT+WA=only_test");
   delay(100);
   Serial2.println("AT+NSTCP=5000");   //Initalize the wifi module as server,set server port. The server IP is displayed on the serial port
   //Serial2.println("AT+NCTCP=192.168.5.19,5000");   //Initialize the wifi module as client, and connect to server: 192.168.5.19锛�5000
   //delay(5000);
   //Serial2.print("1B 53 30 48 45 4C 4F 0D 0A 1B 45");
   //delay(100);
   //Serial2.print("AT+DGPIO=30,1");
   //delay(100);
   //Serial2.print("AT+DGPIO=30,0");

}

void loop() {

  if (Serial2.available()) 
  {
       inByte = Serial2.read();
      Serial1.print(inByte, BYTE);   //Display the data from wifi on serial port
   }

}


/* After wifi receives the command, the correct reponse will be as follows锛� AT OK //AT test command AT+WD OK //Close all the connections AT+WS BSSID SSID Channel //Search for the APs Type RSSI Security e0:05:c5:45:48:90, only_test , 04, INFRA , -55 , WPA-PERSONAL 78:44:76:02:00:9a, LS-TEST , 11, INFRA , -44 , WPA-PERSONAL No.Of AP Found:2 OK AT+NDHCP=1 OK //Dynamically allocat IP AT+WWPA=******* OK //Password AT+WA=only_test //SSID IP SubNet Gateway 192.168.5.16: 255.255.255.0: 192.168.5.1 OK AT+NCTCP=192.168.5.2,8010CONNECT 0 //Connect to the host through TCP/IP OK AT+DGPIO=30,1OK //Turn on the LED AT+DGPIO=30,0OK //Turn off the LED OOOOOOOOOOOOOOOOOO //When transmitting, 00 is correct reponse. 0x1B is the ASCII of key <esc>.

  • /

</syntaxhighlight>


  • Arduino Sample Code of Juniper GainSpan WiFi Shield

<syntaxhighlight lang="c"> /*

  LinkSprite. com
  
 This is a sample arduino code juniper, the gainspain wifi shield for aruino
 
 When using this code, please install J2 and J3, and remove J4 and J5.  
  • /
  1. include <NewSoftSerial.h>


NewSoftSerial mySerial(2, 3); int inByte;

void setup() {

 Serial.begin(9600);
 mySerial.begin(9600);
 
  delay(1000);
   
   mySerial.println("AT");
   delay(100);
   mySerial.println("AT+WD");
   delay(100);
   mySerial.println("AT+WS");   // search for wifi ap
   delay(1000);
   mySerial.println("AT+NDHCP=1");
   delay(100);
   mySerial.println("AT+WA=only_test");
   delay(100);
   mySerial.println("AT+NSTCP=5000");   //initialize gainspan as server, and set server port, the server IP will be displayed on the serial port
   

}

void loop() // run over and over {

 if (mySerial.available()) 
  {
      inByte = Serial.read();
      Serial.print(inByte, BYTE);   //Display the Wifi data on the serial port
   }

} </syntaxhighlight>

Cautions

  • As WiFi shares the Arduino hardware ports with FT232, when you download the programs, remove the WiFi module first.


  • More details see: GS1011 data sheet,Schematic and samples.

Schematic

Specification

Tutorial of WiFi TV Remote Control Using Infrared Shield and Juniper Gainspan WiFi Shield

Pin definition and Rating

Mechanic Dimensions

Usage

Hardware Installation

Prepare Hardware

  • Juniper- WiFi Shield for Arduino Based on Gainspan Module

Juniper1.jpg

  • Arduino Duemilanove module

Cuhead 2.jpg

  • USB CABLE

Cuhead 3.jpg


Prepare Software


  • X_CTU serial debugging tools

Download Link:setup_xctu_5100


  • Parameter Setting

Parameter setting.png

Programming

  • Check the wifi serial connection is ok or not.
Connect to the router and mail server.
> AT(Enter)
OK
  • Search the wireless network in the certain range.
> AT+WS(Enter)
BSSID SSID Channel Type RSSI Security
00:12:34:56:78:90,"SOLID" ,6, INFRA, -53, NONE
NO. O AP Found:1
OK
  • Permit dynamic host to set agreement
> AT+NDHCP=1 (Enter)
OK
  • Security Mode
(>AT+WWPA=Password,if router is WPA encrypted, put the password here)
(>AT+WWEP=Password,if router is WEP encrypted, put the password here)
> AT+WA=SOLID (Enter)
  • Connect to the wireless network SOLID
IP SubNet Gateway
192.168.3.9 255.255.255.0 192.168.3.1
OK
  • Connect to Yahoo mail box(STMP)
> AT+NCTCP=202.165.103.162,25 (Enter)
CONNECT 0

"Ok "S0220 smtp105 mail.cnb.yahoo.com ESMTP

  • According to command > S0hello worldE specified by gainspan, send to Yahoo mail server by 16 hex through serial.
>1B 53 30 48 45 4C 4F 0D 0A 1B 45
> S 0 H E L O Enter E

Return EOOS0250 smtp105.mail.cnb.yahoo.com


Notes:

  1. 0D 0A is Enter. You have to add this Enter after HELO string, or there will be no data returned from Yahoo server mail box.
  2. the key esc on the keyboard and ascii code value. It doesn’t means input esc string.

FAQ

Please list your question here:

Support

If you have questions or other better design ideas, you can go to our forum to discuss or creat a ticket for your issue at linksprite support.

Resources

How to buy

Here to buy Juniper Wifi Shield for Arduino Based on GainSpan ModuleJUNIPER on LinkSprite Direct

See Also

Other related products and resources.

Licensing

This documentation is licensed under the Creative Commons Attribution-ShareAlike License 3.0 Source code and libraries are licensed under GPL/LGPL, see source code files for details.