Go Down

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

pYro_65

#120
Dec 01, 2013, 02:04 pm Last Edit: Dec 01, 2013, 02:07 pm by pYro_65 Reason: 1
Here is some useful debug info. I have received a few more corrupt images, but just received the favicon instead.
From looking at the headers, it appears it may be a bug in your code, as it sends an icon type, not just wrong data.

Quote
Request URL:http://68.99.58.119/img/waterfal.jpg
Request Method:GET
Status Code:200 OK
Request Headers
GET /img/waterfal.jpg HTTP/1.1
Host: 68.99.58.119
Connection: keep-alive
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.1.0.0 Safari/537.36
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
DNT: 1


Response Headers
HTTP/1.0 200 OK
Content-Type: image/x-icon
Connection: close
Forum Mod anyone?
https://arduino.land/Moduino/

SurferTim

I just checked my code, and it is correct, but I show the client requested the waterfall image, and then immediately requested the favicon.ico file. It must be getting messed up in the wifi shield firmware somehow.

pYro_65

Lucky I didn't let the browser page close, cos as you say it did load the favicon. After a short delay the tab changed its icon to that of the waterfall picture. If the wifi shield is at fault, then that is a huge blunder, no need to hack security if you can just steal someones socket.
Forum Mod anyone?
https://arduino.land/Moduino/

SurferTim

#123
Dec 01, 2013, 02:30 pm Last Edit: Dec 01, 2013, 08:31 pm by SurferTim Reason: 1
That may be the challenge. I show both images were downloaded correctly, but one immediately after the other. Maybe the firmware is overwriting the first send with the second. but that would be a very serious bug in the firmware. That means it is sending TCP stuff like UDP. The shield is saying "yes, I delivered it", when in fact it hasn't even started to send it yet.

Maybe I owe Matt an apology.

edit: I don't think you stole anybody's socket. I think the firmware overwrote your socket when your web browser requested the icon. That may be what Matt was trying to get across to me.

It would be extremely helpful if I could access the remote IP and port requesting the files. If they are the same on both requests, that would explain a lot, and maybe help fix this.

@MattS_UK: If I haven't pissed you off to the point you quit reading this thread, can you tell me if your software uses the same port to request the images? Maybe that will help fix this. BTW, I apologize for not understanding what you were trying to tell me.

That could be causing the crashes. I don't know how much internal memory the wifi shield has, but if a client requested two images like the waterfall and the soccer pics back-to-back, the resulting memory use could overflow the internal memory and crash the processor.

pYro_65

Quote
edit: I don't think you stole anybody's socket. I think the firmware overwrote your socket when your web browser requested the icon. That may be what Matt was trying to get across to me.


Yeah, not stole, but If the wrong remote socket data can be sent to my local socket, then someone could effectively receive my potentially private/secure page that I have requested.

Quote
It would be extremely helpful if I could access the remote IP and port requesting the files. If they are the same on both requests, that would explain a lot, and maybe help fix this.


You could mimic the session ID with a sequential ID, then browsers, will respond with the ID string you provide. Not useful for a first request, but subsequent requests should contain the ID.

Why not just do the mods you where talking about ( or was that the Ethernet shield only ).
Forum Mod anyone?
https://arduino.land/Moduino/

SurferTim

#125
Dec 02, 2013, 03:07 am Last Edit: Dec 02, 2013, 11:41 am by SurferTim Reason: 1
The mods I talk about are to the ethernet library. The w5100.h file has code that I can get the remote ip and port of a client TCP connection. Unfortunately, the library code for the wifi shield does not have the same type code to retrieve those for a TCP connection, at least not that I have discovered yet. I'm still looking tho. There is code to get the remote ip and port for UDP packets, but it doesn't work for TCP connections.

I don't think any connection to an Arduino will be very secure. I use UDP packets with a passphrase to identify my packets from others, but that is not really secure. Any competent hacker somewhere between my computer or cellphone and the Arduino could get it with wireshark or a packet sniffer. A "man-in-the-middle" attack is a common hack. Only a localnet wired connection is anywhere close to safe. As long as there is nothing to be gained by a hacker breaking your security, you are ok.

edit: I am starting a separate thread for the server problem
http://forum.arduino.cc/index.php?topic=202302.0


MattS-UK

Quote from: SurferTim
Maybe I owe Matt an apology.


:smile:  Thank you.  Very much appreciated.

Quote
@MattS_UK: If I haven't pissed you off to the point you quit reading this thread, can you tell me if your software uses the same port to request the images? Maybe that will help fix this. BTW, I apologize for not understanding what you were trying to tell me.


You haven't pissed me off Tim.  You just frustrate me.  I don't like blowing my own trumpet  but honestly, after 20 years in the  business, I have learnt a thing or two.

In my client application (running on a PC), I create a new socket for each request.  A new source port number is assigned to each new socket, by the Sockets API.  The HTTP request is sent within the socket's Connected event handler.

As I said previously, Wirshark shows the Shield does not adhere to the TCP protocol. The issues you are seeing at the application layer are 'just' symptoms of the poor TCP implementation.  The shield may have other bugs but they can not be properly diagnosed until the bug in the TCP implementation has been fixed.


cantore

#127
Dec 04, 2013, 05:30 pm Last Edit: Dec 09, 2013, 12:35 pm by cantore Reason: 1
I totally agree with liudr. in my opinion arduino wifi shield is not ready for the market.
I suggest you to use wifi_dnld.elf version 2.7 with wifiHD.elf version 26 March 2013 with libraries included in ide 1.0.5. This combination is the one that gives me no problems with wifi shiled that uses ATMEL 32UC3A1512-U (wifi v023-Rev3.B). Does anyone know the right combination of firmware/drivers for the model with ATMEL 32UC3A1256-U (wifi v023-Rev3.A)?
Thanks

I suggest to read this post about wifi shield
http://forum.arduino.cc/index.php?topic=167742.0

Ries

Unfortunately I read your post only after I purchased the Arduino WiFi shield. I can only confirm everything. The first results were encouraging until I found out that the WiFiShield is unreliable. The well known server hangs issue discussed a year ago. It cost me a lot of time as I tried many workarounds. The documentation is lousy as mentioned.  I updated the firmware to the latest stable (1.0.5) .  I need WiFiUdp for synchronizing time so I can not use the previous ( 1.0.4). The main Arduino was working fine only the server hang at intervals ranging from 1 hour to three days.  I tried using the watchdog <avr/wdt.h>  for a reset if  server.status() != 1.  Even that did not work: apparently the shield is not reset this way, but only the main board ( Arduino mega )  and  WiFi.begin(ssid, pass);  fails in the setup() after restart from watchdog. I give up very angry and frustrated and will order a shield from another vendor.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy