Introduction to App Inventor Bluetooth LE “Low Energy” – Part 0

Bluetooth is a standard for low power communications, over very short distances, at modest data rates. Originally, Bluetooth was intended for applications such as short range cordless phones, wireless headphones, remote control units and other types of devices.

That original version is known as Bluetooth Classic. I wrote a popular tutorial on using Bluetooth Classic in MIT App Inventor apps for Android. Please refer to that tutorial to learn more about the history of Bluetooth and how to write MIT App Inventor apps to use classic Bluetooth with an Arduino board. (Above links were broken until 11 October 2016, since fixed.)

Bluetooth LE Support and The Internet of Things

In 2016, MIT introduced support for Bluetooth Low Energy or Bluetooth LE or just BLE. Bluetooth LE is a version of Bluetooth designed for devices that send data occasionally and where battery life must be measured in weeks to months or longer.

Bluetooth LE is one of several wireless communications standards used for Internet of Things (IoT) connected devices. IoT refers to adding computing and communications to a wide variety of devices, sensors and control systems that were previously mostly “dumb” and not connected to much else.

To understand IoT, consider some example scenarios. A security system uses sensors on doors, windows, and to detect motion.  Today’s sensors might include their own controller and network communication to share information with other sensors and other parts of the security system. May be the security motion sensor could be used to automatically turn on a light, whose switch is connected to the network. Perhaps you can check the status of sensors from an app on your smart phone, or change secure settings remotely.

The idea is lots of “things” can now have intelligent controllers and be networked and exchange data to create new kinds of use scenarios and applications.

One of the largest markets for IoT is in industrial manufacturing. Entire production lines can be outfitted with sensors to detect faults or quality problems before they become a crisis. Machines in the field (such as tractors or jet engines) collect data on their own use and operation, and this is used to identify faults before failure so that maintenance can be performed.

Whatever the IoT future is, it will be large and everywhere.

Bluetooth LE and Android Phones

Some older phones may not work with Bluetooth Classic due to changes in the Bluetooth spec over the years. I have some older phones that I sometimes use for testing which only supported Bluetooth version 2.1. Most all phones today support Bluetooth 4.x and Bluetooth Classic.

Bluetooth LE support was first introduced to Android devices in Android 4.3 for devices having compatible hardware. Additional Bluetooth LE features were added to subsequent Android releases – but some features may only work in the Nexus 5X, Nexus 6 series of phones, and some other very new phones.

I am working on creating Bluetooth LE example code. My first attempt has been with an nRF8001 Bluetooth LE module. I can get this module to connect and receive data from my Nexus 5 phone but have so far been unsuccessful in sending data from the nRF8001 to the App Inventor app running on my phone. I will continue to work on this but I have also ordered some other  Bluetooth LE components in hopes that the problem is hardware or hardware configuration related. Besides, I want to eventually get code working for multiple Bluetooth LE devices.

In my test set up, I am using an Arduino board wired to the nRF8001 module. I have an application written for Arduino to support connecting over Bluetooth LE, and receiving and transmitting data over Bluetooth LE.

On my Nexus 5, I am using an App Inventor app that relies on the Bluetooth LE component that is now available as an extension (added in) to App Inventor. I’ll have more on that in a future post.

For  now, I just wanted to let you know that I am working getting Bluetooth LE running with App Inventor – making progress but its not all working correctly  yet! I do not have a time schedule for when tutorials will appear – I just wanted to let you know that I am working on this.

I’ve called this post “Part 0”. Will go to “Part 1” when I have this working!

 

12 thoughts on “Introduction to App Inventor Bluetooth LE “Low Energy” – Part 0

  1. Pingback: Does your device support Bluetooth LE? Here is how to find out. | App Inventor 2 – Learn to Code!

    • Giuseppe – not sure I understand your question? I am doing freelance work with others, involving an aviation industry project. Cannot say what it is until the product is released, though. Ed

      Like

  2. Hello Edward!
    I’m currently working on a project with nRF51422 and I would like to interface it with App Inventor… Did you manage to send data from nRF8001 to App Inventor??

    Like

    • Kamille,

      The nRF51422 looks like a very neat SoC. It says it supports Bluetooth 5 and Bluetooth LE, I think there is a high likelihood you will be able to communicate with it using the serial Bluetooth 5 compatibility modes (older or traditional Bluetooth). I have not yet got Bluetooth LE working in App Inventor – I had it partially working but got side tracked on another project. I need to get back to that as getting BLE working with App Inventor would be awesome.

      Ed

      Like

      • According to Nordic´s website, nRF51422 only supports BLE and ANT… I believe nRF52 supports Bluetooth 5 as well.
        Could you share your attempts in working with nRF8001 and App Inventor?? I am following some tutorials from Nordic to learn how to use it but I still get stuck a lot.

        Thank you Ed!

        Kamille

        Like

  3. I went off working on another project that lasted until the summer. Thus, my original work described here https://learn2c.org/2016/10/03/introduction-to-bluetooth-le-low-energy-part-0/ – which did not fully work – did not get completed. Thanks for reminding about that item – I really should get to work on this again and think I can do so real soon.

    There’s been updates to App Inventor’s support (in Beta, I think) of some Bluetooth LE components that I have not yet tried. I need to do this! Getting BLE working would be super helpful for a lot of people, including you!

    Ed

    Like

Leave a comment