These are chat archives for SmingHub/Sming

16th
Dec 2016
teicors
@teicors
Dec 16 2016 11:04

@/all I'm facing a strange issue: I just downloaded a fresh copy of SmingRTOS (in order to avoid any my mistake) and compiling and launcing the sw SystemClock_NTP I receive the folowing output: is there any mistake? It seems not working the RTC and the adjustment by NTP.

Local Time    : 01.01.1970 00:00:15
UTC Time: 01.01.1970 00:00:15
UDP connect to 193.204.114.233:123
UdpConnection send : #
time updated? 1
ntpClientDemo Callback Time_t = 1481885955 Time = 01.01.1970 00:00:15
Local Time    : 01.01.1970 00:00:15
UTC Time: 01.01.1970 00:00:15

I appreciate any direction.

laurentppol
@laurentppol
Dec 16 2016 11:49
WiFi/TCP problem? pls try anything that involves TCP/IP (even PING).
teicors
@teicors
Dec 16 2016 12:15
I think the TCP/IP is working well: I use a cname pool.ntp.org and is resolved as 193.204.114.233. ;)
teicors
@teicors
Dec 16 2016 12:33

I think I found a bug: using an earlier release, with the same code, I have this output:

dhcp client start...
Local Time    : 17.12.2016 05:11:36
UTC Time: 17.12.2016 05:11:36
Local Time    : 17.12.2016 05:11:37
UTC Time: 17.12.2016 05:11:37
ip:10.42.0.212,mask:255.255.255.0,gw:10.42.0.1
UDP LocalPort: 49154
UDP connect to 94.23.66.89:123
UdpConnection send : #
time updated? 1
ntpClientDemo Callback Time_t = 1481891362 Time = 16.12.2016 14:29:22
Local Time    : 16.12.2016 14:29:22
UTC Time: 16.12.2016 12:29:22
Local Time    : 16.12.2016 14:29:23
UTC Time: 16.12.2016 12:29:23
Local Time    : 16.12.2016 14:29:24
UTC Time: 16.12.2016 12:29:24

is working the RTC and the NTP function.
I can help to solve the issue.

laurentppol
@laurentppol
Dec 16 2016 14:51
but hehe You have CORRECT time at the beginning
what if You depower ESP?
ups, my error, time is NOT correct, but is not ~ "Unix world beginning" neither
teicors
@teicors
Dec 16 2016 14:57
@laurentppol I did'nt correct the time. I have ALWAYS powered the esp. I changed only the Sming dir (the latest change is jun 11 2016).
Regardig the time I suppose the "first" time is random; after I got the time from a NTP server.