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

Bluetooth SDK Forum Discussions

gryfin_chen
Level 1
First question asked 5 sign-ins First reply posted
Level 1

I added the Audio_Gateway example of CYW20706 in MTB2.4 environment, the version is 3.3

gryfin_chen_0-1656379033692.png

Among them, hfp_ag_startup is divided into two versions, with callback event and without callback event function

After my research, I found that the difference is in the btstack version of COMPONENTS, of which CYW955572 can use callback event

But if the changes related to hfp_ag cannot be notified to the application layer through the callback, how can I know the connection status of the AG (Connected/Disconnected...) and AT Command information (battery level, volume, etc...)

The relevant connection state is found in p_scb->state in hfp_ag_session_cb_t in wiced_bt_htp_ag.h
But because of future certification, it should not be possible to modify Lib

I would like to ask if CYW20706 can know the current connection status and AT Command information without the callback function of htp_ag

0 Likes
1 Solution
Owen_Zhang123
Moderator
Moderator 500 solutions authored 250 sign-ins 1000 replies posted
Moderator

Please check the event HCI_CONTROL_AG_EVENT_CONNECTED. The code is located in COMPONENT_hfp_audio_gateway/hfp_ag.c

View solution in original post

0 Likes
4 Replies
AnjanaM_61
Moderator
Moderator First comment on KBA 5 questions asked First question asked
Moderator

Hello @gryfin_chen 

Are you not getting BTM_SCO_CONNECTED_EVT event when connected ? 

Regards,

Anjana

0 Likes
gryfin_chen
Level 1
First question asked 5 sign-ins First reply posted
Level 1

This is the callback function of the SCO state during the call
If the HFP is only connected and does not enter/end the call, the callback of the SCO will not enter.
The connection status of HFP AG connection can't seem to be judged from this callback

Regards,
Gryfin

0 Likes
Owen_Zhang123
Moderator
Moderator 500 solutions authored 250 sign-ins 1000 replies posted
Moderator

Please check the event HCI_CONTROL_AG_EVENT_CONNECTED. The code is located in COMPONENT_hfp_audio_gateway/hfp_ag.c

0 Likes
gryfin_chen
Level 1
First question asked 5 sign-ins First reply posted
Level 1

I will try to call this event to my application layer Code
Thanks

0 Likes