Micropython on RAK11310?

Hi, i’m about to receive Some RAK11310 Modules, and I would be very keen to be able to use micropython with them. Has anyone done this… I dont’ imagine that there will be much issue to get Micropython to run on the module as it is an RP2040 and should work easily in that regard.

I’m thinking about the modules used to communicate with the SX1282 and all the LORA / Lorawan stuff.

Welcome to RAK forum @mrpackethead .

You can use micropython on RAK11310 but I am not aware of any LoRa/LoRaWAN stack for SX1262 in python at the moment. You can have a look on this repo and probably port the sx127x.py to SX1262.

Thanks… thats really helpful place to start.

@carlrowan , Hi there…

I’ve started porting MicroPython to the RAK11310, but i’ve got stuck, because I dont’ ahve an internal schematic of the module. I need this to be able to create the definitions for the pins, and now how to attach ( in software ) the sx1262…

If its not possible to share the schematic, i probably can just work with a table of connecitons.

The port will be opensource and made public in due course, with a working Lora/Lorawan stack.

I have looked in the documetnation, but coud’nt find what i need.

Hi @mrpackethead ,

We do not share RAK11300 schematic to public but to support your open-source project initiative for the LoRa/LoRaWAN python stack I sent something in your inbox.

Hi @mrpackethead

The pin assignment to the SX1262 is in the SX1262-Arduino library:

Make sure that

  • DIO2 is set as RF switch
  • DIO3 is used as power supply for the oscillator
  • Pin RXEN is used as power supply for the RF switch
  • USE_LDO is true

@beegee, thats also very helpful! I had thought about trying to reverse engineer it out of the Ardunio code!

Whats the Size of the Flash on the RAK11300?

Hello Andrew,

The RAK11310 comes with 2MByte flash memory.

Thanks… It was just missing from the datasheet… but thats all good.
I’ve got good news that i’ve been able to compile micropython for the RAK11300, and it appears to run ok… I need to do some more work on the board definitions, and now port the SX1262 code in.

I may have a bad module. :frowning: I had been trying to flash one and it just woud’tn work. I tryed another one, and it works just fine…

FYI, the intention will be to create a firmware version that contains everything required to run the RAK11300, including the drivers for the SX1262 and the lorawan stack…

Does Rak, have USB PID and VID’s for the RAK11300?

The USB PID and VID is defined in the boards.txt of the Arduino BSP.

image

thanks, i’ll include that.

Well, the good news is that i’ve been able to build a version of firmware for Micropython thats specific to the RAK11300… This is in my own fork, but i’ll now work towards getting this merged in. That needs two different projects to update thigns… ( the pico-sdk and micropython )…

The next bit of work will be to include aes as a module, and then finish the driver for the sx1262… Its looking good to make this work.

micropython/ports/rp2/boards/RAK11300 at rak11300 · mrpackethead/micropython · GitHub ( RAK11300 branch )

1 Like

Simple example bit of code… Lorawan to come.

3 Likes