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

CLI BLE NUS assert when disconnect

Hello, 

I am working with the nrf_cli_ble_uart (SDK16), I am able to connect, exchange data, however when I disconnect I got an assert : 

<error> app: ASSERTION FAILED at ../nordic_sdk_17.0.2/nRF5_SDK/components/libraries/cli/ble_uart/nrf_cli_ble_uart.c:122

It is indeed in ble_nus.c -> on_disconnected() causing the issue. 

If I remove the call of on_disconnected() in the event handler (ble_nus_on_ble_evt() -> case : BLE_GAT_EVT_DISCONNECTED), I do not have any issue.

But I wonder what is the initial cause and if there is a cleaner way to fix this issue. 

Thanks,

Florian

Related