A very simple example on how to send data from an IoT device to a FROST server.

This tiny project is based on the tutorial "ARM mbed LPC1768: Connect to SensorUp SensorThings". The original tutorial permits to send the temperature to a SensorUp SensorThings Playground server from a mbed application board. The source code of the tutorial was modified to replace the temperature sensor by a generator of random numbers, the sending of data to a FROST server hosted on the IoT Lab infrastructure, the support to use the Keil Studio Cloud compiler. This compiler is free and available online, without the need to install it locally on a computer. It is a good alternative to Keil uVision5 compiler, which requires a local installation and a license to get all the features.
The source code of this project can be modified by uploading the project on Keil Studio Cloud. Keil Studio Cloud is using Mercurial as distributed version control: so, do all the modifications only through Keil Studio Cloud.
Follow the following steps to upload the build file provided here on a mbed board:
- Download the built file on your computer.
- Connect the mbed board on an USB port of your computer.
- Copy and paste the
mbed_sensorthings.LPC1768.binfile from your computer to the mbed board. The mbed board is seen as an USB stick.
First of all, the FROST server should have already a structure representing a location where the IoT device is deployed. A basic example is given by Fraunhofer and is available here. Our IoT device, namely the mbed board, is sending the data to the URI /FROST-Server/v1.1/Datastreams(1)/Observations defined in the above JSON file. This JSON file should be sent to the FROST server through the following command:
curl -X POST -H "Content-Type: application/json" -d @demoEntities.json http://frost.iotlab.com:8090/FROST-Server/v1.1/Things -vv
Then, you can go with your preferred Web browser at the URL of the FROST server to see the data sent by the mbed board. The results should be similar to the following illustration:

Cédric Crettaz (IoT Lab), based on the work done by Robin Luo.