WiFi Shield stopped working after firmware upgrade

Hi gurus,

I need your help.

I downloaded arduino IDE 1.0.5 and I upgraded my WiFi shield with the included firmware because I hoped to get better performance and support to UPD.

Unfortunately after the upgrade my shield was not recognized anymore (Shield not present) and/or it was not able to connect to my wifi network.

I decided to get back to a previous firmware (that is included into the IDE 1.0.3).

Now the shield is recognized (almost anytime) but:

1) scanning the network it hardly shows my network (router is few inches far from the shield) and it doesn't show other networks

2) even though it can connect to my wifi network, it doesn't connect to any site and it doesn't accept any connection. I have tested some samples (WiFiWebClient, WiFiWebClientRepeating, SimpleWebServerWiFi) and they don't work

Same results with the firmware included in IDE 1.0.4 and firmware from here https://github.com/arduino/Arduino/tree/master/hardware/arduino/firmwares

Since I am working on a Mac, I have tried to upgrade the firmware on Windows too, same results.

Can anyone give me any advice ?

Is there any place where I can download the original firmware which was slow and unreliable but at least I was able to connect to the shield ?

fab64: Is there any place where I can download the original firmware which was slow and unreliable but at least I was able to connect to the shield ?

You have my sympathy. I have the same question, where to find R3 original firmware. In my case it is the most reliable version. So what made you think it is slow, and unreliable? I wanted some ideas. I upgraded one of my two shields and it is neither faster nor more reliable.

I think that the WiFi shield is slow because I have the sensation that it has an internal buffer and data are sent only when this buffer is full. If you send small data this can be an issue.

It is unreliable because very often the shield is not recognized (I have solved this issue enabling the SD even if it I don't use it, this likely introduces a delay during which makes the wifi available).

With many shields (newer than mine) I have experienced unexpected lost of connection which were solved with the firmware update.

Worst of all is that there are many firmware and may be they are not all compatible with all the shields (mine is one of the first sold). As you pointed out in the forum, library and firmware versions are not managed so it's not easy to understand which firmware works and which doesn't.

We can talk a lot about the update procedure (http://arduino.cc/en/Hacking/WiFiShieldFirmwareUpgrading) that you have to adapt and about these confusing messages:

"UPDATE this URL when the repo is moved" "Update when 1.0.2 released"

What are they talking about ?

Anyway, now I have in my hands a € 69 brick.

Could you please tell me where you downloaded the firmware files that works or attach them here ?

As far as you know, is there a procedure to check that my shield is not damaged ?

fab64: I think that the WiFi shield is slow because I have the sensation that it has an internal buffer and data are sent only when this buffer is full. If you send small data this can be an issue.

Sorry but no. That does not make a whole lot of sense.

There has to be some buffering within any TCP/IP stack. What is presented to your application is the illusion of an unbroken stream. Down at the datalink layer, the stream is packetised for transmission. Buffering does not cause slowdowns. A lack of buffering causes slow downs, as the packet headers which are attached by lower protocol layers, become much larger than the application data the packet is transporting. Single byte transmissions are always relatively slow.

You also need to consider the runtime available to process the packets. Even if the protocol stack were as efficient as it could be, an Arduino would still only have the 16Mhz clock to process the packets, which is quite a bit slower than 802.11G.

When I have some time available, I might get around to setting up a sniffer and seeing what is really going.

OK I just successfully downgraded my firmware to the one included in IDE 1.0.3 and it works with my library dated 1/19/2013. Have you tried using Arduino 1.0.3 instead of 1.0.5? I found that some versions of library won't work with older firmware.

For the data packet, I think it is probably 2312 bytes maximal for wifi but most wired gateways are 1500 or 1492. None of these is relevant. There is a 100 byte buffer defined in the shield firmware. You can't send anything longer than 90 bytes in one shot. I keep wondering why only one other person has found this out while tinkering. 90 bytes is not a super long message. If you send short messages then each one will make one packet. Just check the function calls you will know.

liudr:
There is a 100 byte buffer defined in the shield firmware. You can’t send anything longer than 90 bytes in one shot. I keep wondering why only one other person has found this out while tinkering.

It does not appear to be as simple as that.

Here is some code I am using to build a HTML page.

for (int8_t i = 0; i < tempData.numReadings; i++) {
	client.print(tempData.data[i]); client.print(", ");
}

Which results in the shield sending the data across two packets, each one being over 90 bytes long.
The largest packet I have seen transmitted so far, is 249 bytes.

If I have my maths right, the throughput figures I am getting are dismal.
134 Byte packet ~ 500 Kbp/s.
249 Byte packet ~ 1 Mbp/s.

I want to do some more testing but I need to reacquire my C skills before I can do that.

"In one shot" was the keyword. Try a client.print("1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890");

This is 100 bytes long. I don't have the expertise to sniff packet etc. so your testing would be very helpful. I tested the wifi.firmwareVersion () with all accessible resources I have so could you help me back with this test?

Can you explain the transfer speed a bit? I don't quite get it. I normally just use SD card to load and send .csv files and the SD card side is much faster than the wifi part, resulting around 4KB/s speed. I'd like to improve on that.

@liudr

liudr: OK I just successfully downgraded my firmware to the one included in IDE 1.0.3 and it works with my library dated 1/19/2013. Have you tried using Arduino 1.0.3 instead of 1.0.5? I found that some versions of library won't work with older firmware.

Great !! You are right, firmware 1.0.3 works with the library included in the IDE 1.0.3 but not with which included in 1.0.5.

Apparently, my shield does not support firmware newer than which included in IDE 1.0.3, this is not a good new anyway better than nothing.

Thank you so much !

You are welcome. Which hardware version is your wifi shield? Original? Mine is R3, by the way.

My is R3 too, I bought it about in August 2011.

Back to my opinion about performances of WiFi shield, after many firmware and library updates (and pains), I am still experiencing the same issues discussed in this old post.

http://forum.arduino.cc/index.php?PHPSESSID=l2hvckvrhrjlr8ardmb61cf8v1&topic=120771.msg908723#msg908723

Maybe the reason is an internal buffer, maybe something else, anyway the Ethernet shield has definitely better behavior.

Since I have seen that someone of you is speculating along the message's size, my messages are never longer than 15 bytes.

I hope that this helps and can lead to a solution.

Did you mean August of 2012 instead of 2011? ;)

Thanks for bringing up the delay issue. I have now "helped" you get the shield working better so please try that long message on a simple code to confirm the shield can't do write() for longer than 90 bytes. You seem to know more about networking than me so help me out! Just make up a message over 90 bytes long and send it. See if you receive it at all. Thanks.