The software system

Basically, BeeBIT establishes a network of several clients, one per bee box, which collect sensor data and send it to a central server. The central server stores the data in a database which is connected to the internet to enable a wide range of applications.

Flow of data from the eHive to your screen.

As for the clients, we use an Arduino Due to collect the data. In the aftermath, we partially regret our decision to have chosen such a device; on the one hand, it simplifies access to some obvious Features, but sometimes Blocks or at least hinders the use of some more complex and subtle functions of the microprocessor. For example, as we wanted to query the temperature sensor of the microcontroller, we had to access the specific component directly, because the Arduino abstraction did not implement such a feature. And of course, our implementation is not compatible with Arduino’s one. So, for small projects, the Arduino might have been the perfect choice, but in our case, it made things harder.

In the recent time, we have implemented some revolutionary Features on the Arduino you might also be interested in (I’ll describe them here in a hopefully high level form. If you are interested in a more technical explanation, you can contact us directly.

Encryption using the mbedTLS library

Well, this is one of the more obvious ones. It is easy to implement a library, right? But we developed our own way of encryption: Each, server and the clients, got their own keys and they basically generate temporary keys to communicate with each other. We can easily authenticate and authorize our clients at the server, and the encryption has shown to only lead to small performance issues about every 30 minutes when client and server exchange new keys to communicate with each other.

GSM on the Arduino Due (i.e. cellular communication)

As you might know, the Arduino GSM library does only work for AVR-based chips which the Arduino Due is not. So we had to develop an own version of it (it only Features internet, no SMS or call functionality is planned to be implemented, as we don’t really need it; we wanted to develop a library from scratch, because the Arduino GSM library felt a bit too bulky, we thought), we are currently tweaking it a bit.

Firmware-Over-The-Air functionality

This was maybe the biggest challenge in developing the software: How to update the software of the Arduino without plugging it to a computer, so we can automatically distribute updates? Well, we did it! We just write the data from some position in our flash storage to the position where the program is executed, and we do this all from RAM. Then we just reset the microcontroller. It sounds really easy when described in such a high level way, but there is hardly any resources on this topic (specifically when you try to update an Arduino…) except from the datasheet and some additional notes by the manufacturer.

The best part about it: The update is independent from the type of internet connection (GSM or Ethernet) and is also encrypted to secure the network even further. The code used for the update might also work on other Atmel-ARM-SoCs, at least on those that include the RSTC and EFC controllers.

Data visualisation: Diagram

But we not only made some progress with client software (by the way, we are currently recording data experimentally, using the GSM library and the encryption and successfully sent some updates). We also tweaked the server software and the database and added a live diagram which is still in an early stage of development. With it, you will are able to display the data in a way which not only computer scientists can understand. It is developed as a responsive website, so it is fully functional on most devices, from smartphone to desktop. You can view up to eight different sensors at once and scroll through all our test data. As mentioned previously, we already translated it into six languages, more to follow. Pretty cool, isn’t it? You will even be able to see when new data comes in approximately every ten minutes! By the way, you can find it here: Diagram. Have fun! If you have any suggestions for improvements or found a bug, please contact us.

(jh, ds) 2015-11-30