cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WB09KEV6 BLE connection breaks repeatedly

JfSDK
Visitor

I made the PCB for stm32wb09kev6 myself and downloaded the p2p_server example program. I changed the LSE clock used in the example program to LSI and added an LED to indicate whether a Bluetooth connection is established. The Bluetooth can be scanned, but there is a problem with the Bluetooth connection part. The Bluetooth connection will be established briefly and then disconnected quickly (manifested as the LED turning off first and then on, and an error "an error occured during connection" will be reported in ST BLE ToolBox). The debug output is as follows:

Success: aci_hal_set_tx_power_level command

Success: aci_gatt_srv_profile_init command

Success: aci_gap_init command

Static Random Bluetooth Address: fd:c8:e7:c9:5c:bf

Success: Gap_profile_set_dev_name - Device Name

Success: Gap_profile_set_appearance - Appearance

Success: aci_gap_set_io_capability command

Success: aci_gap_set_security_requirements command

Success: aci_gap_configure_filter_accept_and_resolving_list command

==>> End BLE_Init function

 

Services and Characteristics creation

Success: aci_gatt_srv_add_service command: p2p_Server

End of Services and Characteristics creation

 

Success: aci_hal_set_radio_activity_mask command

==>> Success: aci_gap_set_advertising_configuration

==>> Success: aci_gap_set_advertising_data

==>> Success: aci_gap_set_adtart

***

Success: aci_hal_set_tx_power_level command

Success: aci_gatt_srv_profile_init command

Success: aci_gap_init command

Static Random Bluetooth Address: fd:c8:e7:c9:5c:bf

Success: Gap_profile_set_dev_name - Device Name

Success: Gap_profile_set_appearance - Appearance

Success: aci_gap_set_io_capability command

Success: aci_gap_set_security_requirements command

Success: aci_gap_configure_filter_accept_and_resolving_list command

==>> End BLE_Init function

 

Services and Characteristics creation

Success: aci_gatt_srv_add_service command: p2p_Server

End of Services and Characteristics creation

 

Success: aci_hal_set_radio_activity_mask command

==>> Success: aci_gap_set_advertising_configuration

==>> Success: aci_gap_set_advertising_data

==>> Success: aci_gap_set_advertising_enable

>>== hci_le_connection_complete_event - Connection handle: 0x0801

- Connection established with @:8c:f8:c5:4c:f3:ff

- Connection Interval: 45.00 ms

- Connection latency: 0

- Supervision Timeout: 9600 ms

>>== HCI_DISCONNECTION_COMPLETE_EVT_CODE

- Connection Handle: 0x801

- Reason: 0x28

==>> Success: aci_gap_set_advertising_configuration

==>> Success: aci_gap_set_advertising_data

==>> Success: aci_gap_set_advertising_enable

>>== hci_le_connection_complete_event - Connection handle: 0x0802

- Connection established with @:8c:f8:c5:4c:f3:ff

- Connection Interval: 45.00 ms

- Connection latency: 0

- Supervision Timeout: 9600 ms

>>== HCI_DISCONNECTION_COMPLETE_EVT_CODE

- Connection Handle: 0x802

- Reason: 0x28

==>> Success: aci_gap_set_advertising_configuration

==>> Success: aci_gap_set_advertising_data

==>> Success: aci_gap_set_advertising_enable

Can anyone help me? Thank you.

1 REPLY 1
STTwo-32
ST Employee

Hello @JfSDK 

The reason 0x28 of disconnection refer to "Instant Passed" error that is a common issue in BLE communication, particularly when dealing with Link Layer (LL) or Link Management Protocol (LMP) Protocol Data Units (PDUs). This error occurs when an operation that was supposed to happen at a specific "instant" in time cannot be executed because the specified time has already elapsed. This may be happened for different reason. Could you please try to connect your node to client node that have higher scanning time interval (try another app maybe the ST BLE Sensor or others) or use another board with the P2P client example with a high scanning interval.

Best Regards.

STTwo-32

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.