How to Actively Disconnect Bluetooth Connection of Mobile Phone?
When STM32WB is used as slave device, how to actively disconnect Bluetooth connection of mobile phone?
When STM32WB is used as slave device, how to actively disconnect Bluetooth connection of mobile phone?
Not sure I understand what you mean by "actively disconnect" : Either you expect the android application to disconnect automatically the connection each time it is not needed anymore=> This is an decision to be made by the android application (apk) for which the STM32WB has no influence.
Or you expect the STM32WB to inform the mobile that it will stop the connection. In this case you can use the HCI_DISCONNECT command or an higher level command ACI_GAP_TERMINATE that requests the controller to terminate the connection. Then the STM32WB application will wait for the EVT_DISCONN_COMPLETE GAP event.
Please have a look at AN5270 that describe both commands.
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.