2021-07-29 02:08 PM
Hi,
I'm working on a BLE app using an STM32L4 as main processor and a BLuenrg-m2sa as network coprocesor for the BLE stack.
have develop the app code and setup all the gatt services and characteristics. Also developed an android app to connect as central device. Long story short, the system is working fine on normal conditions, and the device is using the hci_disconnection_complete_event, and hci_le_connection_complete_event to change the states of paring condition or working condition.
In some cases when the app crashes it does not correctly generates the disconnection event but it terminates the connection, the device does not catch the disconnect event and continues to stay on a connected state and do not re-enters the advertising mode.
What is the event to catch an eventual timeout with no activity between the bluenrg-m2sa and the android app? to notify the host microcontroller to return to advertising and start all over again?
I have tryed with the following events with no success:
aci_l2cap_proc_timeout_event
aci_blue_events_lost_event