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:
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!