iotesp32loralorawan

LoRa point-to-point communication


I would like to create a point-to-point connection between a LoRa temperature sensor and a M5 Stack (ESP32) with a LoRa module. However, I am a beginner with LoRa, so I have a few questions:


Solution

    1. LoRa means only the RF modulation. All cryptography happens in higher layers, i.e., the protocol stack—one possible option for this is LoRaWAN. LoRaWAN uses AES-128 encryption in two layers, Network and Application. You didn't give any information about the kind of "LoRa temperature sensor" you have, so it is not possible to make a statement about that, other than that it is not LoRaWAN. So this fully depends on the sensor's firmware. There are alternative protocol stacks to LoRaWAN, DASH7 for example. You also might want to have a look at this Stack Overflow article.

    2. This too depends on the used protocol stack. With LoRaWAN, you need a gateway to receive the node's LoRa telegrams which are then forwarded to the LoRaWAN cloud (TTN/TTS, for example). Your application can get them from there via Internet. If there's already a TTN gateway in reach, your nodes would automatically use that.

    3. You can actually use the M5 with its WLAN capability to act as a message consumer for multiple nodes by subscribing to the cloud via MQTT, for example, using LoRaWAN. Using LoRa without LoRaWAN, this again depends on the alternative protocol stack you are using here. Of course this requires a working WLAN in reach.

    If you are trying to use plain LoRa, which is possible, it is purely your task to implement all the requirements for managing the communication between all involved nodes; it is also your responsibility to ensure that the legal obligations are met.

    I would strongly recommend using LoRaWAN and TTN/TTS as it is the de facto standard for LoRa communications and offers a complete ecosystem that can be used readily without great effort/cost.