meshtastic / firmware

Meshtastic device firmware
https://meshtastic.org
GNU General Public License v3.0
3.64k stars 913 forks source link

[Bug]: RTC not applying time to fixed position packets #5261

Closed b8b8 closed 5 days ago

b8b8 commented 2 weeks ago

Category

Other

Hardware

Not Applicable

Firmware Version

2.5.9

Description

I have multiple RAK nodes with RTC's. When the device is set with a fixed position (over bluetooth) the correct time is maintained on all future position packets that are sent. After rebooting (remotely) to update settings, the RTC still has a valid time but all future fixed position packets have their time set to zero.

Valid time properly found after fresh boot from RTC DEBUG | ??:??:?? 1 Saved TZ: PST8PDT,M3.2.0,M11.1.0 DEBUG | ??:??:?? 1 Set Timezone to PST8PDT,M3.2.0,M11.1.0 DEBUG | ??:??:?? 1 Read RTC time from RV3028 getTime as 2024-11-05 22:07:46 (1730844466) DEBUG | 14:07:46 1 NeighborInfoModule is disabled DEBUG | 14:07:46 1 Rescanning for I2C keyboard

Time is then stripped off the position packet when it is requested from another node. DEBUG | 14:08:48 63 [PositionModule] Setting local position: lat=49 lon=-123 time=0 timestamp=0 DEBUG | 14:08:48 63 [PositionModule] Sending location with precision 32 INFO | 14:09:16 92 [Router] Stripping time 0 from position send INFO | 14:09:16 92 [Router] Position reply: time=0 lat=49 lon=-123 DEBUG | 14:09:16 92 [Router] Partially randomized packet id 1561338937 INFO | 14:09:16 92 [Router] Asked module 'position' to send a response

Screenshot from a little earlier in the day showing the issue in the android position log. image

Relevant log output

No response

b8b8 commented 1 week ago

Please reopen, this is not fixed and i lack the permission to open it myself.

thebentern commented 1 week ago

Done. I'll try to dig an RTC module out. I think I have one of the WisBlock ones. If not, I'll order one and try to work with one of the external modules

caveman99 commented 1 week ago

Done. I'll try to dig an RTC module out. I think I have one of the WisBlock ones. If not, I'll order one and try to work with one of the external modules

T-Echo has one too

jp-bennett commented 1 week ago

Another solution to this issue, is on incoming position packets, when time is missing or 0, replace with current time.

thebentern commented 5 days ago

Closed with #5396