WEP Connection problem

Hi,

Hardware Setup:

  • Arduino Uno R3
  • Arduino WIFI R3 Shield

Network Setup:

  • Asus AP
  • D-link AP

I've configured the Asus AP with WPA2 Personal encryption and the D-Link AP with WEP Open encryption with different SSIDs.

Programming the Uno to connect using WPA2 works fine. The problem comes in with the WEP connection - it doesn't want to connect.
I've also switched the encryption types around and WPA2 works but WEP still fails.

Asus = WPA2 - Works
Asus = WEP - ERROR

D-link = WPA2 - Works
D-link = WEP - ERROR

PC connects to both without issue.

So what is wrong ?

Code:

#include <WiFi.h>

char ssid[] = "dlink"; // your network SSID (name)
char key[] = "78898DBD024093C60F19C54DA1"; // your network key
int keyIndex = 0; // your network key Index number
int status = WL_IDLE_STATUS; // the Wifi radio's status

void setup() {
// initialize serial:
Serial.begin(9600);

// attempt to connect to an open network:
Serial.print("Attempting to connect to WEP network: ");
Serial.println(ssid);
status = WiFi.begin(ssid, keyIndex, key);

// if you're not connected, stop here:
if ( status != WL_CONNECTED) {
Serial.println("Couldn't get a wifi connection");
while(true);
}
// if you are connected :
else {
Serial.print("You're connected to the network");
printCurrentNet();
printWifiData();
}
}

I have also tried keyIndex 0,1,2,3 still not connecting.

Can you connect to the D-Link wireless using a computer with those settings?

Is there an option in the router WEP setup for "shared key" rather than "open"? I don't use the wifi shield, but I have used D-Link wireless routers.

Sorry, for the long delay.

Yes, I am able to connect the computer to the D-Link with the WEP settings. Will try with the shared key setup when it comes up again.

The required was for the arduino to connect to a network and send through a request according to input received - the network was WEP but after a strong case of "Change your settings or this will not work properly" the network has been changed so the arduino could work.