Passkey pairing issue: Phone won't disconnect with BLE device after pairing and bonding

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

Hi, Broadcom:

I'm working on a BLE device(no input, no display). I enabled PASSKEY_PAIRING same as Hello_Sensor apps.

I can pair and bond with my BLE device successfully using Android phone apps.

When I try to disconnect from BLE in the apps, it didn't.

The BLE device didn't receive BLECM_APP_EVT_LINK_DOWN event. So it didn't broadcast and other phone cannot find and connect to it.

When I forget the BLE or turn off Bluetooth radio in my phone, the BLE device receive BLECM_APP_EVT_LINK_DOWN event.

Test Device:

Moto G - Android 5.1

WICED Smart IDE - Eclipse IDE for C/C++ Developers 2.2.1

BCM92073X_LE_KIT.

Thank you

0 Likes
1 Solution
Anonymous
Not applicable

It seems like there is a native problem in Android about this issue.

Issue 184853 - android - Paired Ble devices do not disconnect physically - Android Open Source Proje...

This issue is for Android 5.1.1. (or earlier versions I guess)

I have seen this behavior when I was testing with Nexus 9 with Android 5.1.1.

I'm not sure if they fixed this issue with later versions of Android.

You might want to test it with the latest Android version.

Few workarounds might be:

1. disconnect from the peripheral (perhaps using con_idle_timeout; so if there is no activities for certain time, disconnect)

2. remove the bond from Android (not sure if this might work; I haven't tested. but it's a hunch)

Please let us know if you have any updates.

p.s. this behavior is not observed in iOS.

James

View solution in original post

6 Replies
Anonymous
Not applicable

Hello.

Are you initiating the disconnection from the local host or the Android phone?When you say "When I try to disconnect from BLE in the apps," is that Android app or the app on your BLE device?

Are you using blecm_disconnect(BT_ERROR_CODE_CONNECTION_TERMINATED_BY_LOCAL_HOST); to close the connection?

James

0 Likes
Anonymous
Not applicable

jamesle1

I'm initiating disconnection from the Android Phone.

It's the Android app in which I'm trying to disconnect from BLE device.

I didn't use blecm_disconnect(BT_ERROR_CODE_CONNECTION_TERMINATED_BY_LOCAL_HOST). The disconnect is initiated from Android apps, not BLE apps.

Thanks

Jeffrey

0 Likes
Anonymous
Not applicable

Which Android version are you using?

Are you using your own Android app?

Are you testing with multiple apps?

James

0 Likes
Anonymous
Not applicable

James:

Sorry for this late response, your email was put in scam of my gmail.

I tried 3 phones.

Moto G 1st gen, Android 5.1

Nexus 6P, Android 6.0

Xiaomi Redmi, Customized Android 5.0.2 LRX22G

2 Apps,

Our own apps, still under development

nRF Master Control Panel Version 4.0.5

0 Likes
Anonymous
Not applicable

It seems like there is a native problem in Android about this issue.

Issue 184853 - android - Paired Ble devices do not disconnect physically - Android Open Source Proje...

This issue is for Android 5.1.1. (or earlier versions I guess)

I have seen this behavior when I was testing with Nexus 9 with Android 5.1.1.

I'm not sure if they fixed this issue with later versions of Android.

You might want to test it with the latest Android version.

Few workarounds might be:

1. disconnect from the peripheral (perhaps using con_idle_timeout; so if there is no activities for certain time, disconnect)

2. remove the bond from Android (not sure if this might work; I haven't tested. but it's a hunch)

Please let us know if you have any updates.

p.s. this behavior is not observed in iOS.

James

Anonymous
Not applicable

James:

I tested our BLE device with iPad air, iOS 9.2.1, lightblue explorer. It work well as you said.

Our apps developer said this problem maybe be introduced when Android BT stack switched from the GPL-licensed BlueZ to the Apache-licensed BlueDroid.

I tried your 1st workaround, disconnect from the peripheral using con_idle_timeout; It worked.

The 2nd workaround. Android phone need to delete bond info to disconnect from BLE device. The next time to connect to BLE device, Android phone still need pair and input passkey. It's inconvenient to input passkey during every connect. We won't go through this approach.

Thanks

Jeffrey

0 Likes