Introduction: LibMiletus IoT Framework on DragonBoard
LibMiletus is an open-source interoperability framework that allows IoT devices to identify themselves on a network and thus be controlled by other devices on this network.
Step 1: Install Dependencies
We are assuming that you are already running the Debian distro on your board.
Otherwise, you can install it following this guide .
The /etc/apt/sources.list file contains the information needed to install additional software packages.
Open a terminal (Menu -> System Tools -> LXTerminal) and execute the following command to add the Raspibian sources.
$ sudo cat >> /etc/apt/sources.list <<- "EOF" deb http://archive.raspbian.org/raspbian wheezy main contrib non-free deb-src http://archive.raspbian.org/raspbian wheezy main contrib non-free EOF
If needed, the Raspbian public key can be stored into your apt-get keyring using the command:
$ wget https://archive.raspbian.org/raspbian.public.key -O - | sudo apt-key add -
Update the package manager and install the dependencies using the commands:
$ sudo apt-get update $ sudo apt-get install -y avahi-daemon cmake libmraa-dev libupm-dev
Step 2: Clone the Repository and Build
Clone the repository, where you prefer, using the command:
$ git clone https://github.com/MotorolaMobilityLLC/LibMiletus.git
Navigate to the Linux sub-directory and configure the mDNS using the commands:
$ cd LibMiletus/linux
$ chmod +x configure.sh
$ sudo ./configure.sh --ignore_install=yes
To build, just run the builder script
Now, reboot the board and you can execute the standard Linux Example
$ sudo ./bin/linux_example_wifi
Step 3: Modify the Example
Make a copy from a similar example for Intel Edison version
$ cp example_libMiletus_edison_wifi.cpp example_libMiletus_dragonboard_wifi.cpp
Connect a LED on some digital pin, open the file example_libMiletus_dragonboard_wifi.cpp and change the BUILT_IN_LED macro to reflect the pin that you just connect.
I am using a Linker mezzanine card starter kit for 96Boards and it maps the digital pin 1 to the DragonBoard pin 23, so, for me ti is:
#define BUILT_IN_LED 23
Now, compile it and execute using the command lines:
$ cd bin $ g++ -g ../example_libMiletus_dragonboard_wifi.cpp libMiletus.o linux_wifi.o linux_wrapper.o linux_provider.o -o example_dragonboard_wifi -std=c++11 -lmraa $ sudo ./example_dragonboard_wifi
Now you can control your IoT device through the MiletusApp
You can take a look at the overview page and improve this example adding more sensor and actuators.
Step 4: Controll Your Device by the MiletusApp
You can use the MiletusApp in your Android smartphone to control your smart devices.
Download the least App release at the download page.
Based on your traits the control interface will be dynamically generated in the App
6 years ago
Interesting DragonBoard project. I have been thinking about getting started using this controller. It looks really useful.
Reply 6 years ago
You can also try to use any Linux board ou even a cheap esp8266 based board (NodeMcu) :)