-->
Page 2 of 6

Re: NTP Client Example (not working!)

PostPosted: Fri Apr 10, 2015 3:11 am
by dnts
OK. I have some findings... i'll post everything in the UDP bug thread where others will stand a better chance of seeing it.

Re: NTP Client Example (not working!)

PostPosted: Fri Apr 10, 2015 3:37 am
by gerardwr
dnts wrote:Hey.. sorry for the distasteful comment I've made in my previous reply.. duh..

You're making an effort to get this thing sorted, so you're forgiven ;-)

dnts wrote:I then checked the referenced bug report and spent the evening crashing my ESP8266 by sending UDP packets. I suspect the root cause is too many instances of UDP opening with differnt port numbers that increment from 4097 (dunno why it starts there) until the heap is exhausted and the watchdog kicks in. Anyway, seems like Udp.begin(port number) does not control which port the UDP packet transmits from hence preventing the NTP reply from reaching the correct port on it's way back to the ESP8266. It MUST be the same port number. Now - I wonder if I can force Udp to listen to that arbitrary egress port (4097) with the Udp.begin.. guess not.
BUG.


In my testing I saw the mentioned port increment too, but could not declare it. My detailed knowledge of internal UDP communication is too limited to pinpoint the root cause.

Thanks for your input, hope that IGRR picks this one up.

Re: NTP Client Example (not working!)

PostPosted: Sat Apr 11, 2015 12:45 pm
by igrr
Thanks for bringing this up again, Gerard, and thanks @dnts for your findings. One-line fix, actually, so stupid of me :oops:
I've added NTP Client sample to the package.

Re: NTP Client Example (not working!)

PostPosted: Sat Apr 11, 2015 3:35 pm
by gerardwr
igrr wrote:Thanks for bringing this up again, Gerard, and thanks @dnts for your findings. One-line fix, actually, so stupid of me :oops:
I've added NTP Client sample to the package.


I'm glad that you've been able to solve it.

When will you publish a new release (for OSX)? Don't really want to build from source, is there a "nightly build"?