Android app disconnects when from device receiving notifications from multiple devices

Hello everyone,

I am currently developing an Android app, where I have 2 BLE custom boards with the nRF52832 as a BLE chip. Each board has the same firmware running on it and is configured to send notification of 20 bytes in a 50Hz frequency. I am using the the Nordic BLE library to connect and communicate with the devices.

The connection to both devices works without any issues. Initially the phone is receiving data from both sensors but after a short time (between 1 - 5 seconds) the phone disconnects itself from one sensor. The Logcat for the app doe not provide any useful information either. The only thing i can see there is, that the device has been disconnected (only onConnectionUpdated is shown. No disconnect request).

Connecting the same devices with the equivalent iOS app does work. So I assume the error has to be in some way, how I handle it on Android.

If you need any additional information please let me know.

Thank you all in advance.

Parents
  • Hello

    What phone and Android version are you running?

    If you could set up a BLE sniffer and share logs of the communication between your devices as the disconnection happens, that would be very helpful.

    Best regards,

    Einar

  • I have also increased now the connection interval on the phone side (15'000 ms). It now takes a bit longer for the disconnect to happen (about 10 seconds), which makes sense since the interval is higher. Eventually the disconnect happens anyway.

  • Hi

    You say you've set connection parameters on your Android phone.

    Have you tried adjusting the preferred parameters of your peripheral?

    -Einar

  • Sadly this is not possible for me at a current stage since i don't have the rights to update the peripheral firmware.

    Additionally last weekend I tested the same app on a different phone (Fairphone 4). There the connection to both peripherals was maintained without any issues. So I have the assumption, that the limit could be the usage of the Bluetooth chip version. On the Nokia it is Bluetooth 4.2 while on the Fairphone and iPhone it is 5.0. I'm not sure though, if this indeed could be the source of the issue or there might be some other reason.

    Maybe you know a bit more about this Einar.

  • J.R. said:
    i don't have the rights to update the peripheral firmware.

    That's unfortunate, as it will limit what you're able to test.

    J.R. said:
    On the Nokia it is Bluetooth 4.2 while on the Fairphone and iPhone it is 5.0

    As far as I know there shouldn't be any difference between 4.2 and 5.0 in regards to number of connections, but what might be limited in 4.2 is connection speed. So it could be that your peripheral requests a higher speed and is rejected by the central.

    It could also be possible that the phone has a faulty or incomplete implementation of the BLE stack, in which case you would have to contact Nokia about it, but I would want to make sure that it  isn't caused by the different Bluetooth version before taking that step.

    -Einar

  • Hello Einar

    I was now able to Test everything with two more Bluetooth 4 Devices (Faiphone 3 and Wiko Y80) and all of them showed similar issues. I did also test it with another Bluetooth 5 phone (Xiaomi Redmi 9a) and there the connection did work. So to me it really seems to be an issue with the Bluetooth version or I was really unlucky with the selection of phones.

    That being said i don't want to disclose that the connection parameters could be the source of the issue (I am talking with the device manufacturer about this). Can there be any other causes tor this to happen?

    Kind regargs

    J.R.

  • J.R. said:
    seems to be an issue with the Bluetooth version

    I still haven't found any difference in BLE 4 and 5 that should cause this issue, multiple connections is definitely supported in BLE 4.

    Though if your application is data heavy it could simply be caused by BLE 5 supporting a higher bandwidth.

    J.R. said:
    Can there be any other causes tor this to happen?

    There could be a difference in the BLE controller (hardware) in the phones causing this different behavior.

    -Einar

Reply
  • J.R. said:
    seems to be an issue with the Bluetooth version

    I still haven't found any difference in BLE 4 and 5 that should cause this issue, multiple connections is definitely supported in BLE 4.

    Though if your application is data heavy it could simply be caused by BLE 5 supporting a higher bandwidth.

    J.R. said:
    Can there be any other causes tor this to happen?

    There could be a difference in the BLE controller (hardware) in the phones causing this different behavior.

    -Einar

Children
No Data
Related