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.
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.
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.
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.