Trying to communicate with a Microchip WLR089U0 LoRa module

Hey guys, I received two Microchip WLR089U0 LoRa modules for free, and I'm trying to use them for communicating between and Arduino Mega 2560 and an ESP 32 Wroom 32. The modules work fine, I tested them in a terminal emulator halled 'HTerm' and I can get them to send and receive data to each other, however, when I'm trying to send the same commands from an ESP through UART, it doesn't really work that well.

There are only certain commands that work, for others, I get "invalid_paragram" or no answer at all in the serial monitor. I wasn't able to send any data out, cause the 'radio tx message' command just doesn't work. I get nothing in response from the serial monitor.

The commands are also pretty strange IMO, every LoRa tutorial I've seen uses the 'AT' commands, but this one has special commands. Here's a list:
Radio_Utility_Reference_ Manual.pdf (254,0 kB)
(TL;DR: commands like 'sys get ver' 'radio tx message' 'radio rx 0' 'radio get sync' etc...)

My baud rate is 115200, and I'm not sure how to set the parity bit or the other parameters over Arduino IDE.

The only command I can use somewhat reliably is 'sys reset' and I get this response:
image
The question marks kinda look like I have the wrong baud rate selected, but I'm at 115200 as the documentation instructs.

Here is the code I use for communicating with the module:

#include <SoftwareSerial.h>

#define RX 16
#define TX 17
SoftwareSerial LoRaSerial(RX, TX); // RX, TX

void setup() {
  Serial.begin(115200); // Initialize USB Serial
  delay(1000);
  
  LoRaSerial.begin(115200); // Initialize Software Serial
  
}

void loop() {
  // Check if data is available on USB Serial
  while (Serial.available()) {
    String data = Serial.readString();
    LoRaSerial.println(data); // Send data to Software Serial

    //Serial.flush() //is very slow
  }

  // Check if data is available on Software Serial
  while (LoRaSerial.available()) {
    String data = LoRaSerial.readString();
    Serial.println(data); // Send data to USB Serial

    //LoRaSerial.flush();
  }
}

Thanks in advance!

1 Like

Just to add the the description, sometimes a command gets trough, sometimes it doesn't, it's like there is some sort of interference or noise in the UART signal.

Software serial wont work at 115200 baud, maybe 38400 baud max.

By why use software serial in the first place, the Mega has a hardware serial port on pins 16,17 ?

I thought that I'll need it in the future for my ESP 32, cause it only has two UART's, and one of them is shared with the USB, and I have two modules that communicate trough UART (GPS and LoRa)

I'm not sure if its possible to only use SoftwareSerial on one module and not all of them

Several assumptions there ....................

The ESP32 has 3 UARTs, one of which is used for program upload.

The LoRa modules dont know or do something different if your using software serial for one module in a link.

you're completely right, I'm sorry. I didn't notice the UART 1 pins on GPIO 9 and 10. I will try without softwareserial and update you

its working, thank you for correcting me!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.