Go Down

Topic: Thumbs way down for Arduino WiFi shield. Read before you buy (Read 35 times) previous topic - next topic

liudr

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.

fpga6

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.

liudr

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 :)

fpga6

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.


liudr

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?

fpga6

Refresh = 5 seconds from 100 miles away.

Thanks for the advice on strings.

liudr

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

rsweeten

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.

fpga6

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. 

sonnyyu

An other alternate for Arduino WiFi shield;-


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  http://www.ti.com/ww/en/simplelink/

...


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

Can't beat price, free sample.

liudr

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?

liudr

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.

jacksons



Code: [Select]
  // 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:

Code: [Select]
  // 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:
Code: [Select]

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

liudr

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.

fpga6

liudr,

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

Quote
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??   :)

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

fpga6

Go Up