Go Down

Topic: nuelectronics Arduino Ethernet Shield HTTP Client (Read 1 time) previous topic - next topic

Mr_p

Jan 10, 2009, 11:02 pm Last Edit: Jan 10, 2009, 11:03 pm by Mr_p Reason: 1
hi,

I'm new to Arduino, so please bare with me :)  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 :(

Thanks

Mr_p

Tim Stamp

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.

Mr_p

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

Tim Stamp

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..


mem

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

Code: [Select]
 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: ");  
 }



Go Up