Thumbs way down for Arduino WiFi shield. Read before you buy

fpga6,

Thanks for sharing your experience with me. I for a while I thought I was the only one bothered by various things around this hardware and everyone else is happy.

If you try the basic web server sample code, how long will it take to crash/fail to accept incoming connection? I have not tested that long of a period. I only tested my own web server code for up to 3 days with occasion access from my mobile devices and various PC browsers. I wonder if there is any instability within webduino, which I have not used yet. Plus, have you noticed that once the call to server.available() takes more than a millisecond, rather 25ms, the server has failed to accept any incoming connection? I found that to be very consistent but that was with the "latest" firmware. I was successfully updating the firmware, not so lucky during the first few tries.

What about your experience with wifi shield being a client? My work depends on the wifi shield being a client, not yet server.

liudr,

I am somewhat new to WiFi shield, but here are my observations:

I have only run in server mode, not client.

  1. I tried sample code and had a lot of trouble when I created my own simple denial of service attacks. I have three computers and would hit the send button simultaneously. Usually I could lock up the WiFi shield in a few tries. That code uses server.available() but I did not do any real time testing of that call.

  2. I found an forked wifi version of webduino on github and used it as my basic webserver. Then I modified the webduino web server code examples in the webduino repository for WiFi instead of ethernet. This was very easy. This setup was much more robust, but still crashed after a day or so.

  3. Then I reflashed the shields with the WiFiHD.hex update that went on github on or about 1/19/2013. I thought there was some improvement.

  4. In the third week of February 2013, the webduino code got a bug fix that also improved the crashing. Now I am able to get 10 to 20 days of operation with my best setup. That's great, but I have not figured out how to debug something that only fails every 20 days! I don't know if my remaining problem is webduino related or shield firmware at this point. I have been sitting it out for the last two months to see if something else popped up in the community that might be the final fix.

  5. I have not gone back to the basic sample code to see if the firmware update improved crash frequency on that. I picked webduino because it did a good job of handling "post" inputs which I wanted for remote control of some lights. I can't use a static server that only returns data. Also, webduino is a "black box" shell that isolates me one level away from having to deal with the ins and outs of controlling the WiFi shield directly.

fpga6,

If I have time I will test my own server code with the original R3 shield. I only had 3-day test periods. Any chance that you are using String class? I think webduino is not using String class. From a quick glance, it seems to be a library you can use to dynamically construct a web page that embed your arduino input values and control arduino outputs. I have a totally different approach to arduino web server so I won't be using webduino much. What I do is a bit of a place-and-switch. I will create a static web page in an HTML editor, then ID all key elements that may be filled with values determined by arduino readings. I then embed a JavaScript to update key element values at the end. It's a huge time saver when it's initially set up. I'm still testing though :slight_smile:

liudr-

I believe webduino does support string function.

They have these two inclusions in the source code:
#include <string.h>
#include <stdlib.h>

I have read that there were some bugs when using strings in the arduino IDE, but I don't know if that has been fixed.

My code uses simple strings and I have not had any problems with them.

My web page is pretty simple and therefore easy to directly write in HTML. I have tried using a web page editor, but they put out so many lines that I would have had to implement in a way that webduino could handle that I thought direct writing of HTML is easier.

Currently I am running mega2560 arduino because my program code is 44K size. I have lots of libraries for real time clock, webduino, and other functions. have not tried to squeeze it down for Uno because I also wanted the additional pins of the mega for future expansion of the project.

Folsom Webduino.JPG

The string.h is entirely C-string so should be safe. You want to watch out for the String objects with a capital S.

Just curious, if you hit refresh, how long does it take to reload the page? A second or two, or tens or seconds?

Refresh = 5 seconds from 100 miles away.

Thanks for the advice on strings.

Thanks. That is pretty acceptable delay. Mine is in local network and takes up to 4 seconds.

Glad I found this thread. I've been googling "arduino wifi shield [replace with some form of fail language here]" all day. I'll read the whole thread in a bit, but suffice to say, my new WiFi shield simply will not accept clients in server mode or establish client.connect() when in Client mode using the examples that come with the IDE. ever.

