17
votes

We are making a IOT device with a BLE interface which uses the HM-11 (http://www.seeedstudio.com/wiki/Bluetooth_V4.0_HM-11_BLE_Module) breakout board hosting the chip CC2541 (http://www.ti.com/product/CC2541).

The authentication method is set to 2:Auth with PIN

Clip from the data sheet showing available authentication modes is as follows:

63. Query/Set Module Bond Mode Send Receive Parameter AT+TYPE? OK+Get:[para1] None AT+TYPE[para1] OK+Set:[para1] Para1: 0~2 0:Not need PIN Code 1:Auth not need PIN 2:Auth with PIN 3:Auth and bond Default: 0

For devices less than Android version 5.0 it works out just fine.

However

  1. For devices with Android version 5.0 the pairing dialog appears without diaplyed-pin or pin-entering-field and when the pair button is clicked it fails to pair - complaining with

    Couldn't pair with MyApp because of an incorrect PIN or passkey.

  2. For devices with Android version 5.1 it does not even show the pairing dialog and fails to pair.

Notes: Tried restarting devices, forgetting devices, clearing bonding information from device.

Looking for guidance, advice, help, comments, code.

2
Please post the android code you are using to Pair.Aaron Franco

2 Answers

6
votes

This is a known issue - quite a few users have reported problems with being unable to enter a passcode with Android 5.0. It doesn't appear to occur across all devices.

Other examples of the issue:

https://android.stackexchange.com/questions/88011/android-5-bluetooth-pairing-dialog-has-no-passkey-form

https://en.discussions.tomtom.com/mysports-connect-apps-389/pairing-issue-on-nexus-5-android-5-948640

0
votes

Ti cc254x Stack has a known forward compatibility bug making it unable to pair with devices supporting BLE 4.2 security features (LinkKey exchange). This feature got integrated in Bluedroid last fall, will be mainline for Android 6, and may have been merged by some vendors already. The bug got fixed in Ti cc254x Stack release 1.4.1, but your module firmware may not have the fix merged yet.