chirpstack / chirpstack-concentratord

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

Incorrect gateway ID for MTCAP3 gateways #186

Closed nicolas-juteau closed 3 weeks ago

nicolas-juteau commented 1 month ago

On chirpstack-mqtt-forwarder start, the gateway id is retrieved. However, for the Multitech MTCAP3 gateway, an incorrect gateway id is retrieved. The retrieved gateway ID should match the EUI of the installed LoRa card.

2024-10-22T15:46:59.485415+00:00 mtcap3 chirpstack-mqtt-forwarder[16915]: Reading gateway id 2024-10-22T15:46:59.493354+00:00 mtcap3 chirpstack-mqtt-forwarder[16915]: Received gateway id, gateway_id: 0016c0XXXXXXXXXX

root@mtcap3:/var/config/home/mtadm# mts-io-sysfs show lora/eui 00:80:00:XX:XX:XX:XX:XX

Specifying (or not) a gateway_id in the concentratord config does not change this behavior.

Using: chirpstack-concentratord-sx1302 4.4.4 chirpstack-mqtt-forwarder 4.3.1 mLinux 6.3.0

brocaar commented 1 month ago

The concentratord reads / uses the EUI embedded in the SX1302/3 chil, could that explain the difference?

On Tue, Oct 22, 2024, 16:59 Nicolas Juteau @.***> wrote:

On chirpstack-mqtt-forwarder start, the gateway id is retrieved. However, for the Multitech MTCAP3 gateway, an incorrect gateway id is retrieved. The retrieved gateway ID should match the EUI of the installed LoRa card.

2024-10-22T15:46:59.485415+00:00 mtcap3 chirpstack-mqtt-forwarder[16915]: Reading gateway id 2024-10-22T15:46:59.493354+00:00 mtcap3 chirpstack-mqtt-forwarder[16915]: Received gateway id, gateway_id: 0016c0XXXXXXXXXX

@.***:/var/config/home/mtadm# mts-io-sysfs show lora/eui 00:80:00:XX:XX:XX:XX:XX

Specifying (or not) a gateway_id in the concentratord config does not change this behavior.

Using: chirpstack-concentratord-sx1302 4.4.4 chirpstack-mqtt-forwarder 4.3.1 mLinux 6.3.0

— Reply to this email directly, view it on GitHub https://github.com/chirpstack/chirpstack-concentratord/issues/186, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABIM6ORMW7NQ57XJ76Q54DZ4ZY63AVCNFSM6AAAAABQM3CXECVHI2DSMVQWIX3LMV43ASLTON2WKOZSGYYDKOBXGQYTEMA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

nicolas-juteau commented 1 month ago

It appears you're right on this one (00:16:C0 IEEE MA-L is registred by Semtec). I don't understand though why Multitech don't provide the Semtec EUI on the gateway label as well as via the mts-io-sysfs command, but rather their own instead. I'll check with them.

nicolas-juteau commented 1 month ago

Meanwhile, wouldn't be pertinent to provide a way to override the EUI used by chirpstack-mqtt-forwarder? I don't know if that's the point of the gateway_id parameter in concentratord, but it appears to have no effect on chirpstack-mqtt-forwarder right now.

brocaar commented 1 month ago

The Concentratord config for the sx1302/3 does not provide a gateway_id config option, it is for the sx1301 only (as it does not have the EUI embedded in the chip): https://www.chirpstack.io/docs/chirpstack-concentratord/configuration.html#chirpstack-concentratord-sx1302

But yes, it would be an idea to add a gateway_id config option to override the EUI provided by the sx1302/3 chip. If you would like to create a PR for this that would be great :-)

nicolas-juteau commented 1 month ago

Done: https://github.com/chirpstack/chirpstack-concentratord/pull/187

brocaar commented 3 weeks ago

187 has been merged, thanks for your work :+1: