Pages: [1]   Go Down
Author Topic: Wifi Shield Connects, but no functionality  (Read 657 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Just hooked up a Wifi Shield (R3) to an UNO (R3) and did't have much luck with any of the sample code.  I can connect to my network and see:

Attempting to connect to SSID: MyNetwork
Connected to wifi
SSID: MyNetwork
IP Address: 192.168.0.199
signal strength (RSSI):-27 dBm

But then, when attempting to contact a server (www.google.com) I get:

Starting connection to server...

disconnecting from server.

This is just the example code from: http://arduino.cc/en/Tutorial/WiFiWebClient

I have tried most of the other examples and I can always connect, but then I can't get any of the other functionality to work (client, server, etc.).  I've updated the firmware but get the same result.  Any ideas how I can debug this?  Is it something with my home network settings?
Logged

Switzerland
Offline Offline
Faraday Member
**
Karma: 108
Posts: 5150
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Looks like you have either a missing DNS or gateway in your setup.
WiFi.gatewayIP() gives you the IP of the gateway, which should be the same as the router's IP in most setups.

You might also split up the client.connect() call into

Code:
IPAddress remote_addr;
if (WiFi.hostByName(server, remote_addr)){
  if (client.connect(remote_addr, 80)) {
    // rest of the code
  }
} else {
  Serial.println("Couldn't resolve hostname");
}
Logged

Paris, France
Offline Offline
Newbie
*
Karma: 1
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I had the exact same issue and after three days looking for a solution I was starting to run in circles... until I noticed a comment on a post in the forums. Try to downgrade your IDE from 1.0.5 to 1.0.3. It fixed the issues with the WiFi Shield on the Arduino UNO for me. Hope this helps!
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Pylon:  Tried your suggestions and had no luck.  I also tried hard coding the IP for google to confirm it wasn't a DNS problem and used WiFi.gatewayIP() to confirm that I had the correct gateway.

I then tried to use WiFi.Config to manually set my IP, DNS, and gateway.  I could connect to WiFi, but it wouldn't use the IP I put into WiFI.Config and instead was still being assigned an IP from my DHCP range.

I will try downgrading my IDE as Chr1s suggested when I'm home later tonight to see if that solves the problem.

Thanks for the help.
Logged

Camisano Vicentino (VI), Italy
Offline Offline
God Member
*****
Karma: 5
Posts: 956
ƎR like no other.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

i think we have the same problem, have you solved?
Logged

Riccardo Ertolupi of the Vicenza Thunders Team: http://www.VicenzaThunders.com

Camisano Vicentino (VI), Italy
Offline Offline
God Member
*****
Karma: 5
Posts: 956
ƎR like no other.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

i've just tried and using the 1.0.3 version the problem is solved smiley-grin
Logged

Riccardo Ertolupi of the Vicenza Thunders Team: http://www.VicenzaThunders.com

Camisano Vicentino (VI), Italy
Offline Offline
God Member
*****
Karma: 5
Posts: 956
ƎR like no other.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

anyway i just discovered that you have to upgrade the firmware of the wifi shield if you want to use it with the 1.0.5 IDE... do you agree?
Logged

Riccardo Ertolupi of the Vicenza Thunders Team: http://www.VicenzaThunders.com

Pages: [1]   Go Up
Jump to: