2021-05-22 07:29 AM
I am using STM32WB50 to build a sensor which can be connected by the Android app via BLE. The code is generated by cubemx, and advertise works fine. But it will not work when the phone request a connection with the MCU.
I captured the BLE packages with a BLE analyzer and it shows that the MCU did not answer to "LL_FEATURE_REQ" send from my phone.
The app debug messeges are as follows:Then I tried to download the example for Nucleo(STM32WB55) to my MCU and the problem remains the same.
Thank you for helping me and if anything is not clear please let me know.
2021-08-19 09:06 AM
I think the WB device did not accept the connection.
You have to check the status of this request with the HCI_LE_CONNECTION_COMPLETE_EVENT event.
The LE Connection Complete event indicates to both of the Hosts forming the connection that a new connection has been created. Upon the creation of the connection a Connection_Handle shall be assigned by the Controller, and passed to the Host in this event. If the connection establishment fails this event shall be provided to the Host that had issued the LE_Create_Connection command.
This event indicates to the Host which issued a LE_Create_Connection command and received a Command Status event if the connection establishment failed or was successful.
2021-08-19 09:08 AM
So you should check the status of your connection request before sending packets to the server.