ArmDeveloperEcosystem / lorawan-library-for-pico

Enable LoRaWAN communications on your Raspberry Pi Pico or any RP2040 based board. 📡
BSD 3-Clause "New" or "Revised" License
125 stars 47 forks source link

Support for adafruit_feather_rp2040_rfm9x #35

Closed mdede439 closed 11 months ago

mdede439 commented 1 year ago

Adafruit recently developed and released a new RP2040 board with a LoRa module installed. It is different than the standard RP204 with an externally attached LoRa module. Is there an easy way to modify the definition of "-DPICO_BOARD=adafruit_feather_rp2040" to the newer board?

When I use the otaa_temperature_led example it fails to initialize the the lorawan.
I get this error;

Pico LoRaWAN - OTAA - Temperature + LED

Initilizating LoRaWAN ... failed!!!

I am pretty sure it is because of the design differences in the two boards.

mdede439 commented 1 year ago

I was able to get the new Adafruit RP2040_RFM95 board to work by modifying just the GPIO pins used for the LoRa module. I thought there would be more to it!

const struct lorawan_sx1276_settings sx1276_settings = { .spi = { // .inst = PICO_DEFAULT_SPI_INSTANCE, .mosi = 15, .miso = 8, .sck = 14, .nss = 16 }, .reset = 17, .dio0 = 21, .dio1 = 22 };

sandeepmistry commented 1 year ago

@mdede439 great work!

Have you asked Adafruit if they plan to add a .h here for the board in the pico-sdk? https://github.com/raspberrypi/pico-sdk/tree/develop/src/boards/include/boards

mdede439 commented 1 year ago

I have not done this but will open a new question in their forum.

stale[bot] commented 12 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.