This project shows the interaction between the X.IP5 slip-radio device and the X.IP5 web demo device through CoAP. The first step is the installation of Contiki OS and 6lbr web server on Raspberry; you can follow this procedure on: https://github.com/Telecontrolli/6lbr-on-Telecontrolli-Devices-XIP.
Firmware
Generate the two firmware (X.IP5 slip-radio/X.IP5-web-demo) to be loaded on the X.IP5 devices. To execute this process, we need the SmartRF06EB with cables and Flash Programmer 2 software.
Completing this process, we can execute this simple project:
- Connect the X.IP5 slip-radio device with the Raspberry.
- Connect to X.IP5 web-demo device the output LED with the PIN that we find in the code board.h.
- Connect the X.IP5 web-demo device with micro USB to power supply.
- Open command prompt on Raspberry and type: “
sudo service 6lbr start
” and press Enter.
System running
If the procedure is correct the system works.
- Open Mozilla Firefox browser on your PC.
- In the search bar, type the gateway address “
http://[bbbb::100]
”
- 6lbr main screen will be open, go on the “sensors” item menu to read the sensor generated
- Now you can operate with the sensor through the 6lbr
- In the table, click on the word “coap”. In the screen just opened you can control the sensors through the network.
Please note, if the Coap doesn’t work, you must install Copper CU, the additional plugin for Mozilla and restart the browser. You can download Copper CU from this link: https://addons.mozilla.org/it/firefox/addon/copper-270430/
Code
/*
* Author: Telecontrolli srl
* File: board.h V1.1
* Description: Defines related to the SmartRF06 Evaluation Board with a CC1310EM
*
* This file provides connectivity information on LEDs, Buttons, UART and other peripherals
*
* This file can be used as the basis to configure other boards using the
* CC13xx/CC26xx code as their basis.
*
* This file is not meant to be modified by the user.
* Header file with definitions related to the I/O connections on the TI
* SmartRF06 Evaluation Board with a CC1310EM
*/
Read More: Digital Output Management with CoAP