Using the BBB for an IoT device

OK so I’ve been writing an application for my BBB under Debian in C++ ( with the odd bit of C ) as a way of learning linux programming and C++ programming. The idea was to replicate something I’ve built using a Particle Photon and their SDK for the iPhone app. I currently cross compile my code on my OSX machine using eclipse and a cross compiler I found and that works fine so far.

I’m interested in the IoT and so thought it would be a good exercise to add the capability to the C++ project. So I’ve picked temperature to start with as one of the things my Particle Photon application does to share over the internet and then be integrated into an iOS app to read the temperature.

So the Linux app to read temperature and control some outputs went well, but now I’m struggling with the IoT part of it. What I need is a cloud and SDK’s on both the Linux side and the iOS side to connect the two together.

Firstly I’ve found the Amazon AWS IoT which looks to be a good starting point, but I can’t build the SDK. There’s almost no documentation to help other than a help file which doesn’t help much. It all seems to be focussed on Java, Nodejs, and then if you want C you’re on your own getting a working implementation.

Has anyone else used the Amazon AWS IoT that has got it working?

Alternatively does anyone have any suggestions for a platform that does work under linux in c/c++ for the device side and iOS on the client side with some kind of cloud in between?

I recommend you look at MQTT. MQTT is a popular pub/sub system and has a nice C library (https://www.eclipse.org/paho/files/mqttdoc/Cclient/index.html). You need the client and then a MQTT broker, and for that I’d recommend running a mosquitto server (http://mosquitto.org/) on some version of Linux.

What’s nice is that once you have your data in MQTT, you can easily push it to pretty much any other thing using those hipster programming languages ;). If you search around there’s a github repo where there are some nice MQTT-to-pretty-much-anything plugin for you.

For your setup, you’d run your BBB as the client and either host a MQTT server on your LAN (perhaps with another BBB) or run your own MQTT server remotely. Than bridge your MQTT server to whatever data mining solution you want.

Josh