Webduino instable

I can't always get the webduino samples running. Like Hello_world and web_demo. After I change my ip address to match my network ( or something), I compile and it uploads well. Then sometimes I can get the web server to respond a couple or three times before it stops loading the page. The loading marker in Firefox just spins and the page loads for ever. Sometimes when the page loads at the beginning, it's mixed with "epic fails". Sometimes in this sequence, I can reset the mega board and then the next time I try to hit the page, it gives a big dump of what seem to be other runs that success or failed ( This is depicted in the attached Screenshot-2.png) and then stops responding again. Basically each sample code acts like this.

Wither way, it's completely unstable. Has anyone else seen instability like this? My setup is a Arduino Mega 2560 R3 and a Arduino Ethernet shield with an SD card inserted.


Oh ya, I'm using IDE version 1.0

I would recommend upgrading to IDE v1.0.1, just to be safe. It has a bug fix for the ethernet library. http://arduino.cc/forum/index.php/topic,72232.msg727530.html#msg727530

Insure you either disable or initialize the SD SPI interface. That can cause interference on the SPI bus.

I may have just found a reproduction path. I have an "AData Micro SD" card that is 2Gb. If the card is in the SD slot then the bug happens often and when it occurs, it never recovers. I just go to the ip in Firefox and click refresh constantly until it crashes. I can also make it happen by holding the F5 refresh button. With out the sd card in the sd slot, it never happens and the page loads are much quicker in general.

Does the presence of an sd card slow the server and create conflicts of connections. I need to figure this out because I have a sd card format that I have conformed to that holds the ip and mac of a given sd/Ethernet shield and on load of the shield, it retrieves the ip and mac so that there are not conflicts on the network. Without simultaneous sd and webduino support, I would have to write custom script files for each shield with their personal ip and mac.

Any help would be amazing.

  • Sam

I posted a little late on my last post. Do you think my reproduction path above coincides with your SD SPI theory? Is 1.0.1 stable and better than 1.0? I ask because it's not stated to be the release on the main arduino page.

Thanks for your input a lot. By the way, all this code that I'm writing is going towards a really neat project that you may want to check out here. It's an open source DIY publication of a green house disigned with arduino at the core. http://www.kickstarter.com/projects/1742152701/horto-domi-the-open-garden?ref=live

  • Sam

Try either disabling or initializing the SD SPI before the Ethernet.begin() call in setup().

// disable

// or initialize

If that doesn't do it, then try using v1.0.1. It has been stable for me.

I couldn't get anything working in 1.0.1 for some reason. enableing SD it in 1.0 seems to work decently. I have refreshed a lot and it hasn't hung. Sometime though I have to change my ip and reload the program before it will start working again.

I just changed by ip to a new ip and then all with that same ip: In 1.0.1 enabling SD.begin(4) without the card, it seems to run fine. With the card and reseted in fails within 3 or 4 refreshes. Pulling the card back out and resetting it produces an "epic fail" and then a large number of working refreshes. This is with the web_demo example by the way.

if this fixes the instability issue (pooping out the SD card) that would be wonderful :) :grin:

that was meant to be popping out , did the firefox spell check not even underline pooping no guess not :O

It won't be wonderful though cause this means that you can't use the SD card and the web server at the same time. Any web server is seriously crippled with out any data files or pages to server out. I sought out the webduino because I wrote my own library web server and it wasn't reliable. Hopefully WebDuino has a easily reproducible setup that produces stability.