nuelectronics Arduino Ethernet Shield HTTP Client

hi,

I'm new to Arduino, so please bare with me :slight_smile: I recently order a nuelectronics Ethernet shield with a view to create a device that gathers data from a http server and displays it on an LCD screen.

I've been playing with the examples that are on the nuelectronics site but cant get any of the client examples working (all the others work).

On deploying the code I cant ping the shield and see no evidence of any http activity in my servers log...

What could I be doing wrong :frowning:

Thanks

Mr_p

I don't think you can receive ping responses unless you program the arduino to recognise Ping requests and respond to them. You'd be better off first making sure that you can output to the LCD, and then see if you can connect to a VERY simple web server and download a text file and analyse that.
It would be a good idea to try and download a text file from a webserver first that just contains a 1 or a 0, which should turn on or off pin13 (the onboard LED) respectively.

hi,

Thanks for the reply - I suspected the ping might be due to it not being coded to reply to ICMP, however, I dont see any evidence of it connecting to my http server (looking in the access log nothing appears) so its as if the interface isnt being properly initalised.

Is there any way to see if this is the case?

Thanks

Mr_p

Ok try adding code at various intervals throughout the client connect script that prints something to the LCD, so you can see how far the script actually is progressing..
Or print back to the USB connection as a status indicator.
Keep in mind it could be something as simple as a typo that's stopping the whole script executing..

are you handling ping? do you have something like this in your sketch?

  if(buf[IP_PROTO_P]==IP_PROTO_ICMP_V && buf[ICMP_TYPE_P]==ICMP_TYPE_ECHOREQUEST_V){
    es.make_echo_reply_from_request(buf,plen);  // its a ping so do reply
    Serial.print("Got ping: ");   
  }

Ok - No sign of any ICMP responses in the code - So that explains why it doesnt respond to pings! ;D

I'll try adding some code to flash the onboard LED at vairious points, however, as per my inital post this is the HTTP client example taken from the library - I'd expect it to work as in...

For info the code is:

http://www.mr-p.org/httpclientcode.txt