Updated the firmware, using 1.05 version of the IDE, and have been scouring the source code for clues as to how the Libraries are actually working since none of it is in the docs really, but if it's really just about stabbing around in the dark for several more days, I think I might just try another system. I think I saw some links up there somewhere.

This may show the limits of open sourced products. Unlike a commercial product nobody is responsible of an arduino product does not function. So they can continue to sell these wifi boat anchors for $90 without risk of market or legal forces.

I have three of these boards. The most recent one has been flashed to current firmware. When I compile a web server using the 1.05 environment it just does not work, even using the demo sketches from the arduino web site. It connects to my LAN, but does not respond to any way to a browser connection.

Since nobody is responsible for making the product work, nobody has to fix it. I think the original intentions were good, but the wifi shield is just beyond the capabilities of the arduino team. They have no real support for the wifi shield and no channel for real reporting of customer issues.

Let the buyer beware. Arduino is a product for hobbyist toys, not serious projects. We should think of it that way.

An other alternate for Arduino WiFi shield;-

dbm123:
I really like the price and form-factor of the CC3000 WiFi module http://www.ti.com/product/cc3000

and I REALLY link the concept of SimpleLink for a headless embedded device Wireless connectivity | TI.com

...

http://www.ti.com/product/cc3000#samplebuy

Can't beat price, free sample.

I think Arduino team should learn a bit from Adafruit forum. There they have support sub forum for their products so you post there to get some help and the help often comes in time for me. I am currently happy enough with wifi shield R3's stock firmware (not upgrading anymore).

fpga6,

If your server sketch fails, will a client sketch work? If the client sketch doesn't work either, you may need to re-flash (instructions were not given 100% clear on flashing). I did that and broke one shield but later fixed it by flashing properly. You first flash the antenna firmware and then remove flash jumper and power up the shield and wait a few minutes (hopefully enough to get the firmware to flash the antenna firmware. Then you put the jumper in and flash with wifiHD firmware. Did you miss the step to remove the jumper and power up?

fpga6,

From a different point of view, you may want to try a raspberry pi. The pi is a full-scale computer running linux (had to learn from beginning 2 weeks ago). You are taken care off by the vast open source software community with linux and supported wifi hardware list is long and detailed. Programming is more involved (depending on your background, certainly is more involved for me with no unix programming experience other than a school project to write an FTP server). On the other hand, you reduce the number of open source firmware to 1:
pi runs standard linux software well supported by huge community. You just rely on arduino firmware and some libraries. The total cost is likely less than getting arduino + wifi shield. If I had more unix programming experience I'd switch away from arduino + wifi model and just slave an arduino with a pi. You let arduino do all time critical work and pi process stuff and connect to internet.

liudr:

  // check for the presence of the shield:

unsigned long start=millis();
  while (WiFi.status() == WL_NO_SHIELD)
  {
    if ((millis()-start)>30000)
    {
      Serial.println("WiFi shield not present");
      // don't continue:
      while(true);
    }
    delay(500);
  }




Shaky original code:



// check for the presence of the shield:
  if (WiFi.status() == WL_NO_SHIELD) {
    Serial.println("WiFi shield not present");
    // don't continue:
    while(true);
  }

even better code:

void setup () {
     Serial.println("WiFi shield not present");
     while (1) {}
}

To be fair, Arduino detects wifi on my systems almost every time since I implemented the 30 second wait. I have 6 identical systems using stock R3 firmware. I could make it more stable if I single out the wifi reset pin and drive it with an arduino pin so if the server is stuck when wifi signal is lost, arduino can reset wifi shield.

liudr,

I have been using the procedure for Windows that appears on the official arduino web site at:

http://arduino.cc/en/Hacking/WiFiShieldFirmwareUpgrading

It does not mention any power up / insert jumper step between flashing wifi_dnld.elf and then flashing wifiHD.elf.

