chirpstack / chirpstack-concentratord

Concentrator HAL daemon for LoRa gateways.
https://www.chirpstack.io/
MIT License
76 stars 53 forks source link

GNSS override is ignored for waveshare_sx1302_lorawan_gateway_hat #184

Open errolt opened 1 week ago

errolt commented 1 week ago

What happened?

Setting model_flags=[ "GNSS" ] is ignored when model="waveshare_sx1302_lorawan_gateway_hat"

What did you expect?

I expected the GPS to be used. If I set model="rak_2287", with the waveshare radio still connected, then the GPS is used, even though the GPS on the module isn't UBLOX

Steps to reproduce this issue

Steps: Add GNSS for model_flags, set model to waveshare_sx1302_lorawan_gateway_hat and set log_level="DEBUG"

Could you share your log output?

With model="waveshare_sx1302_lorawan_gateway_hat"

Opening SPI communication interface
Note: chip version is 0x12 (v1.2)
INFO: Configuring SX1250_0 in single input mode
INFO: using legacy timestamp
INFO: LoRa Service modem: configuring preamble size to 8 symbols
ARB: dual demodulation disabled for all SF
2024-10-13T10:46:40.964Z DEBUG [chirpstack_concentratord_sx1302::concentrator] Getting gateway EUI
2024-10-13T10:46:40.965Z INFO  [chirpstack_concentratord_sx1302::cmd::root] Gateway ID retrieved, gateway_id: "0016c001f15d6607"
2024-10-13T10:46:40.965Z INFO  [libconcentratord::jitqueue] Initializing JIT queue, capacity: 32
2024-10-13T10:46:40.965Z INFO  [libconcentratord::events] Creating socket for publishing events, bind: ipc:///tmp/concentratord_event
2024-10-13T10:46:40.966Z INFO  [libconcentratord::commands] Creating socket for receiving commands, bind: ipc:///tmp/concentratord_command
2024-10-13T10:46:40.966Z DEBUG [chirpstack_concentratord_sx1302::handler::uplink] Starting uplink handle loop
2024-10-13T10:46:40.967Z DEBUG [chirpstack_concentratord_sx1302::handler::jit] Starting JIT queue loop
2024-10-13T10:46:40.967Z DEBUG [chirpstack_concentratord_sx1302::handler::command] Starting command handler loop
2024-10-13T10:46:40.967Z DEBUG [chirpstack_concentratord_sx1302::handler::stats] Starting stats loop, stats_interval: 30s

With model="rak_2287"

