Downlink messages not coming in - LMIC/Dragino Lora Shield (sx1276)

Hi all,

I’m trying to recieve downlink messages over the TTN network, but nothing comes in.

I’m using:

  • Arduino UNO

  • Dragino Lora Shield (868Mhz version - sx1276)

  • Arduino-LMIC library (latest version as of today - https://github.com/matthijskooijman/arduino-lmic)

  • The ttn-abp example sketch, modified for my application (NWKSKEY, APPSKEY and DEVADDR) and modified for the pin layout for the Dragino Shield:

    // Pin mapping

    const lmic_pinmap lmic_pins = {
    .nss = 10,// Connected to pin D10
    .rxtx = LMIC_UNUSED_PIN,// For placeholder only, Do not connected on RFM92/RFM95
    .rst = 9,// Needed on RFM92/RFM95? (probably not)
    .dio = {2, 6, 7},// Specify pin numbers for DIO0, 1, 2
    // connected to D2, D6, D7
    };

Uplink messages come in fine at RSSI -93 / -95.

When I send back a downlink message, using the TTN staging dashboard, the sketch output doesn’t show any downlink activity.

Debug log from the serial window:

Starting
RXMODE_RSSI
231: engineUpdate, opmode=0x808
759: TXMODE, freq=868100000, len=25, SF=7, BW=125, CR=4/5, IH=0
Packet queued
67136: RXMODE_SINGLE, freq=868100000, SF=7, BW=125, CR=4/5, IH=0
129925: RXMODE_SINGLE, freq=869525000, SF=9, BW=125, CR=4/5, IH=0
369426: EV_TXCOMPLETE (includes waiting for RX windows)
369480: engineUpdate, opmode=0x800
4119480: engineUpdate, opmode=0x808
4120019: TXMODE, freq=868300000, len=25, SF=7, BW=125, CR=4/5, IH=0
Packet queued
4186332: RXMODE_SINGLE, freq=868300000, SF=7, BW=125, CR=4/5, IH=0
4249119: RXMODE_SINGLE, freq=869525000, SF=9, BW=125, CR=4/5, IH=0
4500744: EV_TXCOMPLETE (includes waiting for RX windows)
4500800: engineUpdate, opmode=0x800
8250801: engineUpdate, opmode=0x808
8251339: TXMODE, freq=868500000, len=25, SF=7, BW=125, CR=4/5, IH=0
Packet queued
8317652: RXMODE_SINGLE, freq=868500000, SF=7, BW=125, CR=4/5, IH=0
8380440: RXMODE_SINGLE, freq=869525000, SF=9, BW=125, CR=4/5, IH=0
8588781: EV_TXCOMPLETE (includes waiting for RX windows)
8588837: engineUpdate, opmode=0x800
12338837: engineUpdate, opmode=0x808
12339378: TXMODE, freq=867100000, len=25, SF=7, BW=125, CR=4/5, IH=0
Packet queued
12405691: RXMODE_SINGLE, freq=867100000, SF=7, BW=125, CR=4/5, IH=0
12468480: RXMODE_SINGLE, freq=869525000, SF=9, BW=125, CR=4/5, IH=0
12750901: EV_TXCOMPLETE (includes waiting for RX windows)
12750961: engineUpdate, opmode=0x800

I’m not really sure where to look next to get downlink data working. The gateway is not under my control.

Any idea what to do to debug this further?

Thanks!

– edit: this is the payload recieved by the ‘shore’ side, screenshot taken at a later time than debug data above.

The “Hello worl!” (without the d) is deliberate.

1 Like

SOLVED by sticking the shield on an Arduino Leonardo.

But, the set-up should also work with an Arduino UNO, right?

So the original question still remains, how to get it working on an Arduino UNO ?

I’ve an Arduino UNO with the Dragine Version 1.3 and downlink is working.
I use the same pin mapping as you
jumpers SV2-4 right position, J_DIO1 & 2 closed, J_DIO5 open

Sketch uses 23,046 bytes (71%) of program storage space. Maximum is 32,256 bytes.
Global variables use 1,249 bytes (60%) of dynamic memory, leaving 799 bytes for local variables. Maximum is 2,048 bytes.

How about rx window timing issues due to clock inaccuracy?

If you would have control over a gateway you could see if a downlink is being sent. Ik might also be that the downlink radio signal doesn’t make it through. Are you within close range of the gateway. With a cheap sdr dongle you can check what is going on “on air”

But forget the last part because the leonardo works

The shield works better on the Leonardo, I recieve downlink messages now. But, after further testing (driving around to test with different gateways) I found that a LOT of times, I don’t get the downlink messages.

Any best practices with the LMIC library to fix this? I have read things about clock timing?

@Batilan : any info on this?

Thanks for this.

I have v1.2 of the shield, and my jumpers are labeled slightly different. Your J_DIO5 corresponds with my JP3, as far as I can tell.

I tried to read-up on the workings of the jumpers, but they are nowhere mentioned in documentation.

Why did you open your J_DIO5?

I opend that jumper because I used pin8 on an additional (gps) shield

I tried the same as you wrote but the dev address is not in good format in the example sketch.
static const u4_t DEVADDR = 0x03FF0001 ; // <-- Change this address for every node!

but the tehthingsnetwork app devaddr format is:

{ 0xFF, 0x85, 0x33, 0x27 }

How did you make it work?

Thank you

Thank you for the answer. Now I try to upload sensor data not only “Hello world!” with this sketch do you have example for DHT22 or other sensor?

There’s a couple of examples here, including one that reads from A0 pin and sends that: https://github.com/gonzalocasas/arduino-uno-dragino-lorawan

Thanks.

I also have same problem. No response in Downlink. I am using a single channel gateway LG01. Does it the problem??

Yes, this is a huge problem as they do not exist - you probably mean a Single Channel Packet Forwarder (SCPF) - a gateway is an 8 channel device - devices expect to be able to transmit on any of the 8 channels and then get the downlink back on that channel in the first transmission slot or the TTN assigned channel for the second slot.

For this reason a SCPF is hugely disruptive to the network so we would ask that you disconnect it from TTN immediately.

1 Like