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

That’s a software problem, not a hardware problem, so compromising with odd hardware probably isn’t the best way to solve it.

What you need is a good [build and] flash solution for an embedded target. To that end there are the atmel->microchip ARM based Arduinos, and various STM32 based equivalents as well.

Mostly the challenges come down to Windows still having horrible driver paradigms.

I have no personal info inside rpi team. But let’s remember that they have a dedicated RPi Silicon team inside. It is true, Broadcom will not bother with the MCU ventures of RPi.

But I have this feeling that RPi will attempt to dominate the MCU space of makers. I might be wrong of course. But they definitely see a market in which the RPi SBC doesn’t fit. The 4usd price point for the features of RP2040 is telling us “hey Rpi silicon here guys!”

Who knows? Hopefully, someone can share some light :thinking:

That’s the Raspberry Pi Foundation you are thinking of. This is Raspberry Pi Trading which does exceeding well at flogging Compute Modules, Raspberry Pi’s and now 140K Picos - this is what funds the Foundation. Leaving aside the aim of the RP2040 is to provide a coherent platform for those going embedded, which as I understand it, is a reflection of where they hope students will stop doing easy stuff on Pi and learn real world tools with a bit more bite.

The RP2040 was an internal effort unrelated to Broadcom.

Fundamentally, the RP2040 provides a nicely package eco-system to wean people off Arduino. For actual devices they may end up with a pre-prepared STM32 or SAML, but at least they won’t have crashed and burnt on the way.

Odd how so?

Is it not a progression of the same old single core offerings. AI at the edge and independent IO seem like they are showing the way forward, rather than just 100+ variations when there could be 10.

I’m genuinely interested to figure out the motivations or end result of the dual core and PIO. Only having 4 ADC with, and I haven’t looked at the details, some issues getting the full 12 bit results seems to be a deficiency. But the rest looks good.

It’s not designed as a sensible embedded platform at all. Realistically if you want something of that general external-not-internal flash sort, in most cases you’re probably better off with an ESP32 which brings radios that you can use (or not) effectively for free.

But most small embedded applications do better with an internal flash MCU.

I’m genuinely interested to figure out the motivations or end result of the dual core and PIO.

Probably heavyweight managed code languages; also I suspect it’s not truly an original design, but a derivative of something someone had sitting around.

As for the “getting code on an embedded device” problem - that’s a software issue not a hardware one; the sensible solution is to develop a good tool flow for already suitable application hardware.

Generally they don’t attempt to dominate in the marketing sense - they concentrate on what’s “right”, even if it’s not exactly “right”. They have no shareholders so they are at liberty to do things differently - they try to hit the sweet spot between commercial and useful to fulfil the aims of the Foundation.

Again, not really, look at the Pi Zero, £4.80 in the UK. They just price it at the lowest possible price point without killing themselves. And if there was any tech business apart from Apple in the world that didn’t need to flag wave to get attention, it’s Raspberry Pi.

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!