---
# System prepended metadata

title: Internet-of-Things – Lab Exercise 4

---

# Internet-of-Things – Lab Exercise 4


This lab exercise’s topic is LoRaWAN. We will use the LoRa Boards provided by the IoT-LAB: ST B-L072Z-LRWAN1 boards with ST MEMS extension X-NUCLEO-IKS01A2. 

We will set up a LoRaWAN application which sends data over a network server; finally, we will connect our app to an application server (for a graphical presentation of our data. We will use the same setup as we did for lab exercises 1 & 2: Ubuntu 18.04. (VM) with RIOT-OS and the IoT-Lab.

Document your work with screenshots and thorough explanation where applicable. 
 

Group members: <Gaelle Knibbeler, Anna Kastlunger, Judyta Krzyzak>


Move to your examples directory in RIOT-OS and look for the example lorawan and follow the steps in 


		https://tinyurl.com/loralab


## I.	First Steps with TTN

Registered with TTN, created new application, registered device, wrote the corresponding values to the Makefile, built the board and uploaded it to IoT-Lab. With the correct payload we were getting TTN output as can be seen below.

Provide a screenshot of your data output at TTN.

![](https://i.imgur.com/4KvsgiR.png)

![](https://i.imgur.com/hH6u7Ld.png)

Device EUI - 0070AA8D42103D15
App EUI - 70B3D57ED0031989
App Key - 656473400680F220155B36005B88CCC1

![](https://i.imgur.com/MSxyehy.png)

![](https://i.imgur.com/HI25LNb.png)


## II.	LoRa Example with Sensor Data, TTN, and Cayenne

Download the zip file from Moodle:

lab4_02_lorasensor.zip

Move the unzipped directory into your /myRIOT/examples/ directory and follow the steps back in the hackmd.

Document your steps here with screenshots (IoT-Lab, TTN, myDevices) and thorough explanation. 

![](https://i.imgur.com/fRx1zOR.png)

![](https://i.imgur.com/52I5cHX.png)

![](https://i.imgur.com/tLnntdQ.png)

-	What is your data output at TTN?

![](https://i.imgur.com/hh22dLU.png)

![](https://i.imgur.com/kJVguqt.png)

-	How is your data presented on the myDevices dashboard?

Simple values (just like RSSI and SNR in the screenshot below). But we can improve that!

-	Adjust the settings of the widgets: e.g. display temperature as line chart. Use various widgets.

Set the widget of temperature to Gauge and the widget of humidity to Graph.

![](https://i.imgur.com/Z53i19R.png)

![](https://i.imgur.com/rnwwNX6.png)

-	You can download your data als Excel file (or look at it at right there)

![](https://i.imgur.com/6X4LpjI.png)

-	Upload zip file containing main.c, Makefile.

At first our code had some flaws (Screenshot below) but we were able to fix them (still had some code from exercise 1 in there that was not needed anymore).

![](https://i.imgur.com/deAcF3L.png)


## III.	Going Further – Get 5 Bonus Points

Add the lps22hb atmospheric pressure sensor values to the Cayenne LPP payload.

-	Provide screenshots: IoT-LAB, TTN, myDevices.

![](https://i.imgur.com/jMNA83A.png)

![](https://i.imgur.com/hbkaZrk.png)

![](https://i.imgur.com/9JfGfZx.png)

-	Upload zip file containing main.c, Makefile.


Upload lab protocol (pdf), zip-file(s) to Moodle until July 9th, 2020; 11:59pm.
