cancel
Showing results for 
Search instead for 
Did you mean: 

Studio Bluetooth

CoreyW_81
Employee

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

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

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