There are many examples of mkr 1310 P2P communication. I am not sure weather there is any example showing secure communication between these devices? using some keys, etc. ?
I think you need this library. GitHub - sandeepmistry/arduino-LoRa: An Arduino library for sending and receiving data using LoRa radios. · GitHub
The RadioHead library supports encrypted communications, with plenty of working examples built in.
I know this library and there is no encription there. It is just for sending data over LoRa. That works fine for me.
I have a project using MKRWAN 1310s in P2P mode and would also like to know the answer to this question. I looked at the Radiohead library and each example seems to be built around a specific radio module.
How hard would it be to convert one of them to work on a MKRWAN 1310 for someone like me who is not an advanced programmer?
The MKRWAN 1310 is a poor choice for P2P communications. It uses a custom radio module that is intended for use with LoRaWAN networks (Sigfox).
I recommend the Adafruit Feather LoRa modules, which come with Arduino examples using the RadioHead libary. They work out of the box for unencrypted P2P communications. A few minor changes to the examples are needed to add encryption.
For any setup that already implements P2P communications, payloads can be encrypted using any of the methods built into available Arduino encryption libraries.
Why do you say this? Just because the radio module has built-in LoRaWAN capabilities doesn't make it unsuitable for Lora P2P. It uses the same Semtech SX1276 RF transceiver as gets used in many embedded projects.
I have had a MKRWAN 1310 doing P2P LoRa for data logging on my property for a couple of years and it works perfectly.
I gave the SimpleArduinoEncryption library a run on a MKR Zero today and the examples work fine apart from one issue that is easily fixed, see Github link below.
If all you are looking for is a very basic and simple XOR encryption scheme that will deter casual snoopers then this would be okay. It is the other end of the scale from commercial grade encryption. The keys are not stored securely.
In the encryption direction you would just replace the unencrypted payload with the encrypted version, and you would need nothing more sophisticated than the SimpleArduinoEncryption, LoRa and MKRWAN libraries and examples which you would be using anyway.
Really? just because it has external PHY chip would not make it a poor choice. I do not think so. Because all secure operations would be done on the main chip. The radio will just transmit those signals.
Help the OP and post the code.
That is not what I said.
Help out the OP by posting some working P2P example code.
My working datalogger is based on the examples in the Sandeep Mistry LoRa library linked below - this is the sender. The receiver code is in the same library.
But these are not encrypted, which is what the OP is asking about. It should not be too hard to insert a basic encryption / decryption scheme like SimpleArduinoEncryption into the examples. If I get time I will do it and post it back here.
arduino-LoRa/examples/LoRaSender at master · sandeepmistry/arduino-LoRa
Hi, thanks. But please do not waste your personal time. I will find it and I found some information already from the above posts.
The main idea to ask this question is to take some inspiration from available code so that I can make it more easier. That it. I do not want readymade code.!