New RAK811 Arduino library

Hi all,

We’ve developed an Arduino library for RAK811, please have a look at the following repo on Github for more details:

1 Like

Hello Fomi,

I have tried the RAK811 LoRaWAN Arduino. I can see the activation signal in ttn network, but no payload data can be seen. In serial monitor, we get EV_JOIN_FAILED.

I use RAK 7243 pilot gateway, AS923

Is it problem in the gateway or the device ?

Regards,

I found the problem.
Just put “LMIC_setClockError(MAX_CLOCK_ERROR * 1 / 100);” after LMIC_reset() and it’s worked fine to me!

Regards,

Hello @Fomi,

As you can see in the figure above, the sending data is not regularly received by the ttn server.
Is it correct ?

Regards,

Hi @mamanbudiman,

Really sorry for late.
We’re testing and debugging RAK811 Arduino firmware too recently. Yes, we find this issue too.
As we debug, it is because that the LoRaWAN arduino library hasn’t configure RAK811’s TX and RX correctly. So the RSSI and SNR is very bad.
We’re working on this issue now, if we resolve it, i’ll tell you ASAP.

Hello @Fomi,
I have a doubt about the guide on the github page: on step 7 it says

Download the *.bin, *.hex or *.elf file from the folder in the above path with JFlash,STM32CubeProgrammer,or any tool if it supports STM32 mcu.

I only have to download one, send it to the RAK811 with the STMCubeProgramer (or one of the other ones) and it will auto-connect when i re-open the serial port on the RAK Serial Port Tool? I keep getting no response from the board at all after downloading the files
EDIT: After i download the file (downloaded the .bin after the arduino sketch compilation) and restart the RAK811 all it prints is “S” on the Serial Port Tool and stops there, any idea what it might be?

Thanks in advance

Hi,@Mplank


@fomi
Do you know why this happens?
I installed the library for arduino, but when I check for the RAK SERIAL PORT TOOL it stays there and does not advance, is there an error in the module?

image
the pin mapping is ok?
thanks!

Hi @ivancho
yes,the pin mapping is right.Did you use the example code and didn’t modify any code?use it with wisblock+rak811 ? Micro USB power it?

Anybody any luck already?
I see the JOIN request being received by my gateway and application device but the JOIN fails.

I think it has to do with the antenna switching in the RAK811. This is not supported by LMIC. I changed LMIC to also switch the PA but was not succesful in receiving anything…

I’m using the “RAK811 Tracker Board”. LED blinking works fine with the arduino suite but receiving the JOIN response fails.

Any suggestions would be helpful. Thanks.

Hi @Milo,

Yes, LMIC is used on RAK811 and there is an issue that the join process will fail usually.
We find this issue too.
So we change another LoRaWAN library, even though the feature is few, but it can work well.
Just for you to refer to:

Ok, thanks. But I really like to have OTAA and LMIC seems to be very useable for that. I’m very willing to patch that library to function with the RAK811.
If you have some ideas on what to fix that would help a lot. Saves a lot of time researching the issue.
For now I thought that the main issue was with the antenna switching but I changed the code to also switch the PA and this did not help. Besides that… My gateway is next to my node so even without proper switching I would assume at least something is received.

Sending seems to also work with the LMIC library and I would assume that ABP mode with the LMIC lib should also work.

@Milo, i’m really sorry for that.
We’ve ever worked on porting LMIC to RAK811 for several days, but not success…
Maybe someone else can help on this? Or we can submit a suggestion togather in LMIC github repo for supporting RAK811, if they agree, RAK can send several RAK811 modules/development boards to LMIC team for debuging.

Ok. Then I’ll try to get it working myself. Should be possible because I do have functioning code in the form of the firmware.

If I get it working I’m very willing to test the other boards as wel :slight_smile: I’ll keep you posted. As this is not my daily job it can take some time.

MAG,
Milo

@Fomi, previous work with LMIC on Arduino Pro Mini with RFM95W was working fine.

LMIC version > 2.2.2 didn’t really work very well.

And then Arduino IDE > 1.8.9 ended up exceeding the 32K memory.

So it could get very complicated trying to resolve!

@Milo Looking forward for your good news. When you resolve it, please feel free to contact with me. :slight_smile:

Hi @nmcc,
Thanks for your information. We’ve used LMIC on RAK4600 and it works well on RAK4600. (Actually, we’ve used it in RAK’s showcase on TTN conference 2020 successfully.)
But for RAK811, it can’t work.
For another project using SX1262, LMIC can’t works too, and we must research how to support SX1262 in LMIC by ourself… So i think there are many things need to do in LMIC, even though LMIC is a better choice of Arduino LoRaWAN stack.

I’m told the registers are different but that the TXCO works really well, so worth the effort.

If I had the time I’d pull LMIC back to it’s barebones, but the reality is that for small production runs of nodes, using a 811 or 4200 with some size of Arduino (Pro Mini or Nano Every) gives quick reliable results.

Hi @nmcc,

Sorry, i can’t understand very well. Do you mean there may be some risk to run LMIC on a small flash size module like RAK811 and RAK4200? or do you mean that an Arduino size RAK811 board will be helpful for resolving the issue?

Yes, exactly that, when we went from LMIC 2.2.2 to any other version, it needed far more flash & was very unreliable and for some reason, even v2.2.2 using Arduino 1.8.10 or above compiles with an even larger binary without changing any code at all.

This is why I have moved to using your modules - we &/or client can use Arduino for rapid prototyping and we can leave you to solve the LoRa Mac problem for us!