Android BLE programming and Arduino/Genuino 101


I recently got the new Genuino 101 because of the on-board features as gyro and BluetoothLE.
I’d like to build custom Android applications that control the Genuino 101 over BLE.
An easy way to do this is using the MIT appinventor2 wit BLE extension, but this tool has limited android functionality. I usually use google and youtube to get enough info on coding android applications. But this time I can’t find an understandable instruction.

I found this guide on the developer webiste: Bluetooth Low Energy - Android Developers
But as i’m not an advanced programmer, i did not succeed in understanding this enough to create an app that works. (I lack some extra info on the use of this code and how to implement it in any application). Even the Example-App confuses me at some points.

So my question is:
Is there anyone with a well explained, simple tutorial/samplecode/… that explains how to connect to the Arduino board and read/write characteristics?

When searching the internet, there is more documentation on BLE and android, but you need a certain level of android programming to get along with it.

As an example of what I’m trying to create an with this, learn about BLE:
In MIT app inventor I created an app with buttons to test and control LED’s. The Arduino has a simple code that listens for an integer characteristic. With that integer the arduino knows to switch an LED on or off. As the macAdress and UUID’s are known, the app does not need to scan for devices (they’re hard-coded), it just connects to my Arduino after pressing the ‘connect’ button. simple as that. (in the attachment: screenshot)

If you are keen to learn Android programming, then you need to continue to struggle with Android and BLE. On the other hand if you just want to control your 101 from you Android mobile and collect and log and plot data, try pfodDesignerV2 and pfodApp.

pfodDesignerV2 lets you design your Android menu and charts, WYSIWYG, and then generates all the necessary 101 code. pfodApp handles all the Android side, no programming required, including scanning for the 101 and connecting.

The 101 generated code illustrates how to create a general Serial connection in BLE for the 101 that you may find useful in any case.

This page Bluetooth Low Energy (BLE) made simple with pfodApp™ Custom BLE controls with no Android coding covers BLE control of the 101 and a number of other BLE boards. See the bottom that page for a link to the Nordic nRF Master Control Panel app which is very useful for displaying the available BLE services and characteristics.

The BLE organization dropped the ball in not defining a BLE version of the Serial Port Profile (SPP), so now we have this mess where every board's control services/characteristics are different and incompatible.