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
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.
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.
Authentication is provided in Bluetooth (LE) by digitally signing the data using the connection Signature Resolving Key (CSRK). The sending device places a signature after the Data PDU. The receiver verifies the signature using the CSRK.
Bluetooth Low Energy is a secure wireless communication protocol, but only if you implement it properly. The only serious vulnerability it has is during the second phase of pairing, but you can always secure this phase with an appropriate pairing method.
It is independent of classic Bluetooth and has no compatibility, but Bluetooth Basic Rate/Enhanced Data Rate (BR/EDR) and LE can coexist.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With