Created Sat, 14 Dec 2013 14:11:12 +0000 by Adonosonix
Sat, 14 Dec 2013 14:11:12 +0000
I did purchased a chipkit ethernet Shield, then a Chipkit max32 board and I am very disappointed, because the examples do not work and apparently, there is nothing wrong with the setup.
I first tried the UDP NTP example. I t just does not work. Nothing happens. Only the program start message is printed. I tried to debug using print statements, and I found that the condition
if ( Udp.available() )
is never satisfied. All parameters are good. I checked the time server address and name and that the board could access them. Nothing worked.
I also tried the web server example. It barely works. I cannot access it with safari, which reports a connection error (the server unexpectedly dropped the connection). It randomly works with firefox, about half of the time. When using wget, most of the time I get error messages (Read error at byte 172 (Connection reset by peer).Retrying.)
I tried increasing the delay :
// give the web browser time to receive the data delay(1); // close the connection: client.stop();
It only causes the page delay in loading the page in safari, when it works.
And I added :
Taken from arduino example. It improves things with firefox a little. Does not change anything with wget and safari.
Has anyone actually managed to make the chip kit network shield work with te examples ? I feel completely lostâ€¦
Thank you for reading me.
Sat, 14 Dec 2013 15:18:42 +0000
Which library are you using? There's a couple of different libraries that work with that board, some better than others.
Sat, 14 Dec 2013 15:53:23 +0000
Thanks for your reply. I am using the library that is available for download on chip kit website. There is a zip file to download containing chipkitCAN, chipkitEthernet, etc.
I have integrated chipKitEthernet into an Xcode project (embedXcode) and I am using the chipkitWebServer example provided with the library.
I guess the library provided by chip kit should be the one to use. Also, amongst the chipKitEthernet examples, there is the UPD NTP client example, whiz isn't working at all.
Sat, 14 Dec 2013 17:13:55 +0000
That archive contains two libraries for ethernet. The obvious one to use is the chipKITEthernet library, but that is old code. Also included is the DNETcK library. That is much more up-to-date code and you might have more luck using it.
Sat, 14 Dec 2013 17:23:56 +0000
Thank you. I will try to use it.
I have had no luck with NTP, however, I have found out that the bug in the library is dur to the lack of content-length HTTP header. There should be a solution to fix it. But I haven't found yet how to serve webpages of unknown content length, or how to tell the client that all data have been sent before closing the connection.
I did look at DNETcK, but it seems it does not contain any NTP client example. Can I use the UDPNtpClient example with this library ?