GNSS Support Issue - chirpstack-concentratord Prevents External GNSS with SX1303 (and others)

Hi ChirpStack team,

I’m reporting an issue with GNSS configuration in chirpstack-concentratord, specifically when using a Raspberry Pi 5 with an SX1303 LoRaWAN Gateway HAT (Waveshare). While the LoRaWAN functionality works perfectly, I’m unable to utilize the on-board GNSS module, and the current code seems to prevent using any external GNSS module as well.

Problem Description:

The issue appears to stem from a check in chirpstack-concentratord-sx1302/src/cmd/root.rs that prevents the GNSS functionality from being enabled if the config.gateway.model_config.gps is set to gnss::Device::None.

Specifically, this line:

The problem is that the Waveshare SX1303 model configuration also sets gnss::Device::None:

Note: I know that file name says sx1302, I’m mentioning it since my HAT uses the SX1303 chip and the configuration from sx1302 seems to be in use.

This check effectively disables GNSS functionality even if:

The SX1303 HAT does have a built-in GNSS module (as mine does, and it works correctly when tested separately).

A user wants to use an external GNSS module, regardless of the presence of an on-board GNSS chip.

Expected Behavior:

The chirpstack-concentratord should allow enabling GNSS functionality even if the model configuration specifies gnss::Device::None. This would enable the use of external GNSS modules.

For the Waveshare SX1303 LoRaWAN Gateway HAT, the default configuration should reflect the presence of the on-board GNSS module (or provide a clear way to enable it without recompiling).

Actual Behavior:

The GNSS functionality is disabled due to the check in root.rs, requiring a recompile of the application to change the gps setting in the model configuration.

Suggested Solution:

I believe the check in root.rs should be modified or removed. Perhaps a configuration option could be added to explicitly enable/disable GNSS, overriding the model configuration. Alternatively, the Waveshare SX1303 model configuration should be updated to reflect the presence of the GNSS module. The best solution would likely allow for both on-board and external GNSS modules to be used.

Thank you for your time and consideration. I’m happy to provide further information or testing if needed.