Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.20.0.rc2: machine.RTC.synced() always returns False (LoPy) #238

Closed
noahwilliamsson opened this Issue Dec 18, 2018 · 2 comments

Comments

Projects
None yet
4 participants
@noahwilliamsson
Copy link

noahwilliamsson commented Dec 18, 2018

  • Environment
(sysname='LoPy', nodename='LoPy', release='1.20.0.rc2', version='v1.9.4-ecfa670 on 2018-12-17', machine='LoPy with ESP32', lorawan='1.0.2')
  • Exact steps to cause this issue
>>> import machine, os
>>> rtc = machine.RTC()
>>> rtc.now()
(1970, 1, 1, 0, 0, 11, 396241, None)
>>> rtc.synced()
False
>>> rtc.ntp_sync('ntps1-1.eecsit.tu-berlin.de')
23:54:29.551138 IP (tos 0x0, ttl 255, id 6, offset 0, flags [none], proto UDP (17), length 76)
    192.168.2.38.49154 > ntps1-1.eecsit.tu-berlin.de.ntp: [udp sum ok] NTPv4, length 48
	Client, Leap indicator:  (0), Stratum 0 (unspecified), poll 0 (1s), precision 0
	Root Delay: 0.000000, Root dispersion: 0.000000, Reference-ID: (unspec)
	  Reference Timestamp:  0.000000000
	  Originator Timestamp: 0.000000000
	  Receive Timestamp:    0.000000000
	  Transmit Timestamp:   0.000000000
	    Originator - Receive Timestamp:  0.000000000
	    Originator - Transmit Timestamp: 0.000000000
	0x0000:  4500 004c 0006 0000 ff11 652f c0a8 0226  E..L......e/...&
	0x0010:  8295 1108 c002 007b 0038 c594 2300 0000  .......{.8..#...
	0x0020:  0000 0000 0000 0000 0000 0000 0000 0000  ................
	0x0030:  0000 0000 0000 0000 0000 0000 0000 0000  ................
	0x0040:  0000 0000 0000 0000 0000 0000            ............
23:54:29.591036 IP (tos 0x0, ttl 48, id 62633, offset 0, flags [none], proto UDP (17), length 76)
    ntps1-1.eecsit.tu-berlin.de.ntp > 192.168.2.38.49154: [udp sum ok] NTPv4, length 48
	Server, Leap indicator:  (0), Stratum 1 (primary reference), poll 3 (8s), precision -21
	Root Delay: 0.000000, Root dispersion: 0.001129, Reference-ID: GPS^@
	  Reference Timestamp:  3754079661.064495854 (2018/12/17 23:54:21)
	  Originator Timestamp: 0.000000000
	  Receive Timestamp:    3754079669.567783415 (2018/12/17 23:54:29)
	  Transmit Timestamp:   3754079669.567796885 (2018/12/17 23:54:29)
	    Originator - Receive Timestamp:  3754079669.567783415 (2018/12/17 23:54:29)
	    Originator - Transmit Timestamp: 3754079669.567796885 (2018/12/17 23:54:29)
	0x0000:  4500 004c f4a9 0000 3011 3f8c 8295 1108  E..L....0.?.....
	0x0010:  c0a8 0226 007b c002 0038 01f0 2401 03eb  ...&.{...8..$...
	0x0020:  0000 0000 0000 004a 4750 5300 dfc2 b5ad  .......JGPS.....
	0x0030:  1082 cce7 0000 0000 0000 0000 dfc2 b5b5  ................
	0x0040:  915a 40f9 dfc2 b5b5 915b 22a3            .Z@......[".
>>> rtc.synced()
False
>>> rtc.now()
(2018, 12, 17, 23, 54, 39, 961028, None)
>>> rtc.synced()
False
>>> os.uname()
(sysname='LoPy', nodename='LoPy', release='1.20.0.rc2', version='v1.9.4-ecfa670 on 2018-12-17', machine='LoPy with ESP32', lorawan='1.0.2')
  • What you expected

I expected rtc.synced() to return True after the RTC was synced from NTP like in the most recent stable release.

  • What happened instead

rtc.synced() returns False despite the RTC being synced from NTP.

@emmanuel-florent

This comment has been minimized.

Copy link
Member

emmanuel-florent commented Dec 18, 2018

I confirm the issue,this looks like a regression,
LOPY : v1.20.0.rc2 have the issue (does not sync, report unsynced)
LOPY: 1.19.0.b4 does not have the issue
LOPY4: 1.20.0.rc2 does not have the issue

@noahwilliamsson noahwilliamsson changed the title v1.20.0.rc1: machine.RTC.synced() always returns False (LoPy) v1.20.0.rc2: machine.RTC.synced() always returns False (LoPy) Dec 18, 2018

@iwahdan88

This comment has been minimized.

Copy link
Contributor

iwahdan88 commented Mar 1, 2019

Issue Fixed on latest release candidate v1.20.0.rc7

@iwahdan88 iwahdan88 closed this Mar 1, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.