Is it possible that the official directions for flashing the shield left out a step?? :slight_smile:

How are you applying power to the shield? Are you just leaving the usb cable plugged in while jumping and removing the jumper?

fpga6

I followed those steps and didn't get a working shield afterwards :slight_smile:

I then inserted that extra step and the flashing worked. I use usb cabel to power my shield and disconnect it from arduino. It works like this:

  1. flash the "antenna firmware" with jumper wire in place
  2. remove jumper and power cycle the shield (now the firmware in the shield MCU actually flashes the antenna firmware) just kind of wait for some minutes to be safe.
  3. insert jumper again and flash the wifiHD firmware
  4. remove jumper and connect shield to arduino.

Please confirm you can get your shield working with the above 4 essential steps.

liudr-

Your procedure worked well for reflashing. I got a blue light on the wifi shield when I did the power cycle between the two actual reflashing steps.

I still do not have a shield that works. It connects to the LAN (shows 192.168.2.4 in both serial debug readout and on the LAN router), but does not respond to a browser input. I am using a known good program that works on my 2 other wifi shields. I think my wifi shield is probably just defective.

I don't understand why that would be because the at32uc responds properly to FLIP program and verify, and the network sees the wifi radio working at the proper address.

liudr-

Have you noticed that the MAC address that is printed on the sticker attached to your wifi shield does not match the actual MAC? When I look at the MAC on the router it is totally different than the sticker.

fpga6:
liudr-

Have you noticed that the MAC address that is printed on the sticker attached to your wifi shield does not match the actual MAC? When I look at the MAC on the router it is totally different than the sticker.

The MAC address is different from the sticker. I think the sticker is just a serial number. I have 10 shields that I documented both MAC addresses and stick values. One of my shields always returns EE:EE:EE:EE:EE:EE as MAC address with any sample code and connection conditions and I was able to return it for an exchange at sparkfun. One other shield also had a broken inductor and I returned it for exchange. Your shield may be defective as well. I am not ranking the wifh shield Quality Control process very high. 2 defective against 10 working out of a dozen shields is a bit too high to be good quality on my book. What I have been doing the last week or so is to find a way to compile projects to run on raspberry pi. Took a lot of hacking and code borrowing to get serial port to work. I still can't get the millis() to work yet. I was able to run this camera on my Debian box so I will test it on pi too. Wifi is cheap with a dongle when there is driver for the pi. The pi has much better network connectivity. What type of project are you using the wifi shield in? Maybe try a pi + arduino combo?

Liudr-

I've been gone but not forgotten! I have been working with my three wifi shields over the last two months.

I requested an exchange of my one totally dead wifi shield. That one had been DOA. It connected to the LAN but never had responded to the browser. The vendor verified that the shield was not working and arranged an exchange with Arduino.

When I received the exchanged unit it worked, but still had reliability problems

On all of my shields I have been running the firmware that is currently in the GitHub repository that is linked from the Arduino official web site page that documents the update procedure.

From a poster on another topic I learned about the new firmware needed for IDE 1.0.5. As near as I can tell the only place to find these versions is in the hardware folder that comes with the IDE 1.0.5 install package. The old stuff seems to still be up on GitHub in the firmware repository.

I updated wifiHD.elf and still had poor reliability on all three shields. Then I found somewhere in the documentation that BOTH wifi_dnld.elf and wifiHD.elf should be reflashed with the versions of IDE 1.0.5. I did that and have seen a significant improvement in reliability.

Reliability is much better, but not good enough. I put two shields on life test in server mode using the 1.0.5 firmware. Both did much better than with previous firmware. Previously both repeatedly failed within two days. With the new firmware I have gotten 5.5 days on one shield and it is still operating. The other shield ran 3.1 days and then failed. The symptom is the same as previously, browser timeout and it never recovers.

I think the new firmware is a big step in the right direction. I will keep the still operation shield on life test to see how long it goes. I could have variation of reliability between shields due to manufacturing tolerances. If so, one should consistently do better than the other.

How is your project going?