RAK811 as an Arduino Uno slave, is this possible?

Hello I am new working in Lora and I have acquired a RAK811 Breakout Module equipment I have seen that it works with AT command, I want to use the RAK811 as a slave of the Arduino Uno is this possible?

Thanks for your help

Welcome to RAK forum @bmadriz .

You can use your RAK811 Breakout Board with Arduino Uno. You can use this library GitHub - RAKWireless/WisNode-Arduino-Library: This repo is used for Arduino board + WisNode-LoRa RAK811 board.

Dear @carlrowan,

Thank you very much for your reply.

The Arduino Uno must have some specific scketch loaded to be able to apply the AT commands ?

Yes. You can actually create your own sketch. Or you can use the library link I posted above.

@bmadriz

RAK811 signals are 3.3V signals. If you use a Arduino UNO, the Uart lines RX and TX are 5V. You need a level shifter between the RAK811 and the Arduino Uno.

1 Like

@beegee and @carlrowan ,

I don’t have a level shifter, but I have an ESP8266 I think I could try with this one, it is already 3.3v.

I have made the following connection (see images) and loaded the script: WisNode-Arduino-Library/Arduino-RAK811-Library/examples/JoinNetworkOTAA at master · RAKWireless/WisNode-Arduino-Library · GitHub

ESP8266

RAK811

But I get the message: set work_mode failed, please reset module.

Few things you need to check.

  1. The library works on baudrate 9600. By default, RAK811 modules are set to work at 115200 baudrate so you need to change it manually via at+set_config=device:uart:1:9600 command. The reason behind this is the SW serial library of Arduino UNO wont work at 115200 baud rate.
  2. You connected the UART pins in D1 and D2 on the ESP8266 board. Have you configured the pins correctly? Is there a way for you to validate that the AT commands are really going out on the TX pin selected on the ESP8266 board?
  3. Can you check if the AT commands are reaching the RAK811 module? Probably via logic analyzer or oscilloscope?

Btw, at 9600 baud rate. You can use voltage divider on the RX side of the RAK811. UART lines are not bidirectional so you can just use voltage divider no mosfet or ic shifters. 9600 is not really fast as long as you don’t use too big resistors for the divider. 1k range should be fine.

The disadvantages of course are extra components and little power dissipation. Advantage is you can just use the Arduino UNO library directly.

That chestnut that maybe @carlrowan could remove from the repository is due to the library issuing a set work mode command which then requires the module to be reset but without a reset connection, that won’t happen and it all grinds to a halt.

I personally configure the basics using the Serial Tool and I don’t use that command in the script as the module will remember the settings.

PS, if you are getting stuck with that message, the connections should be OK