Raspberry Pi Pico Lorawan connection using RAK4200/RAK4270 Wisduo Breakout Board

Something for me to learn about. As I understand it, the die is tiny as it’s not got flash on it so it gets them 20K yield per wafer, and you can then choose the flash you need externally, you get XIP and can run from RAM. I don’t know how much caching the XIP gets or if you can pick & choose sections of flash to run from RAM. But they do get huge economies of scale for this first release. Four years development need some pay back - later on down the line a single core with a decent amount of RAM / flash to get us the ATmega328P of the RPi silicon line may well transpire.

How much slower is external flash with XIP?

A lot of traditional embedded applications have little need for speed.

Eg, my LoRaWAN nodes run a Cortex M0 at just over two MHz (when they’re not asleep, as they usually are); the only time I noticed that being a limtiation was when I attempted to for laughs to play variable audio tones by software delay rather than setting up a timer. The chip can be clocked much faster of course, but there’s typically no need to do so.

The one place I could see this maybe fitting would be as an RTOS-based low power gateway in conjunction with an SX1302 that would only ever use a mobile data modem for backhaul; the USB host that the ESP32 doesn’t have might be interesting there to use a commodity modem rather than a UART-interfaced one. This could probably be done with a flash based MCU, too, though the high RAM might be handy.

Though once you start playing with the USB in host mode, I’d guess you have to use SWD for development/debug since you couldn’t plug the USB port into a PC at the same time.

I’m attempting to setup this example with a Pico and a RAK4270 but the code never sets up the OTAA. Any suggestions? Thanks Carl

Hi @RGS welcome to rak forum.

Can you share the serial output? Can you double-check the OTAA parameters (deveui, appeui, appkey)?

I ordered a usb serial adaptor that I should receive this weekend. I’ll see what happens when I connect it directly to my Mac. As far as the OTAA parameters, I’m sure they are correct. I’ll post my serial output as soon as I can. Thanks again.

I have no serial output. I’m wondering if my new RAK4270 is not working.

If we takeout the RAK4270, you should at least see set to OTAA because of the line print("set to OTAA").

Is the Rpi PICO working properly? Can you check via an oscilloscope or logic analyzer if there’s a UART output going to RAK4270? Also, can you try to test first the RAK4270 via USB-Serial converter?

I do receive “set to OTAA” with or without the RAK4270 connected. I tried with a second new Pico and still nothing. No response using a USB to serial converter either. Thanks Carl

Alright. We focus first on the RAK4270. Please check the connection.

USBtoUART - RAK4270
3.3V - 3.3V
GND - GND
TX - RX1/PA10
RX - TX1/PA9

If you are using jumper wires to connect them, ensure the continuity using a multimeter. Sometimes jumpers wires are not reliable.

Set baudrate to 115200. Send to RAK4270 at+version. This should at lease show the version of the device.

Btw, you have no success yet on your RAK4270?

It wouldn’t go amiss to share the Pico code - I can see the Matrix …

Success! Nothing like swapping out bad jumpers for more bad jumpers… I opened a new pack of jumper wires and now everything is working perfectly. I would never have guessed it was a bad wire(s). Thanks for your help!

That’s great @RGS !

Actually, I expressed it wrong when I said sometimes jumper wires are not reliable. It should be most of the time they are not reliable.

I usually solder wire wrapping wires to interconnect modules securely.

Not if you buy ones that cost twice as much as the ‘going rate’ that are advertised as “definitely working” - but very hard to tell who to trust.

I have a box of connectors, outer shells & a crimp tool. Plus students to test stuff (like batteries).

Hi Guys, i’ve a problem with the code, when i run it on raspberry Pico it return None on data = uart.readline()

And logically when i try to decode the data variable the error is: AttributeError: ‘NoneType’ object has no attribute ‘decode’

Some suggestions?

Cheers!

Welcome to RAK forum @umbertowski ,

Can you try first a UART loopback test on your RPI Pico? Or try to connect it to a PC via USB-UART converter and replicate the module? Also, is the RAK42xx working well if you use a USB-UART converter?

when i connect the RPI Pico to a PC i don’t see any problem

The problem it isn’t the rak module because i’ve tried to change it and the error still remain, i don’t think the RPI Pico is broke or other because when i connect it to a PC the machine and Thonny recognize the board, maybe the cables i used for connect the module and the RPI are damaged?? like @RGS problem?

I really can’t say @umbertowski .

But I highly encourage you to test the modules first, then the Rpi PICO. Doing individual test will help you pin point the root cause of the problem :wink:

2 Likes

I have solved the problem with a try before every decoded_data = data.decode('utf-8')

1 Like

Which core is a better alternative to the RAK11300 (RP2040) for a LoRaWAN application in terms of deep sleep?