T3.1 WIZ820io Safari Webserver Crash

Status
Not open for further replies.

jmercer

Member
Hello to everyone,


I'm hoping someone could replicate or shed light on my problem.

Hardware: T3.1, WIZ820io w/ PJRC Adaptor, Mac computer. I'm running a straight cable directly from the mac into the WIZ.

Software: Teensyduino 1.18, Arduino 1.0.5, WebServer.ino sketch from Ethernet examples, Safari browser 7.0.3

I modified the stock WebServer sketch for mac address and ip. Also added a ifdef to remove the refresh directive for the http header.

Here's my sketch: View attachment WebServerOriginalExample.ino

I can run this setup successfully all day. I've run separate stress tests accessing the sd card and hiting the webserver every sec and everything seems OK.

Problem: I created a bookmark in Safari to access the server and the server crashes nearly every time I use it.

The request header when I paste the server ip into Safari and sent it to a freshly rebooted setup:

new client
GET / HTTP/1.1
Host: 169.254.11.144
Accept-Encoding: gzip, deflate
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/537.75.14
Accept-Language: en-us
DNT: 1
Connection: keep-alive

client disonnected

Now I can press the Safari refresh icon as many times as I please to get:

new client
GET / HTTP/1.1
Host: 169.254.11.144
DNT: 1
Connection: keep-alive
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/537.75.14
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Cache-Control: max-age=0

client disonnected

Everything is fine. I save the page as a bookmark and put it on the favorites bar, press it and get:

new client
GET / HTTP/1.1
Host: 169.254.11.144
Accept-Encoding: gzip, deflate
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 Safari/537.75.14
Accept-Language: en-us
DNT: 1
Connection: keep-alive

client disonnected

And the server hangs never to be heard from again.


So the server is able to read the client header and print it to serial, then something happens. I don't know at what level its failing at hardware, software, ethernet, SPI. I do know, from a separate test, I can crash the web server and still be reading the SD card into the serial monitor.

I tried this in Firefox without this problem, however, I found that if I quickly bounce the refresh icon on Firefox, the server crashes without sending a reply at all.

I'm not really interested in browser bugs and quirks, but I am interested in protecting the server.

Any ideas for keeping the server alive? or detecting and restarting it if it locks up?

Let me know if there is a better forum to post this question.

Thanks
 
Status
Not open for further replies.
Back
Top