Dragino LoRa Shield and Arduino Uno Libraries

I need some advice on libraries to use with the Dragino LoRa Shield. I’m currently trying to use the MCCI LMIC library, but I’m finding it extremely hard to use.

I know of TheThingsNetwork.h library, but it does not work with the Arduino Uno as it only has one serial port. If I were to combine an Arduino Leonardo and Dragino LoRa shield, would the library work?

I would appreciate if anyone has any other recommendations.

There are not really any other viable choices for a LoRaWAN stack under Arduino (versus Arduino code that talks to an AT-command type module that has its own processor and stack inside).

Pretty much everything else was drastically incomplete and entirely unacceptable to even try to use against TTN v3.

In theory one could port LoRaMAC-node, but that’s really written for 32 bit ARM cores and may have some fairly deep-seated assumptions.

Another way of looking at it is that an Arduino UNO isn’t really a recommended platform. You can with care apparently get LMiC to work by disabling some dynamic options. But generally ARM or ESP32 platforms are preferred.

1 Like

Would the possibility of the Arduino Leonardo work with the LoRa shield? I know the Things Uno is a variation of this board.

The TTN Uno uses a Microchip RN module. The Dragino shield uses a RFM module. Both need different software. So you can not use the Dragino shield with the TTN libraries.

1 Like

Do you have any recommendations on what libraries I could use with the Dragino Shield apart from the MCCI LMIC?

No, there is only one realistic option unless you start using 32 bit ARM controllers and that is LMIC.

1 Like

If I wanted to use a Microchip RN Module to access the other libraries, what kind of tech would I have to use? I’m pretty sure the Things Uno has been discontinued.

There are still a few around in the supply chain and Microchip support things forever so its firmware can be updated.

Fundamentally it’s a serial port that you send it commands and it does (mostly) what it’s told - there are other similar things around (like the RAK Uno shield) or you could get an up to date RN module and wire it up.

What is it you want to achieve because there are a number of combinations for reusing what you have or buying one single thing that will do the job.

You might want to consider using a Heltec lora 32 v2. Works well with LMIC-node. I have a dev device which talks to Ttn v3 just fine.

The price of the Heltec is around $18.

Of course, you then have a spare Dragino hat. A mega2560 might work with that but look at the Heltec specs first.

What specifically?

The library in general in my opinion is poorly documented. There isn’t much on what certain functions actually do and why they exist.

I do want to use the Dragino Shield with the Uno, but the libraries for it seem so difficult to use. I do have a Heltec ESP32 LoRa v2 which does works, but the RSSI is way higher when using it. If there was a library similar to the “TTN_esp32.h” for the Dragino, I wouldn’t have as many issues.

MCCI LMIC 1.4 provides a whole series of steps for library configuration and an OTAA example where you fill in two EUI’s and a key, et voila. It just works. The rest of the code where you get to see the status and the payload construction/send etc are all in that sketch.

If you could be a little more specific, or even better, a lot specific, we might be able to get you over your difficulties.

I’d note that the TTN_esp32.h is using a very out of date copy of LMIC that is not going to respond to some of the MAC commands from TTS and I’d be interested to know if the all Zeros mod for the AppEUI was tested against that version of LMIC.

I’d also not that, by the power of Forum Search, you may find that there is a sort of TTN_esp32 that is, erm, entirely up to date and works with Uno and ESP32 and ARM and Pigeon. And has people on here that know it enough to support it, particularly the person who wrote it (not me). So go for LMIC-node. Except that due to memory constraints on the Uno, I’d go for raw LMIC following the, erm, instructions thingy, turning off the stuff you don’t need to save memory.

Does anyone know the:

  • LoRaWAN version
  • Region Parameters version

for the Dragino Shield to register an end device on the things network. I got it working once by accident, now I can’t find any documentation from Dragino on those two versions.

It’s a piece of electronics, it’s the library you are using that decides the LoRaWAN version etc

Using the MCCI LMIC 4.1.1 Library, I’m not having much luck. I’ve set the LoRaWAN version to MAC V1.0.3 and the Regional Parameters to REV A. However, the OTAA example is coming back with:

EV_TXSTART
15813090: EV_JOIN_TXCOMPLETE: no JoinAccept

I have entered the necessary keys correctly, so I don’t know why its doing this now.

:thinking: check pin mappings vs actual?

The pin mapping is also correct for the Dragino Shield:

const lmic_pinmap lmic_pins = {
    .nss = 10,
    .rxtx = LMIC_UNUSED_PIN,
    .rst = 9,
    .dio = {2, 6, 7},
};
1 Like

There is no science in this!

Does the gateway show the join request?
Does the device console show the join request & accept?

This seems like a recurring problem with the Dragino Shield upon further investigation. The Heltec device works fine, but the Dragino board is alot harder to set up in the application panel. It seemed to be alot easier with the ThingsNetwork V2 and alot less issues.