Dragino LPS8N with MQTT Forwarder uses wrong downlink frequency

I’m a Chirpstack newb.

I have set up a Dragino LPS8N with MQTT Forwarder following these instructions and the communication between the gateway and Chirpstack LNS seems good.

However when I attempt to join a node, I the Join Request looks good but the Join Accept seems to be going out on the wrong frequency.

Dragino LPS8N Gateway Traffic Log:

MQTT packet for the Join Accept:

{
  "downlinkId": 4065950452,
  "items": [
    {
      "phyPayload": "IJiXIWLlR2aeLPZfLljYMgump5xTCfaqvNYXvTu1woCl",
      "txInfo": {
        "frequency": 923300000,
        "power": 21,
        "modulation": {
          "lora": {
            "bandwidth": 500000,
            "spreadingFactor": 10,
            "codeRate": "CR_4_5",
            "polarizationInversion": true
          }
        },
        "timing": {
          "delay": {
            "delay": "5s"
          }
        },
        "context": "u2x2AA=="
      }
    },
    {
      "phyPayload": "IJiXIWLlR2aeLPZfLljYMgump5xTCfaqvNYXvTu1woCl",
      "txInfo": {
        "frequency": 923300000,
        "power": 21,
        "modulation": {
          "lora": {
            "bandwidth": 500000,
            "spreadingFactor": 12,
            "codeRate": "CR_4_5",
            "polarizationInversion": true
          }
        },
        "timing": {
          "delay": {
            "delay": "6s"
          }
        },
        "context": "u2x2AA=="
      }
    }
  ],
  "gatewayId": "a84041ffff27d338"
}

The MQTT packet looks to be specifying a reasonable frequency (923.3Mhz) but the Dragino reports 268.435536Mhz (!!!).

How can I troubleshoot this further? I assume my issue is either in the MQTT Forwarder running on the gateway, or with the gateway itself.

I’ve never used the MQTT forwarder before, but are you using the correct MQTT topic prefix for your region?

Its in the chirpstack-mqtt-forwarder.toml file and should be set to the same band your gateway is configured to listen to.

Interesting, I was not. I am using an existing MQTT infrastructure and chose an arbitrary topic prefix to segregate the LNS traffic. The documentation says:

  # The topic prefix can be used to define the region of the gateway.
  # Note, there is no need to add a trailing '/' to the prefix. The trailing
  # '/' is automatically added to the prefix if it is configured.
  topic_prefix="eu868"

which I took to mean it’s recommended practice (but not required) to make the topic reflect the region. It’s surprising to me that this would also implicitly configuring the region, but I guess it is a convenient way to do it when you have multiple regions on the same LNS.

I have now set topic_prefix="us915_2" in the mqtt forwarder and in the LNS config. This matches the id="us915_2" of the only region I have enabled. I restarted everything and still I get:

Strange, this issue is probably above my pay-grade :sweat_smile:

Although it might help to share a bit more information. I found this on your LPS8N’s user manual:

Where it shows what channels the gateway is configured to use, and in this example the bottom chan_Lora_std is the downlink channel, I’d be curious if yours is showing the proper channels for US915 downlinks.

Are you using Chirpstack V3 or V4? Have you changed anything in the Chirpstack region configuration .toml files? I doubt this is a problem with Chirpstack seeing as the Join accept JSON message is showing the correct frequency, but it can’t hurt to check.

Its also very strange that the Dragino would broadcast on 268mHz, as that frequency doesn’t fall under any LoRaWAN region, might be worth bringing this up with them, their support typically responds in a day in my experience.

I re-installed the gateway to factory defaults, and set it up again. I still have the exact same problem.

Here’s what my gateway’s FreqINFO output says:

FreqINFO:
Gateway Channels frequency
---------------------------------------
chan_multSF_0
Lora MAC, 125kHz, all SF, 905.5 MHz
---------------------------------------
chan_multSF_1
Lora MAC, 125kHz, all SF, 905.7 MHz
---------------------------------------
chan_multSF_2
Lora MAC, 125kHz, all SF, 905.9 MHz
---------------------------------------
chan_multSF_3
Lora MAC, 125kHz, all SF, 906.1 MHz
---------------------------------------
chan_multSF_4
Lora MAC, 125kHz, all SF, 906.3 MHz
---------------------------------------
chan_multSF_5
Lora MAC, 125kHz, all SF, 906.5 MHz
---------------------------------------
chan_multSF_6
Lora MAC, 125kHz, all SF, 906.7 MHz
---------------------------------------
chan_multSF_7
Lora MAC, 125kHz, all SF, 906.9 MHz
---------------------------------------
chan_Lora_std
Lora MAC, 500kHz, SF8, 906.2 MHz
---------------------------------------
chan_FSK

---------------------------------------

906.2Mhz is not the downlink frequency I expected based on this list. I don’t see any place to change this though. This is all the related configuration I can find in the gateway.

As for your other questions:

Are you using Chirpstack V3 or V4?

4.6.0

Have you changed anything in the Chirpstack region configuration .toml files?

I think I am using bog standard region_us915_2.toml but I basically just concatenated it into my main chirpstack.toml so that I have just a single toml file (easier to manage with my docker setup). I obviously changed the [regions.gateway.backend.mqtt] parameters.

I doubt this is a problem with Chirpstack

Agreed. Thanks for your help nonetheless.

might be worth bringing this up with [Dragino]

Yup, I’ve already got a support request open with them, pointing to this thread.

According to the LoRaWAN regional parameters 906.2mHz is the 3rd uplink stream (66) for 500kHz BW US915.

Screenshot 2024-02-14 at 4.39.36 PM

Which makes sense considering you are using US915_2 (the 3rd sub-band). I’m not sure where I got the idea that chan_Lora_std was for downlink, as US868 (which the example was using) downlinks on the same frequency the uplink was received on.

Regardless I’ve exhausted my expertise. Hopefully Dragino can help you out, or someone more knowledgeable on the forum. Good luck!

P.S.

If you haven’t already I’d recommend reading the regional parameters, and perhaps the LoRaWAN specifications in general, they’re not too hard to get through and very important learning material.

1 Like

I believe I’ve isolated this to the chirpstack-mqtt-forwarder. The frequency specified by the LNS is modified when passed on to the gateway.

Here is a JOIN_ACCEPT MQTT packet from the LNS:

{
...
    "frequency": 923300000,
...
}

And the corresponding semtech_udp TxPk:

{
...
  "freq": 268.435632,
...
}

I’ve opened an issue on github: Down frequency gets corrupted between MQTT → Semtech UDP packets · Issue #50 · chirpstack/chirpstack-mqtt-forwarder · GitHub