nrf5340 occasionally stuck on BT_CONN_STATE_DISCONNECTING

Hello,

We have an nrf5340 custom board and during frequent BLE connections/disconnections sometimes it seems the netcore gets stuck. We are connecting to an iOS app and from the app's side, the connection is no longer active (can't recieve any data) but from the nrf5340's point of view the connection is still maintained and we don't get any errors when sending over NUS. We have tried to get around this by having the app periodically send a heartbeat packet, but when the nrf5340 enters this state and we try to call bt_conn_disconnect(), the connection's state becomes BT_CONN_STATE_DISCONNECTING and is stuck there for hours. The connection never terminates and we can't resume advertising. Any help would be appreciated since this is a very strange issue.

Tony

Related