-
-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gateway id override #62
base: master
Are you sure you want to change the base?
Gateway id override #62
Conversation
…mqtt loop before polling backend
I'm a bit hesitant to merge this. I understand that the MQTT Forwarder will not start until the Concentratord or UDP Packet Forwarder has started, however this does assure that the correct Gateway ID will be used. It would also mean we now end up with multiple places where the Gateway ID can be set (or overridden). I'm not sure if that is a good thing. |
I understand your hesitation. After looking at the interactions between mqtt-forwarder and concentratord, there might be a better way to achieve this. My understanding is that mqtt-forwarder polls for the Let me know your input on this. Cheers, |
After a deeper look in the code, I guess we're back at square one for this :/ |
Aren't we mixing two things?
|
I think there is a misunderstanding. I was suggesting a different way of solving the issue described here, that does not imply to override the gateway_id in the mqtt-forwarder. I then remembered that the gateway id is always set by the user for sx1301 (not only possible for the sx1302) in the concentratord. However, after checking the concentratord code, I found it won't solve the issue anyway because the code throws in the I will open a separate issue in chirpstack-concentratord about this. |
I think our thoughts partial overlap ;-) What I mean is that there is still a dependency to have a "partially" started Concentratord. If the Concentratord is not starting at all (e.g. it is disabled, hardware fault), you are still in the same situation that the MQTT Forwarder won't start. Still I have mixed thoughts about this. The limitation can also be a feature. If the MQTT Forwarder connects successfully because we make it possible to retrieve the Gateway ID before successfully starting the Concentratord this would lead to a |
Actually, mqtt-forwarder fetches the gateway_id from the backend (either concentratord or semtech_udp). In cases where either concentratord / semtech packet forwarder cannot start for various reasons (i.e: hardware problem with the LoRa card), mqtt-forwarder stalls there and no MQTT connection to the remote broker is made (which is fair enough). This means remote commands cannot be executed anymore because it requires an MQTT connection for that.
The proposed feature is to allow the possibility to override the gateway_id in the configuration file. If set by the user, the mqtt client will use the overriden gateway_id in the configuration file rather than waiting for the backend to respond. This allows for remote command execution (which is a nice feature of mqtt-forwarder), even though no concentrator / packet forwarder backend is started.
If gateway_id is not overriden, mqtt-forwarder operates as usual.
Tested successfully on MultiTech MTCAP / MTCDT gateways.