Close

Trusted Lorawan Sensor Application

A project log for TSensor

Trusted and Secure Lorawan Sensor

michael-grandMichael Grand 05/10/2020 at 18:341 Comment

Mbed OS comes with a Lorawan stack that can be used to easily implement a Lora end-node. An example demonstrating how to use the Lorawan API is also provided by ARM. In this post, we reuse the Mbed Lorawan example to build a Lorawan trusted temperature sensor.

First, a dummy (fake) sensor class is implemented in the Mbed example. In our application, this fake sensor is replaced by a real one : a Pmod TMP3 I2C sensor has to be connected to the SE050 I2C master to use this application. This sensor can be replaced by another but you will have to modify or replace the implemented `getTemp()` function.

Second, the Mbed example is designed to send regularly data through the Lora interface. In this example, we keep all the Lora mechanic except the content of the `send()` function. This function is modified to send the whole attestation object generated by the SE050 when it signs the response of the Pmod TMP3 sensor to host requests (in our case temperature measurements are returned).

RSA or ECC can be used to generate the attestation object, ECC attestation objects are a way smaller than RSA attestation objects so this application uses ECC cryptography. However, ECC attestation objects are still really large (about 150 bytes) so this kind of application will consume slightly more energy that some really low power applications sending only few bytes. Unfortunately, this is the price of the security. Some kind of attestation can also be achieved using symmetric cryptography (smaller keys and therefore less data) but, in this case, both the sensor and a server will have to store one or more secret keys which can be a problem. With asymmetric cryptography, only a public certificate has to be stored.

You can download the trusted lorawan sensor application from github repo mbed-tsensor-lorawan. You will also need a lorawan gateway (or use a public one) and a lorawan network provider (like The Things Network). More information on how to build the application is given in the repo `README.md` file.

In the next post, i am going to show you how to authenticate data sent by the Lorawan node using Python and pyOpenSSL.

Discussions

saudicultureattestation.info wrote 04/30/2023 at 19:17 point

you really did a great job to make the electric honda program object. i want to embed it with my webpage  https://noor-traders.com/saudi-culture-attestation-latest-requirements-from-pakistan/

  Are you sure? yes | no