Close

Testing...

A project log for RISE

Solar powered Bluetooth Low Energy window blinds

tiit-rtsepTiit Rätsep 04/21/2015 at 06:360 Comments

The longest and most tedious part of any project.

We need to test if RISE can survive on the sunlight (or lack of it) we have here in Estonia. For that we have installed 4 sets on the windows of our room and set them up to move a few times during the day. We have all of them connected to solar panels and have updated all firmware to the latest power-optimized version (using OTA so no more opening the case to reprogram the device).

To see what's going on inside RISE we have created a few debugging characteristics for reading over BLE. One of these reports the battery level as measured by RISE. To log that I created a python script that uses pygatt to communicate with the BlueZ stack on my Ubuntu machine. It does work ... sometimes :). The problem is that pygatt uses the command line tool gatttool in interactive mode (basically calling command line tools and reading the text output). All that makes the thing very flaky and unstable. It is incredibly slow to begin with and if you add to that the fact that the calls often fail or time out this script becomes next to useless. Even worse - sometimes pygatt fails to close a connection and leaves a device connected for a really long time.

I tried compiling BlueZ from source and using the newest version that has better support for BLE (specifically D-Bus support for BLE) but I failed to get that to install correctly for my system. Somebody should really look into making a native BlueZ library for Python. If only there were more hours in a day...

Back to testing. RISE needs to work without external power on just solar energy. The problem with testing something like that is that we can never know what the exact conditions are at any specific clients location. Estonian winters are really dark and we can go for weeks without much sunshine. It would need to ride through those periods on just battery power. Unfortunately we have only recently started real window testing and we can't really wait until winter again. And all this testing is taking SO LONG....

Discussions