LKB
LKB

Reputation: 1040

I cannot connect to my Arduino WiFi shield server, but I can ping it

I can successfully ping the Arduino WiFi shield's IP, however when I go to connect to it via Chrome, I get "Oops! Google Chrome could not connect to [IP here]".

Here are my details:

Upvotes: 3

Views: 5779

Answers (3)

julioVG
julioVG

Reputation: 81

Hello i got the same problem and i had to upgrade my wifi shield, and download the laste version from arduino (1.0.6) and after that you will see that you will get access inside your lan to your wifi shield.

This example is using an static IP, could be useful

Regards

#include <SPI.h>
#include <WiFi.h>

// the IP address for the shield:
IPAddress ip(192, 168, 1, 200);    

char ssid[] = "xxxxxxxx";    // your network SSID (name) 
char pass[] = "xxxxxxxx";    // your network password (use for WPA, or use as key for WEP)

int status = WL_IDLE_STATUS;

void setup()
{  
  // Initialize serial and wait for port to open:
  Serial.begin(9600); 
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }

  // check for the presence of the shield:
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi shield not present"); 
    while(true);  // don't continue
  } 

  WiFi.config(ip);

  // attempt to connect to Wifi network:
  while ( status != WL_CONNECTED) { 
    Serial.print("Attempting to connect to SSID: ");
    Serial.println(ssid);
    // Connect to WPA/WPA2 network. Change this line if using open or WEP network:    
    status = WiFi.begin(ssid, pass);

    // wait 10 seconds for connection:
    delay(10000);
  }

  // print your WiFi shield's IP address:
  Serial.print("IP Address: ");
  Serial.println(WiFi.localIP()); 
}

void loop () {}

Upvotes: 0

user2382401
user2382401

Reputation: 41

You must download the latest Wifi Library from github here https://github.com/arduino/wifishield and replace your existing library... In my case it worked out after the firmware update for the arduino 1.0.5

Upvotes: 0

LKB
LKB

Reputation: 1040

After many days of internet browsing, I finally came across the solution (located here):

The Arduino IDE version should be downgraded from 1.0.5 to 1.0.2.

Uninstall your later version and reinstall version 1.0.2, install your device's driver again if necessary, and upload the code using the older version of the Arduino IDE.

I hope this helps others who have the same issue as me.

Upvotes: 4

Related Questions