CongducPham / LowCostLoRaGw

Low-cost LoRa IoT & gateway with SX12XX (SX1261/62/68; SX1272/76/77/78/79; SX1280/81), RaspberryPI and Arduino boards
699 stars 352 forks source link

Time synchronization #191

Open cdupont opened 6 years ago

cdupont commented 6 years ago

It would be nice if the gateway get time synchronization from the network. Now the time has to be set up manually, and this can make the measurement timestamps jump.

cdupont commented 6 years ago

NTP can be used simply on the raspberry: https://raspberrypi.stackexchange.com/questions/8231/how-to-force-ntpd-to-update-date-time-after-boot?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa

CongducPham commented 6 years ago

If connected to the Internet, the gateway, on boot, will sync using NTP already.

cdupont commented 6 years ago

Oh OK. We had a time problem in Rwanda, but probably it was with the timezone. Should the timezone be added in some configuration?

CongducPham commented 6 years ago

Normally timezone is managed and messages will be timestamped with timezone info. However, I believe that the current configuration of the gateway use UTC time and not local time.