Unable to Connect on Android After Connecting Via Bluetooth Device List

We have been having a persistent issue with customers that have Android phones.  Our product uses the nRF SDK and we have a iPhone and Android Web app that is based on Cordova and Ionic.

We connect to our product within the our app without issue.  The problem is sometimes customers go to their Bluetooth Device list on their Android phone and try and connect to our product that way as it appears in the list of devices.  Once this happens then our app can no longer connect to the device on that phone without reseting the networking settings of that phone.  This doesn't happen with iPhones as our product never shows up in the Bluetooth Devices List.

Is it normal for the BLE devices to show in the Bluetooth Devices List on Android devices?  Is there a way to stop it showing up in that list or something else I can do so that it won't allow customers to try and connect that way?

Thanks,

  • Hi.

    Forwarded your question to our mobile developers. Hopefully they can share some insight on this.

    Br,
    Joakim

  • Hello ,

    When a user tries to connect to a device from Android Bluetooth settings, the phone will start bonding with the device, just as if you'd call "createBond" method. Do you support bonding in your firmware?

    The Android Settings app can connect and bond to any device, but if it does not support it, it will disconnect afterwards. For example, HID devices are supported natively, so Android will keep and use the connection, but HRM device is not, so after bonding and service discovery Android would simply disconnect. During bonding, some other app may get an event that a device has connected, and it may also connect to it using "connectGatt" method. In that case, the physical connection will not be terminated, as at least one client on the phone is using it.

    As far as I understand, in your app you may be doing something like:

    1. not using bonding, but the device does not reject pairing request - if bonding implementation is not correct, this may cause troubles accessing some services.

    2. storing the device address for the future - if the device got connected and bonded from another app (settings), your app was not involved in scanning and establishing connection, so you'd have to fix something on your side to support that case as well (e.g. receiving bonded devices or connected devices from bluetooth manager).

    3. the device may still be connected to the phone while you're trying to scan for it, so it does not appear on scan results - you need to show connected/bonded devices in your app (unfortunately, you can't filter only those that have required services, like you could on iOS).

    Do you support bonding on the device? How does your device behave when bonded? What is the difference when connected from your app and from the Android Settings?

    Could you also say what do you mean by "reseting the networking settings of that phone."?

    Best Regards,

    Aleksander

  • Hi  ,

    Thank you for the detailed post.  No, we don't support bonding in our device.  To your point 1, no our app also doesn't use bonding nor does our device doesn't reject pairing requests.  

    This project uses nRF52 SDK 16.0.0.  Is there some nRF SDK examples of rejecting pairing?  

    Best Regards,

    Darren

  • I have no idea. But I'm sure  knows even poems about nRF5 settings, so I'll leave it to him! Good luck!

Related