Monthly Archives: May 2016

Experiments with Bluetooth (and Going Back to Square One)

After my enjoyable round with the Windows IoT projects, I decided to continue my pursuit of the Bluetooth-powered prototype mentioned beforehand. After doing a bit of looking around, I discovered a popular .NET library called 32 Feet, and looking at a few code samples, I downloaded the Nuget package into Visual Studio 2015. I was eager to get cracking on my project, confident my goal was near. Haunted House, here I come! However, upon completion of the download, I noticed an immediate, cryptic error when compiling a simple code sample using 32 Feet. After a bit of research done to decipher the error, I finally learned a lesson about Universal Windows Platforms (i.e., UMP): older Nuget packages are not compatible with the new UWP framework. So, unfortunately, the 32 Feet package became an unviable choice. “Oh well…I guess that I need to find a UWP-compatible library.”

Moving on, I found Microsoft’s answer to my Bluetooth conundrum: the Windows.Devices.Bluetooth namespace. When I saw the available usage of the BluetoothSignalStrengthFilter class and the Windows.Devices.Bluetooth.Advertisement namespace, I became excited once again at the prospect of my prototype’s potential success. Pulling down the entire roster of UMP samples, I began to scrutinize the code so that I may apply whatever lessons to my modest prototype. (Interestingly, when I downloaded the compressed file of code samples to a nested subdirectory, I received an error about the filepath being too long. I considered that strange since I’ve haven’t seen such an error on a Windows system in a long while. Did they change something with Windows 10?) After the preliminary steps of enabling Bluetooth on my phone and using the admin panel to pair the phone with my Raspberry Pi 2 (i.e., RP2), I was able to deploy and run one sample…and, yes, it was able to detect my phone from the RP2! Victory! And with that, I put the device away for the day (which doesn’t exactly fit well in the Adafruit plastic casing), and all was right with the world…

Until the next day. When I attempted to boot the RP2 again with my Windows IoT card, it failed to start normally. Instead, it simply flashed the Active LED (i.e., green) light 7 times, and then it repeated that sequence over and over. Curious as to the issue, I did a search in order to diagnose the problem, and nothing was to be found except for some consolation on a few scattered pages. Disheartened, I now had to accept the facts: it seems that Windows IoT has some ways to go before becoming a mature platform. And I had wanted to believe that things were going to be so easy! So I went ahead and ordered a card with Raspberry Wheezy Linux, preparing myself for the long road ahead of me. Since the future isn’t quite here yet, it’s time to go back to old school and get my hands dirty with some command lines.