Pixel phones fail to disconnect

We are experiencing a problem with our app, using nRF5_SDK_17.1.0_ddde560:

It works fine with Galaxy S20, but on Pixel phones (we tried 4, 6 and 7) it fails to disconnect.

In order to understand if the problem was due to our firmware or App, we tried with a Pixel 4 connected with the nRF52840 demo board running Peripheral UART demo (using the binary image downloaded from your site) and the nRF Toolbox (3.1.3) on a Pixel 4, replicating the problem.

Besides the Galxy S20 fails to connect to the Peripheral UART demo using nRF Toolbox.

Can you suggest any patch to fix the disconnect fail problem?

Parents Reply Children
  • With 'Failed to disconnect' I mean that even closing the App,:

    • The LEDs on the device remain in the 'Connected state'
    • The device is not advertising

    If I either:

    • Isolate the phone (double conductive box enclosure in another room) or
    • Cycle the device power

    The advertising can be see again.

    This is similar to the behaviour on our device, where I can see in the log that the phone has not disconnected.

  • Hi Carlo, 
    It's most likely the application crashed when disconnect happened. 
    Please try to turn debugging by adding DEBUG to preprocessor symbol in project option. 

    Please check in the log to see there is any assertion. 
    Which hardware did you use to test ? Could you try to test again with ble_app_hrs application ? 

  • I have switched to the most recent SDK to make things easier to replicate:

    Downloaded nRF Connect SDK v2.4.0
    Built Zephyr Heartrate Sensor for nRF52840 DK NRF52840
    Loaded PCA10056 - nRF52840-Preview-DK
    On the Mobiles I am usingmRF Toolbox 3.1.3

    The behaviour is still the same.

    Just an additional note: everything works fine with the Galaxy S20 if I pair the device first.

  • I have this dump (Using Ozone):

    Connected
    [00:00:30.146,087] \033[0m<inf> hrs: hrmc_ccc_cfg_changed: HRS notifications enabled\033[0m
    [00:00:30.236,022] \033[0m<inf> bas: blvl_ccc_cfg_changed: BAS Notifications enabled\033[0m
    [00:00:54.940,826] \033[0m<inf> bas: blvl_ccc_cfg_changed: BAS Notifications disabled\033[0m
    [00:00:54.940,887] \033[0m<inf> hrs: hrmc_ccc_cfg_changed: HRS notifications disabled\033[0m
    Disconnected (reason 0x13)

    But the last line only appears after I disable Bluetooth on the Pixel.

  • Hi Carlo, 

    Please be aware that when on the app on the phone if you click disconnect from the app, it doesn't mean that the phone will disconnect right away. 
    The normal behavior is that the phone (Android OS) checks for any service/app that still use the peripheral. If there is no app/service that uses the peripheral it will disconnect. 

    What I want to say here is that click disconnect from the app will not terminate the connection immediately. 

    If in your test, you turn off Bluetooth or bring the device out of range and you can see Disconnect event, then it's working fine. 
    You can verify the behavior by using a sniffer . 

Related