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

cross mob
gryfin_chen
Level 3
Level 3
Distributor - Yuban(GC)
5 questions asked 25 sign-ins First like received

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

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
Moderator
10 questions asked 5 comments on KBA First comment on KBA

Hello @gryfin_chen 

Are you not getting BTM_SCO_CONNECTED_EVT event when connected ? 

Regards,

Anjana

0 Likes
gryfin_chen
Level 3
Level 3
Distributor - Yuban(GC)
5 questions asked 25 sign-ins First like received

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

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 3
Level 3
Distributor - Yuban(GC)
5 questions asked 25 sign-ins First like received

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

0 Likes