This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Nordic_UART auto-disconnection issue on Android L

Hi Nordic Expert,

I am Alex and have been developing with NRF51822 for a long time. Thanks for your quick help before. Now our product bases on S110-7.1.0 and SDK-6.1.0, and we reuse the demo Noridc UART profile inside our first BLE product. In other side, we also use many tools from you to do testing and verifying, such as MCP, NRF toolbox and NRF UART.

Now I met a very srange issue about that UART profile. Before this, the UART profile worked fine on Andrioid 4.4 (KitKat) platform. But recently we move to use Android 5.0 (L), we found an issue that once we do a connection with that profile, in a very short time it seems our BLE device is auto disconnected, and then this procedure repeats again and again when using NRF toolbox UART(ver 1.16.1). See attached figures.

Later I tried with NRF UART (V2.0) and surprised that this tool can build very stable connection with my device. And then I try MCP tool. Yip, it also can find the device, if I directly click 'connect' button, all is the same as NRF UART. But if I choose to click 'connect with autoConnect', the same issue is duplicated as NRF toolbox. I am so confused with this phenomenon. Any tips? I attached some screenshots for your reference.

Look forward to seeing your answer and help. Thanks a lot.

image description image description image description image description image description

Alex

  • Hi, Thank you and it's good news to know it's from Phone. I recorded another trace where I captured first connect by NRF UARTv2.0, another one by NRF MCP without AutoConnect and the last connect by MCP with AutoConnect.

    P.S. UART_MCP_MCP_WITH_AUTO.pcap

  • Hi Alex,

    Thanks for capturing the trace. There is a pattern that when auto connect was on, the phone automatically read attribute handle 0x0003 and 0x0005 which is device name and appearance. And then after that disconnect (then connect again due to autoconnect feature).

    I have reported this internally. However we don't have any Xiaomi phone here for further testing. I suspecting that this issue only occur on this particular vendor. I'm not sure what we can do next.

    I have reported it internally. Please let me know if you experience the same issue on other phones.

    If you want to do further test, you can try to modify the app source code (nRF UART for example) to enable auto connect (set autoConnect=1 when calling connectGatt() ) to check if same behaviour occurs.

Related