Closed ZebNZ closed 4 years ago
I also found sync word is not reliable. Actually, two packets with different sync word may interfere with each other, too. Hence, I use slightly different frequency for diferent LoRa network. Reliable and no interference.
https://lora-developers.semtech.com/knowledge-base/forum/viewthread/48/
Hi @IoTThinks,
I need something that is totally unique (like a password or group code) so only the ESP32s with that code can talk to each other. I also want it as secure as possible making it hard for people to figure out the code to get into the group.
Would changing the frequency slightly do this?
Thanks,
Zeb
Would changing the frequency slightly do this?
No, anyone with a basic SDR will be able to see what frequency you are on. If you want security you should encrypt your data, neither changing the frequency nor the SyncWork
will provide ANY measure of security.
As for the SyncWord
not working, this might be a bug, if the SyncWord doesn't match, the radio should drop the packet.
Hi all,
Thanks @morganrallen and @IoTThinks I will look into both encrypting the data and changing the frequency sightly!
Thanks again,
Zeb
I'm going to leave this open until someone investigates if SyncWords are actually functioning correctly.
Okay I have done some testing!
If the Sync Word on the transmitter and receiver are the same the packets get received fine (this is what should happen).
It seems that if your Sync Word ranges between 0x1 and 0x10 it works fine (the packet will not get received if the receiver Sync Word is 0x4 and the transmitter Sync Word is 0x5).
If your Sync Word ranges between 0x11 and 0x19 and they are similar (like the receiver is 0x12 and transmitter is 0x13) they interfere! However if you skip every second Sync Word (in the range from 0x11 and 0x19) it does not interfere (so your transmitter might be 0x13 and your receiver 0x15 and it will not interfere).
But from 0x20 to 0x99 it works as it should (if the receiver is on 78 and the transmitter on 79 the packet does not get received).
Is it meant to be like this?
Thanks,
Zeb
Interesting test, nice work.
The datasheet should describe the expected behavior, the thread linked above suggests the sync word should provide "90% isolation", I find it odd that it isn't 100% but it could be things like receive error allow some to get through.
Thanks @morganrallen! Am I right that it should be 100% isolation if you range from 0x20 to 0x99?
Thanks,
Zeb
I'm not sure. As I don't fully understand the isolation, or lack of I just don't know. If it does turn out to be a simple bit flip here or there, then yes, I would think the further away they are the less likely they are to erroneously collide. The datasheet doesn't mention anything on SyncWord errors so I can only speculate. I'd recommend setting them farther apart and see if this helps.
Thanks @morganrallen that's great! I will continue to do some testing!
Thanks to all who have helped!
Zeb
Hi all,
I have two ESP32s, one I transmit on and one I receive on. I set different Sync Words on the transmitter and receiver to hopefully stop them communicating with each other, but they are still communicating with each other fine!
RX Code:
TX Code:
Have I done something wrong or have I just misunderstood what Sync Words are?
Thanks
Zeb