cancel
Showing results for 
Search instead for 
Did you mean: 

HAP Central start stream fail

HuangFan
Associate II

Use example code BLE_Audio_HAP_Central to audio function. The Central may start the stream fail, though the BLE connect and GAP link returns are OK. and Once the stream start failed, the stream cannot be start forever, with the result "CAP Unicast Start Procedure is Complete with status 0x91".  Compared with the normal process the GAP link lack of CAP event 0x06. 

I have to use aci_gap_clear_security_db()  then I can connect and start the stream successfully. And what's more, use aci_gap_remove_bonded_device() to remove the certain device and repairing cannot start the stream. It seems that there's some memory issues. 

 

log for stream start failed

[10:10:48.442]·¢¡ú¡ó{A\0v³\0ÿÿ}¡õ
[10:10:48.445]ÊÕ¡û¡ôaci_gap_terminate_gap_proc() returns status 0x00
HAPAPP_StopScanning() returns status 0x00
Selected device 0
aci_gap_create_connection() returns status 0x00
{A\0w³\0V˜}P_PROC_COMPLETE_VSEVT_CODE
>>== ACI_GAP_PROC_COMPLETE_VSEVT_CODE
>>== HCI_LE_ENHANCED_CONNECTION_COMPLETE_SUBEVT_CODE - Connection handle: 0x0001
     - Connection established with @:a4:90:ce:1e:a9:87
     - Connection Interval:   40.00 ms
     - Connection latency:    0
     - Supervision Timeout:   10000 ms
>>== device is already bonded
aci_gap_send_pairing_req returns 0
  Success: aci_gap_adv_set_enable stop

[10:10:48.726]ÊÕ¡û¡ô>>== ACI_GAP_PAIRING_COMPLETE_VSEVT_CODE
     - Pairing Success

Pairing Complete with connection handle 0x0001
GAF Profiles Mask 0x0A present in NVM
profiles 0x00 of the GAF are already linked on ConnHandle 0x0001
CAP_Linkup() for GAF restoration on ConnHandle 0x0001 for link mask 0x0A returns status 0x00

[10:10:48.848]ÊÕ¡û¡ôMTU = 247
  Success: aci_gatt_update_char_value BLOCKSIZE command
CAP Event : 0x12
ASE ID 5 [Type 0x01 ] with remote CAP Acceptor on ConnHandle 0x0001 is in State 0x00
CAP Event : 0x12
ASE ID 6 [Type 0x01 ] with remote CAP Acceptor on ConnHandle 0x0001 is in State 0x00
CAP Event : 0x0A
CAP Unicast Linkup Event with status 0x00

[10:10:48.968]ÊÕ¡û¡ôCAP Event : 0x02
Sink PAC Record from CAP Acceptor on ConnHandle 0x0001
Remote Record: 
    Supported Sample Freq: 
              48 kHz
    Supported Frame Duration: 
              7.5 ms
              10 ms
              Preferred 7.5 ms
    Supported Channel Counts: 
              1 Channel
    Supported Octets Per Codec Frame: 0x64004B
    Supported Max Codec Frame Per SDU: 2
    Supported Preferred Audio Contexts: 0x0098

[10:10:49.127]ÊÕ¡û¡ôCAP Event : 0x02
Sink PAC Record from CAP Acceptor on ConnHandle 0x0001
Remote Record: 
    Supported Sample Freq: 
              16 kHz
              24 kHz
              32 kHz
              48 kHz
    Supported Frame Duration: 
              7.5 ms
              10 ms
              Preferred 10 ms
    Supported Channel Counts: 
              1 Channel
    Supported Octets Per Codec Frame: 0x9B001E
    Supported Max Codec Frame Per SDU: 2
    Supported Preferred Audio Contexts: 0x0004

[10:10:49.567]ÊÕ¡û¡ôCAP Event : 0x03
Source PAC Record from CAP Acceptor on ConnHandle 0x0001
Remote Record: 
    Supported Sample Freq: 
              16 kHz
    Supported Frame Duration: 
              7.5 ms
              10 ms
              Preferred 7.5 ms
    Supported Channel Counts: 
              1 Channel
    Supported Octets Per Codec Frame: 0x28001E
    Supported Max Codec Frame Per SDU: 2
    Supported Preferred Audio Contexts: 0x0098

[10:10:49.727]ÊÕ¡û¡ôCAP Event : 0x03
Source PAC Record from CAP Acceptor on ConnHandle 0x0001
Remote Record: 
    Supported Sample Freq: 
              16 kHz
              24 kHz
              32 kHz
    Supported Frame Duration: 
              7.5 ms
              10 ms
              Preferred 10 ms
    Supported Channel Counts: 
              1 Channel
    Supported Octets Per Codec Frame: 0x500028
    Supported Max Codec Frame Per SDU: 2
    Supported Preferred Audio Contexts: 0x00D2

[10:10:50.446]ÊÕ¡û¡ôCAP Event : 0x39
Volume Control Profile is linked on ConnHandle 0x0001
CAP Event : 0x00
CAP Linkup Complete on Connhandle 0x0001 with status 0x00
Complete HAP Linkup on ConnHandle 0x0001 is started with status 0x00

[10:10:52.127]ÊÕ¡û¡ôHAP Linkup Complete Event with ConnHandle 0x0001 is received with status 0x00
HAP_HARC_ReadPresetsRequest() returns status 0x92

[10:10:54.362]·¢¡ú¡ó{A\0vµ\0ÿÿ}¡õ
[10:10:54.366]ÊÕ¡û¡ôStart Telephony Stream
Start Telephony Stream
Set Start Stream for CAP Acceptor 0 on connHandle 0x0001 :
Sink Codec Conf :
    Audio Channel Allocation : 0x00000003
    Channel Per CIS : 1
    Sampling Freq : 0x03
Source Codec Conf :
    Audio Channel Allocation : 0x00000003
    Channel Per CIS : 1
    Sampling Freq : 0x03
CAP_Unicast_AudioStart() of 1 CAP Accceptors in Set Type 0x00 returns status 0x00
{A\0wµÄT}
[10:10:59.485]ÊÕ¡û¡ôCAP Event : 0x0B
CAP Unicast Start Procedure is Complete with status 0x91

 

0 REPLIES 0