Opening SPI communication interface
Note: chip version is 0x12 (v1.2)
INFO: Configuring SX1250_0 in single input mode
INFO: using legacy timestamp
INFO: LoRa Service modem: configuring preamble size to 8 symbols
ARB: dual demodulation disabled for all SF
2024-10-13T10:37:25.920Z DEBUG [chirpstack_concentratord_sx1302::concentrator] Getting gateway EUI
2024-10-13T10:37:25.922Z INFO  [chirpstack_concentratord_sx1302::cmd::root] Gateway ID retrieved, gateway_id: "0016c001f15d6607"
2024-10-13T10:37:25.923Z INFO  [libconcentratord::jitqueue] Initializing JIT queue, capacity: 32
2024-10-13T10:37:25.923Z INFO  [libconcentratord::events] Creating socket for publishing events, bind: ipc:///tmp/concentratord_event
2024-10-13T10:37:25.924Z INFO  [libconcentratord::commands] Creating socket for receiving commands, bind: ipc:///tmp/concentratord_command
2024-10-13T10:37:25.925Z DEBUG [chirpstack_concentratord_sx1302::handler::uplink] Starting uplink handle loop
2024-10-13T10:37:25.925Z DEBUG [chirpstack_concentratord_sx1302::handler::jit] Starting JIT queue loop
2024-10-13T10:37:25.926Z DEBUG [chirpstack_concentratord_sx1302::handler::command] Starting command handler loop
2024-10-13T10:37:25.926Z DEBUG [chirpstack_concentratord_sx1302::handler::stats] Starting stats loop, stats_interval: 30s
2024-10-13T10:37:25.927Z DEBUG [chirpstack_concentratord_sx1302::handler::gps] Starting GPS loop
2024-10-13T10:37:25.927Z INFO  [chirpstack_concentratord_sx1302::handler::gps] Enabling GPS device, tty_path: /dev/ttyS2
2024-10-13T10:37:25.929Z INFO  [chirpstack_concentratord_sx1302::handler::gps] Starting GPS validation loop
2024-10-13T10:37:26.867Z DEBUG [chirpstack_concentratord_sx1302::handler::gps] Processing NMEA RMC
2024-10-13T10:37:26.929Z WARN  [chirpstack_concentratord_sx1302::handler::gps] GPS time reference is not valid, age: 1728815846.929692814s
2024-10-13T10:37:27.000Z DEBUG [chirpstack_concentratord_sx1302::handler::gps] Processing u-blox NAV-TIMEGPS
2024-10-13T10:37:27.002Z DEBUG [chirpstack_concentratord_sx1302::handler::gps] GPS sync error, error: lgw_gps_sync failed
2024-10-13T10:37:27.867Z DEBUG [chirpstack_concentratord_sx1302::handler::gps] Processing NMEA RMC
2024-10-13T10:37:27.930Z WARN  [chirpstack_concentratord_sx1302::handler::gps] GPS time reference is not valid, age: 1728815847.930099601s
2024-10-13T10:37:28.000Z DEBUG [chirpstack_concentratord_sx1302::handler::gps] Processing u-blox NAV-TIMEGPS
2024-10-13T10:37:28.001Z DEBUG [chirpstack_concentratord_sx1302::handler::gps] GPS sync error, error: lgw_gps_sync failed
2024-10-13T10:37:28.861Z DEBUG [chirpstack_concentratord_sx1302::handler::gps] Processing NMEA RMC
2024-10-13T10:37:28.930Z WARN  [chirpstack_concentratord_sx1302::handler::gps] GPS time reference is not valid, age: 1728815848.930370765s
2024-10-13T10:37:28.994Z DEBUG [chirpstack_concentratord_sx1302::handler::gps] Processing u-blox NAV-TIMEGPS
2024-10-13T10:37:29.866Z DEBUG [chirpstack_concentratord_sx1302::handler::gps] Processing NMEA RMC
2024-10-13T10:37:29.999Z DEBUG [chirpstack_concentratord_sx1302::handler::gps] Processing u-blox NAV-TIMEGPS
2024-10-13T10:37:30.863Z DEBUG [chirpstack_concentratord_sx1302::handler::gps] Processing NMEA RMC
2024-10-13T10:37:30.996Z DEBUG [chirpstack_concentratord_sx1302::handler::gps] Processing u-blox NAV-TIMEGPS
2024-10-13T10:37:31.859Z DEBUG [chirpstack_concentratord_sx1302::handler::gps] Processing NMEA RMC
2024-10-13T10:37:31.991Z DEBUG [chirpstack_concentratord_sx1302::handler::gps] Processing u-blox NAV-TIMEGPS
2024-10-13T10:37:32.861Z DEBUG [chirpstack_concentratord_sx1302::handler::gps] Processing NMEA RMC
2024-10-13T10:37:32.990Z DEBUG [chirpstack_concentratord_sx1302::handler::gps] Processing u-blox NAV-TIMEGPS

Your Environment

Component Version
Application Server v?.?.?
Network Server
Gateway Bridge
Chirpstack API
Geolocation
Concentratord v4.4.3
errolt commented 1 week ago

Side note. This is running on a Radxa Rock 5B board. Hence the strange GPS port, i2c port and GPIO allocations.

If this is an issue proving that the GPS on the waveshare hat works fine, even though it isn't Ublox, then I'll be happy to set up a PI4 to do the same tests.

brocaar commented 1 week ago

The Waveshare shield does not have an U-blox GNSS module. Please note that the Semtech HAL only supports the U-blox GNSS modules because it relies on a proprietary binary message for accurate time syncing.

errolt commented 1 week ago

@brocaar Did you read my complete report? The GPS module on the waveshare hat WORKS if I tell concentratord that I have a rak_2287. Does changing the model in the config magically change the GPS module to a UBLOX module?

As I noted in another issue a few years ago, the waveshare GNSS module has been modified to emit UBLOX time messages.

So in the end I just have to run my concentrator misconfigured, set up as a rak_2287, with incorrect power calibration or whatever that causes, just to get GPS to work?