Arduino wifi shield R3 "not present" after wireless router reboot

I wonder if this problem has been addressed by the "newest" firmware and library. Apparently for the original R3 and "less new" library that works with the shield, if you disconnect the wifi router power and reconnect it, the wifi shield become not_present. Restarting the wifi doesn't work. Arduino can't find the shield anymore. The red error LED is let after the wifi router is powered down and stays on after attempt to find the shield.

I wonder if I should mod the shield to drive its reset pin with an arduino pin if I detect the shield not present again.

Sorry Luidr but that's another problem I am just not having with my WiFi shield.

I just tested it using the rather simple WiFi scanner code I posted in another thread, here.
http://forum.arduino.cc/index.php?topic=140764.15

When I switch off the router, the LED turns red and my code branches into doConnect, where it sits incrementing it's tryNum count. Once the router is back up, the shield reconnects, the red LED goes out and the green one comes on.

Matt,

What version of firmware and library are you using? Can you post the doConnect code? Thanks.

Not too sure which version of firmware I am using.
I have two shields, one I re-flashed and the other I did not. I will check which is which tomorrow.

I wrote the scanner very quickly on my Mac, which is running Arduino 1.0.4
If I have time tomorrow, I will recompile the source on my dev PC, which is on Arduino 1.0.5

void doConnect() {
  //attempt to connect to WLAN forever
  uint8_t tryNum = 1;
    
  do {
    lcd.setCursor(0, 0); lcd.print("Try connect     "); 
    lcd.setCursor(13, 0); lcd.print(tryNum++);
    WiFi.begin(ssid, password);
    delay(1000);
  } while (WiFi.status() != WL_CONNECTED);

}

Thanks Matt. The code is straight forward. I hope your unmodified shield works with arduino IDE 1.0.4 As a backup, I can bend the wifi reset pins and connect it to an arduino IO pin to use Arduino to reset the shield. Having reset hardwired to arduino reset is silly. What if you don't want to restart your computer just because wifi screwed up?! :wink: