nRF5340 audio CONNECT_IND Question

Hi I am using nRF5340 audio DK (pca10121) and I was able to evaluate LC3 LE audio example code between nRF5340 audio DK gateway and nRF5340 audio DK headset.

Since Samsung Galaxy Buds2 Pro with LC3 support firmware released on 1/16/2023. I was able to use nRF Connect Desktop to pair with Samsung Galaxy Buds2 Pro. From Nordic BLE sniffer, I saw:

  1. Buds2 Pro broadcastED ADV_IND
  2. nRF Connect Desktop sent SCAN_REQ
  3. Buds2 Pro sent SCAN_RSP
  4. nRF Connect Desktop sent CONNECT_IND

This is a good case. I then compared to nRF5340 audio DK gateway firmware pairing to Buds2 Pro. The first 2 steps ADV_IND, SCAN_REQ and SCAN_RSP were identical which mean Buds2 Pro response with the correct SCAN_RSP. However, nRF5340 audio DK gateway firmware did NOT send CONNECT_IND. i browsed through the nRF5340 audio DK gateway firmware example code but I could not find where CONNECT_IND initiates. Please point me to the code area for this CONNECT_IND handling.

Second, what could be the reason. Thanks in advance,

Dennis 

Parents Reply
  • thank you so much, I am making progress:

    GW [00:00:02.526,702] <inf> bt_scan: bt_le_scan_start
    GW [00:00:02.528,686] <inf> cis_gateway: Scanning successfully started
    uart:~$ GW [00:00:02.714,691] <inf> cis_gateway: on_device_found: ADV_IND 94:2f:69:db:79:c0
    GW [00:00:02.714,691] <inf> cis_gateway: ad_parse
    GW [00:00:02.714,691] <inf> cis_gateway: device_found: ADV_IND 94:2f:69:db:79:c0
    GW [00:00:02.714,691] <dbg> cis_gateway: device_found: Device found
    GW [00:00:02.715,270] <inf> bt_conn: disconnected -> connecting
    GW [00:00:02.802,154] <inf> bt_conn: connecting -> connected
    GW [00:00:02.802,917] <inf> cis_gateway: Connected: C0:79:DB:69:2F:94 (random)
    GW [00:00:03.103,759] <err> cis_gateway: Security failed: level 1 err 2
    GW [00:00:03.103,973] <inf> bt_conn: connected -> disconnecting
    GW [00:00:03.204,833] <inf> bt_conn: disconnecting -> disconnect-complete

    Please let me know what caused " cis_gateway: Security failed: level 1 err 2". I am suspecting LE secure connection or bond option that I was not set up correctly. Please advise

