Become a leader in the IoT community!
New DevHeads get a 320-point leaderboard boost when joining the DevHeads IoT Integration Community. In addition to learning and advising, active community leaders are rewarded with community recognition and free tech stuff. Start your Legendary Collaboration now!
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?
“`c
#include
#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);
}
“`
Hi, @ajaykumar_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!
Thank you @umeshlokhande 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.
Hi @umeshlokhande @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
LoRa_STM32_demo.mp4
Any code you can share @ajaykumar_v ?
we can throw it into a repo
or fork if you already have one
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
CONTRIBUTE TO THIS THREAD