- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello!
I use an example from the AG library and I can't connect a wide-band headset to my application.
Narrow band headsets work fine - there is audio.
But when I connect the wideband - there is no audio.
Would you like to see if I am using the wrong settings? Or the chip simply does not support the wideband?
/*
* Create SCO connection as an originator or an acceptor
*/
void hfp_ag_sco_create( hfp_ag_session_cb_t *p_scb, BOOLEAN is_orig )
{
//wiced_bt_dev_status_t status;
wiced_bt_sco_params_t params = hf_control_esco_params;
/* remove listening SCO */
if ( p_scb->sco_idx != BTM_INVALID_SCO_INDEX )
wiced_bt_sco_remove( p_scb->sco_idx );
/* Attempt to use eSCO if remote host supports HFP >= 1.5 */
if ( is_orig )
{
if (p_scb->retry_with_sco_only)
{
p_scb->retry_with_sco_only = WICED_FALSE;
params.packet_types = BTM_SCO_LINK_ONLY_MASK;
}
else
{
#if (BTM_WBS_INCLUDED == TRUE)
if ( p_scb->peer_supports_msbc && !p_scb->msbc_selected )
{
/* Send +BCS to the peer and start a 3-second timer waiting for AT+BCS */
hfp_ag_send_BCS_to_hf (p_scb);
wiced_start_timer (&p_scb->cn_timer, 3);
return;
}
/* If WBS is negotiated, override the necessary defaults */
if ( p_scb->msbc_selected )
{
params.use_wbs = WICED_TRUE;
params.max_latency = 13;
params.retrans_effort = BTM_ESCO_RETRANS_QUALITY;
params.packet_types = ( BTM_SCO_PKT_TYPES_MASK_EV3 | /* EV3 + 2-EV3 */
BTM_SCO_PKT_TYPES_MASK_NO_3_EV3 |
BTM_SCO_PKT_TYPES_MASK_NO_2_EV5 |
BTM_SCO_PKT_TYPES_MASK_NO_3_EV5 );
BT_Trace(BT_RES_WICED_USE_WBS);
}
else
BT_Trace(BT_RES_WICED_USE_NBS);
#endif
/* Igf setup fails, fall back to regular SCO */
p_scb->retry_with_sco_only = WICED_TRUE;
}
wiced_bt_sco_create_as_initiator( p_scb->hf_addr, &p_scb->sco_idx, ¶ms );
}
else
{
p_scb->retry_with_sco_only = WICED_FALSE;
wiced_bt_sco_create_as_acceptor( &p_scb->sco_idx );
}
WICED_BT_TRACE( "hfp_ag_sco_create is_orig: %u sco_idx: 0x%0x status:0x%x retry_with_sco_only: %u\n",
is_orig, p_scb->sco_idx, status, p_scb->retry_with_sco_only );
}