Initializing Wifi... MAC: 0:0:0:0:0:0 on arduino wifi shield r3

Hi,

I’m the proud new owner of r3 wifi shield sitting on top of a r3 uno and I’ve just spent a frustrated evening trying to get it to see my network.

I’ve hammered google and these forums and a couple of people seem to have had the same problem as me over the past year or so, but not many, and I can’t find any solutions linked to the posts.

I’m following these instructions:

and updated the firmware using these:
http://arduino.cc/en/Hacking/WiFiShieldFirmwareUpgrading

I downloaded wifi_dnld.elf from here:
https://github.com/arduino/Arduino/tree/master/hardware/arduino/firmwares/wifishield/wifi_dnld/Release

and wifiHD.elf from here:
https://github.com/arduino/Arduino/tree/master/hardware/arduino/firmwares/wifishield/wifiHD/Release

Note, when uploading the firmware, with both files I got a message:

Parsing ELF file....................... Can't open input file "/Arduino/hardware
/arduino/firmware/wifishield/binary/wifi_dnld.elf"
FAIL    Reading error.
(A)bort, (R)etry, (I)gnore ?

so I moved file elf files to the local bin folder from where I was running the command and still I got the same thing.
So I tried pressing (R)etry twice and on the 3rd attempt it seemed to read it and continued successfully.

It did show the following after uploading but I’m assuming the 2 failures were the times I had to press (R)etry

Summary:  Total 13   Passed 11   Failed 2

Exactly the same thing happened on both files. I repeated the process a few times with identical outcomes (failing to read the file twice, then succeeding) each time. I’m concerned by this as it doesn’t appear to be random.
Anyway, it did report a PASS eventually, so I’ve moved on.

I’m running the scanning code that was included in the instructions:

#include <WiFi.h>
#include <WiFiClient.h>
#include <WiFiServer.h>
#include <WiFiUdp.h>
 

void setup() {

  // initialize serial and wait for the port to open:
  Serial.begin(9600);
  while(!Serial) ;

  // attempt to connect using WEP encryption:
  Serial.println("Initializing Wifi...");
  printMacAddress();

  // scan for existing networks:
  Serial.println("Scanning available networks...");
  listNetworks();
}

void loop() {
  delay(10000);
  // scan for existing networks:
  Serial.println("Scanning available networks...");
  listNetworks();
}

void printMacAddress() {
  // the MAC address of your Wifi shield
  byte mac[6];                     

  // print your MAC address:
  WiFi.macAddress(mac);
  Serial.print("MAC: ");
  Serial.print(mac[5],HEX);
  Serial.print(":");
  Serial.print(mac[4],HEX);
  Serial.print(":");
  Serial.print(mac[3],HEX);
  Serial.print(":");
  Serial.print(mac[2],HEX);
  Serial.print(":");
  Serial.print(mac[1],HEX);
  Serial.print(":");
  Serial.println(mac[0],HEX);
}

void listNetworks() {
  // scan for nearby networks:
  Serial.println("** Scan Networks **");
  byte numSsid = WiFi.scanNetworks();

  // print the list of networks seen:
  Serial.print("number of available networks:");
  Serial.println(numSsid);

  // print the network number and name for each network found:
  for (int thisNet = 0; thisNet<numSsid; thisNet++) {
    Serial.print(thisNet);
    Serial.print(") ");
    Serial.print(WiFi.SSID(thisNet));
    Serial.print("\tSignal: ");
    Serial.print(WiFi.RSSI(thisNet));
    Serial.print(" dBm");
    Serial.print("\tEncryption: ");
    Serial.println(WiFi.encryptionType(thisNet));
  }
}

The seriel monitor is showing this though:

Initializing Wifi...
MAC: 0:0:0:0:0:0
Scanning available networks...
** Scan Networks **
number of available networks:0

This repeats and it can’t find any networks.

I know there are visible networks, broadcasting their SSIDs because I can see them in the same room using other kit.

Any offers?

I cheated on the firmware upgrade. I went to my install of IDE v1.0.5...
/arduino-1.0.5/hardware/arduino/firmwares/wifishield/
...and copied both the wifi_dnld.elf and wifiHD.elf files to my root directory (c:).

Then I ran this. All one line:
batchisp.exe -device AT32UC3A1256 -hardware usb -operation erase f memory flash blankcheck loadbuffer c:/wifi_dnld.elf program verify start reset 0

...and this. All one line:
batchisp.exe -device AT32UC3A1256 -hardware usb -operation erase f memory flash blankcheck loadbuffer c:/wifiHD.elf program verify start reset 0

Both warned of a bootloader overwrite but it didn't cause any problems on the upgrade. Now I am upgraded. Whew!

Thank you Tim.

Problem solved. I didn't have to use multiple retrys to read the files this time either - read them first time.

I now have a mac address and it can see my networks.

Many thanks again :slight_smile:

I did the same, but have a solid blue data light, and "Wifi shield not found".