Go Down

Topic: Wifi shield pinging but not serving page (Read 10064 times) previous topic - next topic

zoomkat


Thanks, zk. So why isn't this one client.println()?
Quote
client.print(F("HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n"));

Sheesh, it never ends [slaps, then bangs, forehead], LOL.


Using client.println() instead of client.print() would add an additional carriage return/line feed to what is sent in the header addition to the previous two sent by the appended \r\n\r\n.
Google forum search: Use Google Search box in upper right side of this page.
Why I like my 2005 Rio Yellow Honda S2000  https://www.youtube.com/watch?v=pWjMvrkUqX0

o2drink

Oric_dan, I copied the html section from surferTim and replaced that portion of code in my original sketch.  I believe that (my original) is also posted here or a link to it is.  Basically, surfertim added a serial command as a flag that the wifi is responding.   I think the rest of the code  is the same as I had, unless there is a special char that I didn't see.

Ludgy

Hmmmmmmm very strange...

Regardless though, I'm happy that you're finally up and running.
Happy tinkering!

ImXron

Ludgy,

You're a life saver!!! Was getting an error upgrading the firmware, moving the ELF files to the root of my main drive fixed it for some reason!

thanks again.

Ludgy


Ludgy,

You're a life saver!!! Was getting an error upgrading the firmware, moving the ELF files to the root of my main drive fixed it for some reason!

thanks again.


You're welcome!
I think the reason you were struggling is because the example on the main page was written for Linux/Unix and thus didn't contain the correct Windows path to your files  8)
Glad you've come right though.

This is what I LOVE about the Arduino concept: There's always someone willing to help.

efrazier

//now output HTML data header

          //client.println("HTTP/1.1 200 OK");
          //client.println("Content-Type: text/html");
          //client.println();
         
          client.print(F("HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\n"));

Sorry new here, so not sure how to quote properly.  This thread was a great help to me since I finally got my own firmware upgrade working!  Thank You.

One the above, I just wanted to mention with the above response headers, the protocall expects the extra return at the end of the header, that makes sense, but when I look at the above I don't see why your first example didn't work if println prints \r\n at the end of a line(doc says it does).   If you have access to a machine that can run nc (http://linux.die.net/man/1/nc) you could set that up to listen, switch back to your old code and see what exactly is being recieved.  It makes me wonder about what else could be happening  because those then look identical unless the F() macro changes something too.

Also I found this: http://forum.arduino.cc/index.php?topic=129799.0  See response #4 about using, write(buffer, size) instead of client.print or client.println. Given what was said about the wireshark info(if that is still current), write sounds like the way to go.

Thanks,

Eric

ChrisPhilp

I'm very happy to have found this forum and it appears very helpful.

I am trying to update the firmware on my new WiFi Shield and keep getting the message "AtLibUsbDfu.dll not found". I have copied this file onto the root and into the Atmel\Flip 3.4.7\bin directories, but it still doesn't find the file. Can anyone help? Please ??

SurferTim

When are you getting that message? I copied both files (wifi_dnld.elf and wifiHD.elf) to my C: directory and used the commands on this link.
http://forum.arduino.cc/index.php?topic=183484.msg1487718#msg1487718


ChrisPhilp

Sorry, I should have been more specific.

I've been folllowing the directions from Ludgy's post of August 16, 2013, 05:18:10 am above. I downloaded Flip, copied the firmware files to the root (actually to c:\Users\Dad), then opened the DOS command window, set the jumper on the WiFi board, then tried the first command. Here is the error which pops up in a windows box:

AtJnilsp Message:
AtLibUsbDfu.dll Not Found
(And a standard OK Button)


The frustrating thing is that the AtLibUsbDfu.dll file is in the same folder as the batchisp.exe file and the AtJnilsp.dll file.

The batch then finishes with:
Device selection..........PASS
Hardware selection ....... PASS
Opening port ................FAIL (ISP Done.)

I'm not sure if this is related, but when I plug the board into the USB, the computer keeps looking for a driver. I assume one is not needed.

Again, any help would be gratefully appreciated.





ChrisPhilp

I figured out the problem and thought I'd add it to the post in case anyone else trips over this same issue.

The error "AtLibUsbDfu not found" that I got above was occuring because I had not installed a driver for the WiFi shield. I found a help file in the Atmel sub-directory to be very helpful as a guide to install this driver. Provided you've installed Atmel, this file can be found at :

C:\Program Files\Atmel\Flip 3.4.7\usb\UpdateDriver\WinXP_USB_Driver_Update

This help file is for Windows XP (which I happen to use), but there is a similar help file in the same directory for Windows 2000.

Once I installed the driver, I was able to get the update to work using the steps listed above. And the scripts work too!

Onward we go...



wlfbck

First of all, thank you very much Ludgy.

I have just one small addition to your guide: Should one of the updates fail (for example because you misspelled the file name, like i did), you have to reset the shield and start again with the first update, otherwise it won't work.

And also don't forget to disconnect the jumper again at the end, before connecting the shield with the arduino.


Should you, or a mod/admin, read this, please consider adding this to the original explanatory post.

sotik9


Go Up