RAK4600 + Arduino Board

Hello all,
I am using RAK4600 Module. I want to connect this to my Arduino Uno to send the data from the Arduino directly. I wrote the following sketch but most of the time RAK4600 doesn’t respond to the AT commands sent via Arduino.

I have configured everything using the RAK Serial Port Tool and I’m able to send the data using RAK Serial Port Tool.

Please advice me on this where I am going wrong.

#include <SoftwareSerial.h>

const byte rxPin = 2; // Wire this to Tx Pin of RAK4600
const byte txPin = 3; // Wire this to Rx Pin of RAK4600

// Using software serial interface to connect to RAK4600
SoftwareSerial RAK4600 (rxPin, txPin);

void setup() {
  Serial.begin(115200);
  RAK4600.begin(115200); // Baudrate used by RAK4600
  Serial.println("Ready to send AT Commands");
  delay(1000);
  check_device();
  join_lora();
}

void check_device() {
  Serial.println("Checking the device");
  RAK4600.println("at+version");
  delay(30);
  while (RAK4600.available()) {
     String inData = RAK4600.readStringUntil('\n');
     Serial.println("Got reponse from RAK4600: " + inData);
  }
}

void join_lora() {
  Serial.println("Trying to Join to LoRaWAN Network");
  RAK4600.println("at+join");
  delay(50);
  while(RAK4600.available()) {
     String inData = RAK4600.readStringUntil('\n');
     Serial.println("Got reponse from RAK4600: " + inData);
  }
}

void loop() {
  Serial.println("Sending Payload");
  RAK4600.println("at+send=lora:2:012345");
  Serial.println("Payload Sent");
  delay(7000);
}

Thanks

Getting the content here can help you!

Hi, @darkpanda08

Is there a response to the “at+version” command? What is the reply message?

Do you even think SoftwareSerial can work reliably at 115200 bps?

Yes. Sometimes it does give following response.

Firmware Version: RUI v3.0.0.7
OK

I read about that SoftwareSerial that it’s not reliable at 115200 bps. I tried to change the baud rate of RAK4600 by the AT command “at+set_config=device:uart:1:9600” but it returned error “RET_CODE:80”.

Thanks @Nicholas for that, but I don’t have J-Link with me as of now so I can’t burn the Micropython on my module. That’s why I thought to connect the module to Arduino via UART as I don’t need any extra tool for that.

Can anyone help me with changing the baud rate of the module? I tried “at+set_config=device:uart:1:9600” but it returned error “RET_CODE:80”. The Firmware version is RUI v3.0.0.7

Hi @darkpanda08,

I think that version firmware can’t support this feature.
Please send an email to me, [email protected], and i’ll send you the latest firmware which can support changing baud rate feature.