Semtech has example code for their LoRaWan SX1276 sub-1 GHz radio. I've used it with an MBED project in the past.
In this post, I'm trying to make their Arduino Shield work with an a RP2040. And have it send data to The Things Network.
components:
- RP2040, e.g. a Raspberry Pico, or a XIAO Pico
- SX1276 shield
- sub-1 GHz antenna with sma connector
- wire
- optional: picoprobe
Connections made between XIAO RP2040 and Semtech shield:
software:
- existing port of Semtech embed lib.
- a working development setup, with the Pico C/C++ SDK
My goal was just to see if I could make the design talk to The Things Network. The short answer: yes, but software isn't ready for prime use.
I forked the Pico port on Github and configured it for XIAO. And for Europe's bandwidth of 868 MHz.
My fork only has a few changes:
- I set Europe / 868 MHz as default
- Pins adapted to a XIAO board. Check the original code if you want to use a Pico
What works:
- project builds without problems
- registering the thing with TTN APB protocol works
- Data exchange works
What has issues:
- registering with OTAA protocol: TTN sees and accepts the thing. But the thing doesn't notice it, and keeps sending join requests
- after a run, the device is in a state that is not correct. Any future attempt to join fails. Unless you run one of its utilities that erases a part of Pico flash.
- after a successful join, a limited set of uplinks (about 10) succeed. Then they start to fail.
This is a bit of a spotty blog. Some success, some failures. I spent a lot of time to reach this point. That leaves less time to write beautiful articles.
But I don't want to let this effort go to waist. It can serve as my starting point, for the next time I try to get this working...
n.b.: related post, using the same software port: Pico IoT LoRaWAN EasyNode