Wifi Shield v2.2 Issue

Hello,
I have two problems/questions.
1. I was able to get the Wifi Shield v2.2 connected to my home network, but it is no longer responding to any commands. I wrote a new sketch to send the Wifi Shield the "at" command from the Arduino Uno rather than through terminal or arduino's serial monitor. That also gets no response from the shield. What I do see is the commands that the sketch is making over serial pop up in the putty window when connected to the shield over RAW tcp on port 4000. So, again, the shield is definitely connected to the network, but it will not recognize and commands. I have included my sketch at the bottom of this post.
2. Rather than screw around with Serial conflicts, has anyone gotten this shield working over SPI? There is a nice library out there for a different shield based on the WizFi210, but it uses SPI and a different pinout.
Thanks!
/******************************************************************
WizFi210
Create 16 July. 2013
by Adam Rivera
*****************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
String inputStr = "";
boolean stringComplete = false;
boolean wifiBoardConnected = false;
int ledPin = 13;
//
//////////////////////////////
void setup()
{
pinMode(ledPin, OUTPUT); // sets the digital pin as output
Serial.begin(115200); // connect to wifi shield
}
void loop()
{
if(!wifiBoardConnected)
{
digitalWrite(ledPin, HIGH); // sets the LED on
delay(1000); // waits for a second
digitalWrite(ledPin, LOW); // sets the LED off
delay(1000); // waits for a second
Serial.println("at");
// Also tried Serial.print("at\r\n");
}
CheckSerialInput();
}
void serialEvent() {
while (Serial.available()) {
// get the new byte:
char inChar = (char)Serial.read();
// add it to the inputString:
inputStr += inChar;
// if the incoming character is a newline, set a flag
// so the main loop can do something about it:
if (inChar == '\n') {
stringComplete = true;
}
}
}
void CheckSerialInput()
{
if(stringComplete)
{
if(inputStr == "[OK]")
{
wifiBoardConnected = true;
digitalWrite(ledPin, HIGH); // sets the LED on
delay(5000);
digitalWrite(ledPin, LOW); // sets the LED on
}
stringComplete = false;
inputStr = "";
}
}
I have two problems/questions.
1. I was able to get the Wifi Shield v2.2 connected to my home network, but it is no longer responding to any commands. I wrote a new sketch to send the Wifi Shield the "at" command from the Arduino Uno rather than through terminal or arduino's serial monitor. That also gets no response from the shield. What I do see is the commands that the sketch is making over serial pop up in the putty window when connected to the shield over RAW tcp on port 4000. So, again, the shield is definitely connected to the network, but it will not recognize and commands. I have included my sketch at the bottom of this post.
2. Rather than screw around with Serial conflicts, has anyone gotten this shield working over SPI? There is a nice library out there for a different shield based on the WizFi210, but it uses SPI and a different pinout.
Thanks!
/******************************************************************
WizFi210
Create 16 July. 2013
by Adam Rivera
*****************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
String inputStr = "";
boolean stringComplete = false;
boolean wifiBoardConnected = false;
int ledPin = 13;
//
//////////////////////////////
void setup()
{
pinMode(ledPin, OUTPUT); // sets the digital pin as output
Serial.begin(115200); // connect to wifi shield
}
void loop()
{
if(!wifiBoardConnected)
{
digitalWrite(ledPin, HIGH); // sets the LED on
delay(1000); // waits for a second
digitalWrite(ledPin, LOW); // sets the LED off
delay(1000); // waits for a second
Serial.println("at");
// Also tried Serial.print("at\r\n");
}
CheckSerialInput();
}
void serialEvent() {
while (Serial.available()) {
// get the new byte:
char inChar = (char)Serial.read();
// add it to the inputString:
inputStr += inChar;
// if the incoming character is a newline, set a flag
// so the main loop can do something about it:
if (inChar == '\n') {
stringComplete = true;
}
}
}
void CheckSerialInput()
{
if(stringComplete)
{
if(inputStr == "[OK]")
{
wifiBoardConnected = true;
digitalWrite(ledPin, HIGH); // sets the LED on
delay(5000);
digitalWrite(ledPin, LOW); // sets the LED on
}
stringComplete = false;
inputStr = "";
}
}
2013-07-22 20:47:49 Hello Adam,
After you set the shield to auto connect, it will enter on data mode. If you want to go back to AT command mode, you must press GPIO29.
The trick is to pay close attention to the LED. When it is on data mode, blinks once when data is received. When it is on AT command mode blinks twice.
About SPI, this shield is not SPI compatible. Commands and data are directly received through the Serial port.
Cheers
Jose
After you set the shield to auto connect, it will enter on data mode. If you want to go back to AT command mode, you must press GPIO29.
The trick is to pay close attention to the LED. When it is on data mode, blinks once when data is received. When it is on AT command mode blinks twice.
About SPI, this shield is not SPI compatible. Commands and data are directly received through the Serial port.
Cheers
