Determine if CYBT-343026-01 is connected to another device via WICED HCI commands?

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

cross mob
CoreyW_81
Employee
Employee
50 sign-ins 50 replies posted 25 replies posted

Quick question for you: what is the easiest way for the host micro to determine whether the BT module is paired to a device or not? 

I don't think there is a WICED command for this currently (correct me if I'm wrong), so I think I will just make a custom command to return true/false depending on paired status.

Can you tell me what parameter(s) within the BT module that I should look at to get the paired status?  Can you provide a snip of firmware showing how this can be accomplished in the a2dp_sink snip?

Thank you

0 Likes
1 Solution
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

You can refer to the headset demo. When the connection status changes, there is a callback wiced_result_t wiced_bt_dev_register_connection_status_change(wiced_bt_connection_status_change_cback_t *p_wiced_bt_connection_status_change_cback). You can set a flag in the callback and check the flag when you need.

Refer to the function hci_control_connection_status_callback in hci_control.c for details.

View solution in original post

0 Likes
1 Reply
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

You can refer to the headset demo. When the connection status changes, there is a callback wiced_result_t wiced_bt_dev_register_connection_status_change(wiced_bt_connection_status_change_cback_t *p_wiced_bt_connection_status_change_cback). You can set a flag in the callback and check the flag when you need.

Refer to the function hci_control_connection_status_callback in hci_control.c for details.

0 Likes