Learning LoRa ( using RYLR998 ) seeking for guidance

@Umesh Lokhande @techielew @all a few days back, I kick started working with LoRa from @Umesh Lokhande 's YouTube video on LoRa 👇 Here is the link https://youtu.be/vgYVVC6Lvl8 Key takeaways from video and web are: Why LoRa, How LoRa works. How to configure Module using AT command. Usecase of LoRa. and more… After a fair understanding of RYLR998. I started with RYLR998 LoRa modules I'm able to configure 2 RYLR998's using USB to UART TTL converter. Your guidance is appreciated. Queries are asked in next post
BINARYUPDATES
YouTube
LoRa Module with Arduino- REYAX RYLR998 Tutorial
Learn how to use LoRa Module with Arduino Uno. We’ll use RYLR998 LoRa Module from Reyax Technologies. In this Lora tutorial, we’ll use AT commands to configure radio modules. We’ll communicate two Arduino over wireless LoRa communication protocol. Later, we’ll write arduino code to transmit and receive data.
[SUPPORT] ►► Get FREE TRIA...
Solution:
Hi, @AJAY KUMAR V I'd suggest setting the same Address for both RYLR998 Lora radio modules. And test if both Lora modules communicate using AT commands (as shown in the video). Please note that the default baud rate is 115200 (factory setting) whereas in my code and testing, I changed it to a 9600 baud rate. So if you're following the instructions from my video then you've to modify your code Serial.begin(9600); I hope this will help. Let me know as you progress in your project. Best wishe...
Jump to solution
6 Replies
AJAY KUMAR V
AJAY KUMAR VOP•6mo ago
What I did till now with LoRa modules: 1. Configured RYLR998 using USB to UART converter. 2. Tried to send count value 0 to 3 digits ex: 500 using Arduino and LoRa(1) to other LoRa(2) module which is directly connected to USB to UART converter received and view values sent by LoRa(1). I'm not received any data from LoRa(1) at LoRa2). What could be the reason. Note: Both LoRa's are in same NETWORKID, PARAMETERS, Baud Rate and rest are all same. But different: ADDRESS Q: How can we increase the operating range from a few meters to kilometres?
#include <SoftwareSerial.h>

#define RX 0
#define TX 1


SoftwareSerial LoRaSerial(RX, TX); // Rx, Tx
String lora_band ="865062500";
String lora_networkid="10";
String lora_address ="5";
String lora_tx_address = "6";
int i=0;
unsigned long lastTransmitTime = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200); // Initialize USB Serial
delay(1000);

LoRaSerial.begin(115200); // Initialize Software Serial
delay(1000);
// Configure LoRa module at Startup
LoRaSerial.println("AT+BAND=" + lora_band);
Serial.println("AT+BAND=" + lora_band);
delay(1000);
LoRaSerial.println("AT+ADDRESS=" + lora_address);
Serial.println("AT+ADDRESS=" + lora_address);
delay(1000);
LoRaSerial.println("AT+NETWORKID=" + lora_networkid);
Serial.println("AT+NETWORKID=" + lora_networkid);


}

void loop() {
if (millis() - lastTransmitTime >= 1000)
{
lastTransmitTime = millis();
// put your main code here, to run repeatedly:
send_data(String(i));
i++;
delay(2000);
}
}

void send_data(String message)
{
String mymessage;
mymessage = "AT+SEND=" + String(lora_tx_address)+"," + message.length() + "," + message + "\r\n";
LoRaSerial.println(mymessage);
Serial.print("Data Sent : ");
Serial.print(mymessage);
delay(250);
}
#include <SoftwareSerial.h>

#define RX 0
#define TX 1


SoftwareSerial LoRaSerial(RX, TX); // Rx, Tx
String lora_band ="865062500";
String lora_networkid="10";
String lora_address ="5";
String lora_tx_address = "6";
int i=0;
unsigned long lastTransmitTime = 0;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200); // Initialize USB Serial
delay(1000);

LoRaSerial.begin(115200); // Initialize Software Serial
delay(1000);
// Configure LoRa module at Startup
LoRaSerial.println("AT+BAND=" + lora_band);
Serial.println("AT+BAND=" + lora_band);
delay(1000);
LoRaSerial.println("AT+ADDRESS=" + lora_address);
Serial.println("AT+ADDRESS=" + lora_address);
delay(1000);
LoRaSerial.println("AT+NETWORKID=" + lora_networkid);
Serial.println("AT+NETWORKID=" + lora_networkid);


}

void loop() {
if (millis() - lastTransmitTime >= 1000)
{
lastTransmitTime = millis();
// put your main code here, to run repeatedly:
send_data(String(i));
i++;
delay(2000);
}
}

void send_data(String message)
{
String mymessage;
mymessage = "AT+SEND=" + String(lora_tx_address)+"," + message.length() + "," + message + "\r\n";
LoRaSerial.println(mymessage);
Serial.print("Data Sent : ");
Serial.print(mymessage);
delay(250);
}
Solution
Umesh Lokhande
Umesh Lokhande•6mo ago
Hi, @AJAY KUMAR V I'd suggest setting the same Address for both RYLR998 Lora radio modules. And test if both Lora modules communicate using AT commands (as shown in the video). Please note that the default baud rate is 115200 (factory setting) whereas in my code and testing, I changed it to a 9600 baud rate. So if you're following the instructions from my video then you've to modify your code Serial.begin(9600); I hope this will help. Let me know as you progress in your project. Best wishes!
AJAY KUMAR V
AJAY KUMAR VOP•6mo ago
Thank you @Umesh Lokhande for your response . I tried with 9600 baud as well, 115200 is the default one so I left as it is. Definitely I'll let you know the progress once I restart my hobby project. And again thank you for valuable information.
AJAY KUMAR V
AJAY KUMAR VOP•2mo ago
Hi @Umesh Lokhande @techielew Happy Deewali. Thank you for all your support. A few days back I finished FreeRTOS based LoRa point to point communication using STM32 Dev board. I dropped the plan of doing LoRa project using Arduino I wanted to get exposure outside of Arduino so I took a step forward and went to the ST dev board. I'm happy to share a few seconds demo. This demo shows when the push button is pressed on the Development board (A) it will send ON command to Development board (B) Thank you again @all
techielew
techielew•2mo ago
Any code you can share @AJAY KUMAR V ? we can throw it into a repo or fork if you already have one
AJAY KUMAR V
AJAY KUMAR VOP•2mo ago
I think I need to restructure the design to fix the issues currently has. I'll let you know the update of code sharing after uploading to git Thank you for your support @techielew
Want results from more Discord servers?
Add your server