Arduino Dragino LMiC: Sending empty downlink with every uplink

Hi All,

I’m using Thomas Laurenson’s fork of the mcci-lmic library (adapted for AU region and Dragino shield) and connecting via ABP. Everything is working fine on the uplink side but i’m having the same problem as others with the gateway sending an empty downlink message after each received uplink, e.g. Downlink sent with every uplink received

Is there a parameter in config.h or somewhere that I can disable this? I don’t want to upset the fair use policy of 10 downlinks per day.

I also read on the same thread that this problem has apparently disappeared on newer versions of mcci-lmic. Does anyone know the history of these forks and updates, and which version fixed the problem?

If anyone can point me to where in the library these settings are managed, maybe I can try and compare side by side and update the relevant part.

The library I am using is here:


Thanks,
GME

You’ll need to determine what the downlink is. Like if it’s an AU915 “Initial ADR” in which TTN tells you what channels to use, or if it’s some other MAC command in which TTN tells your device to adjust its settings as it’s using a bad data rate, then you may not want to ignore that. It may also just be a confirmation (ACK) for a confirmed uplink.

To decipher the downlink see LMIC Library Always Does Unwanted Downlink.

1 Like

thanks, i’ll try and get access to a gateway to be able to see what’s being sent. I suspect now that its do do with forcing the SF and TxPow, so is an ADR issue.

But befor that - i’ve revisited the original post about my version of the library and looks like I should just update and use the latest MCCI LMiC first to see if that resolves. my version is 2years old.

Solved! - just needed to add a line to disable ADR before specifying my SF and TxPow:

// Disable Adr
LMIC_setAdrMode(0);

// TTN uses SF9 for its RX2 window.
LMIC.dn2Dr = DR_SF9;

// Set data rate and transmit power for uplink (note: txpow seems to be ignored by the library)
LMIC_setDrTxpow(DR_SF7,20);

Nice, but unless the device is mobile/moving: why would you want to disable ADR? Using a worse data rate than required will just eat your battery and maximum allowed daily airtime.

That’s only true for EU868 (and for EU868 only needs to be set manually when using ABP). That may also explain why the device did not receive the downlink, even if the LoRaWAN library supports ADR.

Are you sure 20 is allowed in Australia?

Seeing that you’re using SF7, I don’t understand why TTN would want to sent a regular ADR downlink to change the data rate. I’d assume this was initial ADR then, telling you which channels to use? (But maybe you hardcoded the channels into the device?) Or maybe it’s telling you to decrease the transmission power?

I’d really investigate.

The MQTT /events/down/sent topic will show the raw payload too.

1 Like

Sounds like you encountered a known issue with older versions of LMIC. If possible update to a new(er) maintained version of the library.