Children
  • gfgf2400a said:
    Please let me know what caused " cis_gateway: Security failed: level 1 err 2".

    Err 2 is BT_SECURITY_ERR_PIN_OR_KEY_MISSING.

    Are the headsets in pairing mode?

    Kenneth

  • Kenneth,

    the earbuds were in paring mode.

    Dennis

  • I cleared nrf5340 audio DK gateway bond and made sure the earbuds were pairing mode. I attached the serial trace

    *** Booting Zephyr OS build v3.1.99-ncs1  ***
    GW [00:00:00.379,669] <inf> audio_sync_timer: Audio sync timer initialized
    GW [00:00:00.380,401] <dbg> nrf5340_audio_dk_nrf5340_cpuapp: core_config: Setting gpiote latency to low power
    GW [00:00:00.380,462] <dbg> nrf5340_audio_dk_nrf5340_cpuapp: remoteproc_mgr_boot: Network MCU released.
    GW [00:00:00.385,375] <inf> fw_info:
             nRF5340 Audio nRF5340 Audio DK cpuapp
             NCS Version: 2.1.1
             Cmake run : Tue Feb 07 08:16:06 2023
    GW [00:00:00.385,406] <inf> fw_info: ------- DEBUG BUILD -------
    GW [00:00:00.385,406] <inf> fw_info:
             Compiled for GATEWAY device
    GW [00:00:00.395,996] <inf> board_version: Compatible board/HW version found: 1.0.0
    
    
    uart:~$ GW [00:00:02.430,206] <wrn> ble: Failed to create ID
    GW [00:00:02.432,983] <inf> fs_nvs: 6 Sectors of 4096 bytes
    GW [00:00:02.432,983] <inf> fs_nvs: alloc wra: 0, e10
    GW [00:00:02.432,983] <inf> fs_nvs: data wra: 0, 2a4
    GW [00:00:02.442,810] <wrn> bt_hci_core: Controller to host flow control not supported
    GW [00:00:02.445,678] <inf> bt_hci_core: No ID address. App must call settings_load()
    GW [00:00:02.445,678] <dbg> ble: on_bt_ready: Bluetooth initialized
    GW [00:00:02.445,739] <inf> ble: MAC: 00:00:00:00:00:00 (public)
    GW [00:00:02.446,319] <inf> ble: Controller version: 3303
    GW [00:00:02.538,787] <inf> cis_gateway: ble_acl_start_scan
    GW [00:00:02.538,818] <inf> bt_keys: bt_foreach_bond
    GW [00:00:02.538,818] <inf> bt_scan: bt_le_scan_start
    GW [00:00:02.540,924] <inf> cis_gateway: Scanning successfully started
    GW [00:00:02.430,206] <wrn> ble: Failed to create ID
    GW [00:00:02.432,983] <inf> fs_nvs: 6 Sectors of 4096 bytes
    GW [00:00:02.432,983] <inf> fs_nvs: alloc wra: 0, e10
    GW [00:00:02.432,983] <inf> fs_nvs: data wra: 0, 2a4
    GW [00:00:02.442,810] <wrn> bt_hci_core: Controller to host flow control not supported
    GW [00:00:02.445,678] <inf> bt_hci_core: No ID address. App must call settings_load()
    GW [00:00:02.445,678] <dbg> ble: on_bt_ready: Bluetooth initialized
    GW [00:00:02.445,739] <inf> ble: MAC: 00:00:00:00:00:00 (public)
    GW [00:00:02.446,319] <inf> ble: Controller version: 3303
    GW [00:00:02.538,787] <inf> cis_gateway: ble_acl_start_scan
    GW [00:00:02.538,818] <inf> bt_keys: bt_foreach_bond
    GW [00:00:02.538,818] <inf> bt_scan: bt_le_scan_start
    GW [00:00:02.540,924] <inf> cis_gateway: Scanning successfully started
    uart:~$ GW [00:00:02.675,048] <inf> cis_gateway: on_device_found: ADV_IND 94:2f:69:db:79:c0
    GW [00:00:02.675,048] <inf> cis_gateway: ad_parse
    GW [00:00:02.675,048] <inf> cis_gateway: device_found: ADV_IND 94:2f:69:db:79:c0
    GW [00:00:02.675,079] <dbg> cis_gateway: device_found: Device found
    GW [00:00:02.675,872] <inf> bt_conn: disconnected -> connecting
    GW [00:00:02.761,779] <inf> bt_conn: connecting -> connected
    GW [00:00:02.761,932] <inf> cis_gateway: Connected: C0:79:DB:69:2F:94 (random)
    GW [00:00:02.675,048] <inf> cis_gateway: on_device_found: ADV_IND 94:2f:69:db:79:c0
    GW [00:00:02.675,048] <inf> cis_gateway: ad_parse
    GW [00:00:02.675,048] <inf> cis_gateway: device_found: ADV_IND 94:2f:69:db:79:c0
    GW [00:00:02.675,079] <dbg> cis_gateway: device_found: Device found
    GW [00:00:02.675,872] <inf> bt_conn: disconnected -> connecting
    GW [00:00:02.761,779] <inf> bt_conn: connecting -> connected
    GW [00:00:02.761,932] <inf> cis_gateway: Connected: C0:79:DB:69:2F:94 (random)
    uart:~$ GW [00:00:04.563,873] <dbg> cis_gateway: security_changed_cb: Security changed: level 2
    GW [00:00:04.563,873] <dbg> cis_gateway: security_changed_cb: Security changed: level 2
    uart:~$ GW [00:00:05.813,507] <err> cis_gateway: Channel location not supported
    GW [00:00:05.813,751] <inf> bt_conn: connected -> disconnecting
    GW [00:00:05.813,781] <inf> cis_gateway: ble_acl_start_scan
    GW [00:00:05.813,781] <inf> bt_keys: bt_foreach_bond
    GW [00:00:05.813,842] <dbg> cis_gateway: bond_check: Stored bonding found: C0:79:DB:69:2F:94 (random)
    GW [00:00:05.813,873] <inf> bt_scan: bt_le_scan_start
    GW [00:00:05.814,392] <inf> cis_gateway: Scanning successfully started
    GW [00:00:05.814,422] <err> bt_unicast_client: Unable to read available contexts
    GW [00:00:05.814,422] <dbg> cis_gateway: discover_sink_cb: Discover complete: err 0
    GW [00:00:05.814,422] <wrn> cis_gateway: Connection not found
    GW [00:00:05.814,453] <err> cis_gateway: Unknown connection, should not reach here
    GW [00:00:05.833,465] <inf> bt_conn: disconnecting -> disconnect-complete
    GW [00:00:05.833,496] <inf> bt_conn: disconnect-complete -> disconnected
    GW [00:00:05.835,845] <inf> cis_gateway: Disconnected: C0:79:DB:69:2F:94 (random) (reason 0x16)
    GW [00:00:05.835,876] <wrn> cis_gateway: Connection not found
    GW [00:00:05.835,876] <wrn> cis_gateway: Unknown connection
    GW [00:00:05.835,876] <inf> cis_gateway: ble_acl_start_scan
    GW [00:00:05.813,507] <err> cis_gateway: Channel location not supported
    GW [00:00:05.813,751] <inf> bt_conn: connected -> disconnecting
    GW [00:00:05.813,781] <inf> cis_gateway: ble_acl_start_scan
    GW [00:00:05.813,781] <inf> bt_keys: bt_foreach_bond
    GW [00:00:05.813,842] <dbg> cis_gateway: bond_check: Stored bonding found: C0:79:DB:69:2F:94 (random)
    GW [00:00:05.813,873] <inf> bt_scan: bt_le_scan_start
    GW [00:00:05.814,392] <inf> cis_gateway: Scanning successfully started
    GW [00:00:05.814,422] <err> bt_unicast_client: Unable to read available contexts
    GW [00:00:05.814,422] <dbg> cis_gateway: discover_sink_cb: Discover complete: err 0
    GW [00:00:05.814,422] <wrn> cis_gateway: Connection not found
    GW [00:00:05.814,453] <err> cis_gateway: Unknown connection, should not reach here
    GW [00:00:05.833,465] <inf> bt_conn: disconnecting -> disconnect-complete
    GW [00:00:05.833,496] <inf> bt_conn: disconnect-complete -> disconnected
    GW [00:00:05.835,845] <inf> cis_gateway: Disconnected: C0:79:DB:69:2F:94 (random) (reason 0x16)
    GW [00:00:05.835,876] <wrn> cis_gateway: Connection not found
    GW [00:00:05.835,876] <wrn> cis_gateway: Unknown connection
    GW [00:00:05.835,876] <inf> cis_gateway: ble_acl_start_scan
    uart:~$ GW [00:00:05.835,876] <inf> bt_keys: bt_foreach_bond
    GW [00:00:05.835,937] <dbg> cis_gateway: bond_check: Stored bonding found: C0:79:DB:69:2F:94 (random)
    GW [00:00:05.835,968] <inf> bt_scan: bt_le_scan_start
    GW [00:00:05.835,968] <wrn> cis_gateway: Scanning failed to start: -120
    GW [00:00:05.835,876] <inf> bt_keys: bt_foreach_bond
    GW [00:00:05.835,937] <dbg> cis_gateway: bond_check: Stored bonding found: C0:79:DB:69:2F:94 (random)
    GW [00:00:05.835,968] <inf> bt_scan: bt_le_scan_start
    GW [00:00:05.835,968] <wrn> cis_gateway: Scanning failed to start: -120
    uart:~$
    

  • I believe the issue is in unicast_client_location_cb() where only BT_AUDIO_LOCATION_FRONT_LEFT or 

    BT_AUDIO_LOCATION_FRONT_RIGHT is supported
  • After I accepted 0x802 location. I am paired. Thank you so much for your help, Kenneth

Related