I am fairly new to IoT and to all kinds of Arduino chips/sensors etc.. I am trying to understand the mechanism of LoRa device communication. With the help of the official Arduino web page I found the following code:
void setup() {
Serial.begin(9600);
while(!Serial);
Serial.println("LoRa Sender");
if (!LoRa.begin(868E6)) {
Serial.println("Starting LoRa failed!");
while (1);
}
}
As far as I understand LoRa.begin(868E6) sets the frequency of transmission of the device. The code continues with the loop function:
void loop() {
Serial.print("Sending packet: ");
Serial.println(counter);
// send the data to all
// possible consumers ?
LoRa.beginPacket();
LoRa.print("hello ");
LoRa.print(counter);
LoRa.endPacket();
counter++;
delay(5000);
}
Now if I am not mistaken every other LoRa device within the range of the signal that is also set up to the same frequency (868E6) can receive the data produced by the transmission device. Is my understanding correct? And if yes then how can we prevent unwanted devices to interfere with our system/setup? Should we use some kind of encryption? Maybe certificates?
Thanks in advance to anyone that can help!