Bluetooth LE Troubleshooting

Summary

Bluetooth classic is easy. Pair a device, then use it.

Bluetooth LE is a bit more difficult. The standard (4.0, 4.1, 4.2) offers different security features and bluetooth device use different subsets. Succesful connection with Bluetooth LE devices highly depends on the combination of your Bluetooth device and Android version.

Bluetooth LE vendors

Bluetooth LE devices offering a serial service are typically based on these two SoC: The Bluetooth LE standard does not define a serial protocol, so each of the vendors above defined its own GATT service + characteristic UUIDs. This app supports both.

The Bluetooth LE standard uses the terms pairing & bonding differently than Android, where you get a pairing request for bluetooth bonding. For simplicity I use the term pairing.

Common issues

There are various complaints about the Android Bluetooth stack (e.g. here) but basically no solutions.

I also observed slow connection setup and connection failures or disconnects, in most cases resolved by retries or turning bluetooth off and on in android system settings.

Tested Bluetooth devices

BBC micro:bit based on nRF51822

Status Security ModeAndroid Device
-all- Samsung S3 with Android 6.0
-all- Samsung S3 NEO with Android 4.4

CC41-A based on CC2541

Status Security Mode Android Device
AT+TYPE0 Samsung S3 with Android 6.0
AT+TYPE0 Samsung S3 NEO with Android 4.4
AT+TYPE3 Samsung S3 with Android 6.0
  • The android pairing dialogs sometimes open in foreground, sometimes you have to pick them from the android notification area
  • After pairing the bluetooth device was sometimes not in a connectible state, could be resolved with power toggle
  • Connection sometimes only successful after several retries
  • sporadic connection failure or connection loss, typically better after
    • turning android bluetooth off and on again
    • re-pairing (unpair with long click on device in this app or in android bluetooth settings)
  • Pairing from android bluetooth settings not possible. Fails with 'incorrect PIN or passkey'
AT+TYPE3 Samsung S3 NEO with Android 4.4
  • Either the pairing dialog was shown or the connection was lost after 1/2 second
  • Pairing from android bluetooth settings possible, but does not help

Scanning & Pairing Overview

Depending on bluetooth device and security mode, registering of new devices is different:

Bluetooth DeviceSecurity ModeSCAN in App Pairing in App Pairing in Android
Bluetooth Settings
BBC micro:bit Unsecure
BBC micro:bit JustWorks
BBC micro:bit Passkey
CC41-A AT+TYPE0
CC41-A AT+TYPE3

Other Devices?

If you have results for other devices, please contact me at mail@kai-morich.de