Hey. I want to try to make low power device based on ESP32 to send readings to the server.
I have come across this tutorial that describes how to get lora working on ESP32:
https://randomnerdtutorials.com/esp32-lora-sensor-web-server/
Lora reicever function:
What are the indexes '/' , '&' . and '#'.
Also, I am mainly concerned how does it understand which transceiver is sending the data? What if I have multiple LORA transceivers and want to just receive from one of them? How do I ignore the rest? What if I am sending/receiving some sensitive data and my neighbour has LORA receiver on the same frequency band? Is he also gonna receive the message?
For example. in MODBUS RTU we have slave ID, thats how we determine to which and from which device to read/send data. I am not certain how do we determine that in LoRa
I have come across this tutorial that describes how to get lora working on ESP32:
https://randomnerdtutorials.com/esp32-lora-sensor-web-server/
Lora reicever function:
Code:
void getLoRaData() {
Serial.print("Lora packet received: ");
// Read packet
while (LoRa.available()) {
String LoRaData = LoRa.readString();
// LoRaData format: readingID/temperature&soilMoisture#batterylevel
// String example: 1/27.43&654#95.34
Serial.print(LoRaData);
// Get readingID, temperature and soil moisture
int pos1 = LoRaData.indexOf('/');
int pos2 = LoRaData.indexOf('&');
int pos3 = LoRaData.indexOf('#');
readingID = LoRaData.substring(0, pos1);
temperature = LoRaData.substring(pos1 +1, pos2);
humidity = LoRaData.substring(pos2+1, pos3);
pressure = LoRaData.substring(pos3+1, LoRaData.length());
}
// Get RSSI
rssi = LoRa.packetRssi();
Serial.print(" with RSSI ");
Serial.println(rssi);
}
Also, I am mainly concerned how does it understand which transceiver is sending the data? What if I have multiple LORA transceivers and want to just receive from one of them? How do I ignore the rest? What if I am sending/receiving some sensitive data and my neighbour has LORA receiver on the same frequency band? Is he also gonna receive the message?
For example. in MODBUS RTU we have slave ID, thats how we determine to which and from which device to read/send data. I am not certain how do we determine that in LoRa