I apologize in advance as my grasp on LoRaWAN isn’t great just yet.
I have a LoRaWAN gateway that consists of a Raspberry Pi 4 with a hat to talk over SPI to a WM1302, based on a Semtech module. My end node is a SparkFun SAMD21 Pro RF board running the Arduino MCCI LMIC library, specifically the ttn-otaa.ino example. I have had success with this setup communicating with The Things Network.
For testing with ChirpStack, I have deployed ChirpStack Network Server on a local Debian laptop and am using version 4. I also have a need to use MQTT, so I have also added the ChirpStack MQTT Forwarder to the Gateway and added Mosquitto to the laptop and with this setup, I am able to get the Gateway to connect to ChirpStack. The issue I’m facing however is that the end-node is not able to connect “fully” to the server.
The end node is able to send a Join Request that then makes it to the server, and also makes it to the correct app and device. That is, I can see the JoinRequest in the “LoRaWAN Frames” tab of the device. I can also see that a JoinAccept has been issued and 9 times out of 10, I can see on the end node that this JoinAccept message has made it all the way down to the end node where it then is able to display it’s received activation credentials from the server. However, with this, the “last seen” time is “Never” for that device, despite the packets being shown under that specific device’s “LoRaWAN Frames” tab. So to me, it seems that the Join handshake between the server and the end node is perfectly fine. However, in the TheThingsNetwork setup, I was able to immediately see data start coming from the device after this handshake. But with this set up, I don’t.
My specific questions I guess are:
a) Does a “last seen” of “never” despite the LoRaWAN frames being shown under the correct device indicate some sort of issue with my config or something or does the “last seen” not get updated until real uplinks with real data come in?
b) Is there something that is automatically setup in TheThingsNetwork’s stack that I need to do manually in ChirpStack to get data to be sent?
I would like to add that the only difference in the device code on the end node between the two examples is just the DevEUI and the AppKey. Also, I have this device configured as Class A. The expected data rate is set to 60 seconds on both the server and the end node.
A) the “last seen” is only updated after the server receives the device’s first real uplink (not including join-request). So the “never seen” is normal if the device uplinks aren’t making it to the server.
B) There are a few manual configuration steps necessary for Chirpstack and the gateway bridge. This is likely the issue.
The issue where no uplinks occur after the join request/accept is pretty common. Usually this happens when Chirpstack tells the device to use the wrong subband/channels in the join-response. So the device begins transmitting on bands the gateway is not listening to.
This can happen when:
The device profile is configured wrong
Your region isn’t enabled in the Chirpstack.toml
Your Gateway Bridge / MQTT Forwarder is sending the wrong topic-prefixes (This is most likely the issue)
So check the following.
Is the device profile’s region and MAC protocol correct for the device?
Is your region enabled in the “enabled_regions =” line of your Chirpstack.toml file?
Is your gateway bridge configured with the correct topic prefixes?
For #3, there are three lines in the chirpstack-gateway-bridge.toml file designating the MQTT topics the gateway bridge publishes to, they should be something like the following:
Where the topic prefix (in my case us915_1) should be whatever region you are using. The different region names are all .toml files in the same directory your chirpstack.toml file is (this depends on how you set up chirpstack). In some versions of the gateway bridge the topic prefix is a single variable you change instead of changing the three lines individually.
I have a similar problem. After sending the join request, it actually gets accepted and the end device start sending uplinks. However, my gateway status shows “disconnected” the whole time.
Also, I am not able to send downlink messages as they only get stacked in the enqueue list. Sending some pictures in attachment.