How to disconnect when my link role is peripheral?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
clwu_2121251
Level 1
Level 1

Hello Cypress team,

My firmware is based on WiCED SDK-3.5.2 upon BCM43340. My question is how to disconnect a BLE link when my role is a peripheral (link_role equals 1)? I've tried wiced_bt_gatt_disconnect(uint16_t conn_id), but this API only works when my role is a central (link_role equals 0). If I call wiced_bt_gatt_disconnect in the peripheral case, the WiCED BT driver will get stuck and keep dumping run out of buffer messages. The error messages are shown below. Can anybody tell me how to correctly disconnect the link?

00122426 GKI_exception(): Task State Table

00122430 GKI_exception 65524 getbuf: out of buffers

00122426 GKI_exception(): Task State Table

00122439 GKI_exception 65524 getbuf: out of buffers

00124444 GKI_exception(): Task State Table

00124448 GKI_exception 65524 getbuf: out of buffers

00124444 GKI_exception(): Task State Table

00124456 GKI_exception 65524 getbuf: out of buffers

00126461 GKI_exception(): Task State Table

00126465 GKI_exception 65524 getbuf: out of buffers

00126461 GKI_exception(): Task State Table

00126474 GKI_exception 65524 getbuf: out of buffers

00128478 GKI_exception(): Task State Table

...... (continuously output the above error message)

BR,

Clark

0 Likes
1 Solution
Anonymous
Not applicable

Kindly update to the latest version of the WICED SDK. The wiced_bt_gatt_disconnect() API should work fine.

View solution in original post

0 Likes
2 Replies
JeGu_2199941
Level 5
Level 5
25 likes received 10 likes received 10 likes given

Look at the struct wiced_bt_cfg_buf_pool_t you used for wiced_bt_stack_init call.

As far as I know with 3.5.2 you don't have any hint about their real-time usage.

However you can blindly adjust the buffer config and hope for the best.

I'll recommend you to migrate to latest SDK and get prepared for future migrations.

You will not like to rely on official patches for non-latest SDK...

0 Likes
Anonymous
Not applicable

Kindly update to the latest version of the WICED SDK. The wiced_bt_gatt_disconnect() API should work fine.

0 Likes