Wiring RPI Pico with Adafruit RFM9x LoRa Radio

As @LoRaTracker already mentioned Adafruit apparently uses labels G0 - G5 for DIO0 - DIO5 on this module.

1 Like

OK, thank you so much

The link went to http://pinout which I misread as meaning to go to http://pinout.xyz which is the RPi site for the Pi pins hence my asking for a picture. I’ve edited in the URL in the original post.

Here a picture, anyway
LoRaRadioRFM9x

And here the product page from Adafruit

https://www.adafruit.com/product/3072

Thanks again, Cheers

FYI, a pinout for the LoRa module can be found here: LoRa module pinout.

Hallo and sorry for disturbing you once more.

I’m trying to use an RPI Pico as end node using the LMIC Library under PlatformIO.

The problem is, that I can succesfully build the project on my host computer but I always get “Upload Error 1” when I try to upload the file on the RPI Pico.
Following https://docs.platformio.org/en/latest//faq.html#solution-3-run-from-terminal I also tried an upload from the command line, without any difference (screenshot attached)
Screenshot_2022-04-21_11-25-36

I noticed, however, that the upload process is trying to upload file firmware.elf. As far as I know, I should upload file firmware.uf2 instead.
Can this explain the problem?
Have I forgot a setting anywhere? How can I modify this?
Thank you very much for any help.
Cheers.

I’ve moved this topic so we can umbrella a type of issue in to one, just in case there is anything to cross reference between them.

The .uf2 format is for drag & drop so you could do that manually.

I’ve not used the picotool upload method as I’ve repurposed a Pico as an SWD programmer, as well as having other programmers but most of my Pico programming is on a Pi 4 which also runs as a programmer. So plenty of combos to check.

The other thing is that the .elf is reporting a binary that appears to be destined to run from RAM rather than flash.

Have you got Blinky working on a Pico before you tried this?

1 Like

No, not yet. I will try a blinky test.

By the way, my first experiment used a RPI 4 as host computer, but I did not manage to build the Platform IO Project.
Now I’m using a Linux Laptop and the build runs well.

Thank you

First I followed https://tutoduino.fr/en/pico-platformio/ to modify permissions on USB ports.

Blinky test worked fine.

LMIC-Node test went a step further but ended with "Failed to open directory “RPI-RP2” - Error opening directory “/media/paolo/RPI-RP2”: permission denied.

Any help will be greatly appreciated

Cheers.

Wait. Second test apparently worked. I need to invest more time.

Hello,
upload of LMIC-Node code works. It was my error.

I met however a problem which causes a Failure (Picture
Screenshot_2022-04-22_09-49-20
).
Any idea?

Thanks a lot. Cheers.

What is the code on line 53 of oslmic.c?

Line 53 of oslmic.c is the last instruction of

void os_init(){
     if(os_init_ex((const void *)&lmic_pins))
           return();
     ASSERT(0);
}

i.e. line 53 is ASSERT(0);

Yeah, already knew that, what does it “say” to you that the assert is triggered?

Thank you.

this tells me that somenthing went wrong in os_init_ex(). are the pins wrong connected?

Or maybe I’m trying to initialize the wrong OS?

No, there is a very simple RTOS in the heart of LMIC, but the function does say Initialise the OS with these pin settings so …

yes, it is saying the pins defined in the code aren’t giving a response from the radio. Usually it’s well detailed in the documentation for LMIC-node but you have control over how you connect the radio to the Pico so you have to tell the code how you have connected it.

Thank you. So in this case I need to provide the C code to connect the radio. Do I understand it correctly?

Yes but no - if you read the documentation & the board support file for LMIC-node you will see what the connections are set by default OR you can change them to what you have already connected if they are different.

Please consider that we are all volunteers here and I’m sure that like you find with your students, when people ask questions without any prior learning which leaves them without the foundational skills required, or don’t do any research based on responses & just fire off another question, it can become very tricky to know how to proceed.

I started out my LoRaWAN journey with LMIC and in the end read all of the source code to understand how it all fitted together. LMIC-node is an implementation example / wrapper that is incredibly well documented and tested. Please respect the person who spent hundreds of hours putting it together by going through the documentation with a highlighter to check off the bits you have done/read/implemented and look at the bits you haven’t.

1 Like

You are right. Thank you very much. I need to invest more time on this. Sorry for giving you the impression of not respecting your time. Cheers