This changes the clean_session default to false, as only in case of a persistent session, qos > 0 would be effective. If the client_id is not set, then ChirpStack will generate a random client_id, which stays the same during the lifetime of the chirpstack process. This also implements a subscribe loop, as the client re-connect feature does not re-subscribe. Even in case of a persistent session there is no guarantee that the subscription is recovered, as it might have been a MQTT broker restart. In case the broker stores the sessions in-memory, the client would re-connect, but without subscriptions. The (re)subscribe logic is placed outside the on-connected callback, as the callback function must not block, thus can not wait for the subscribe result. No the (re)subscribe happens async from the on-connected.
ChirpStack open-source LoRaWAN Network Server
ChirpStack is an open-source LoRaWAN Network Server, part of the ChirpStack project.
Note: this repository contains the source of what is going to be ChirpStack v4. This release merges the ChirpStack Network Server and ChirpStack Application Server components into a single service, making it a lot easier to setup a multi-region ChirpStack instance. This is still work in progress.
Please refer to the forum announcement for background information: https://forum.chirpstack.io/t/changes-coming-to-chirpstack/13101
Testing / building from source
To build ChirpStack from source, run the following command:
make test-server
Note: this requires a Linux environment With Docker and Docker Compose setup. Pre-compiled (test) binaries will be provided soon.
License
ChirpStack Network Server is distributed under the MIT license. See also LICENSE.