Can nRF5340 keep two links simultaneously? One BLE audio link with another nRF5340, one custom BLE link with Smart Phone for configuration

Hi,

I have kept following BLE audio since the nRF5340 audio DK was available. Recently, we came up with an idea of developing a broadcasting system. While we demoed the idea to potential customer, they required to control the BLE audio nodes with phone app, such as volume up, mute, etc. Is it possible to make a nRF5340 keep connected with 2 devices at the same time, one is on BLE audio, and another is a phone with normal BLE support? If not simultaneously, could be in the same firmware?

Thank you

Junmin

  • Hello Karl,

    Per your suggestions, I created a new application with nRF5340 LE Audio reference application as template, and furthermore, I created a dedicated thread to run peripheral ISO, using the example you mentioned as reference. Also, prj.conf was modified according to the example. The console outputs are as following, could you give some clues to fix the err "Unable to register ISO server"?

    Thank you and Best Regards

    Junmin

    *** Booting Zephyr OS build v3.3.99-ncs1 ***
    HL [00:00:00.257,476] <inf> fw_info: fw_info_app_print:
    nRF5340 Audio nRF5340 Audio DK cpuapp
    NCS base version: 2.4.0
    Cmake run : Fri Aug 04 20:29:26 2023
    HL [00:00:00.257,507] <inf> fw_info: fw_info_app_print: ------- DEBUG BUILD -------
    HL [00:00:00.257,507] <inf> fw_info: fw_info_app_print: HEADSET left device
    HL [00:00:00.268,127] <inf> board_version: board_version_valid_check: Compatible board/HW version found: 1.0.0
    HL [00:00:00.302,490] <wrn> bt_hci_core: set_flow_control: Controller to host flow control not supported
    HL [00:00:00.307,556] <inf> bt_hci_core: bt_dev_show_info: Identity: C7:48:40:57:8F:D4 (random)
    HL [00:00:00.307,586] <inf> bt_hci_core: bt_dev_show_info: HCI: version 5.2 (0x0b) revision 0x0d15, manufacturer 0x07e8
    HL [00:00:00.307,617] <inf> bt_hci_core: bt_dev_show_info: LMP: version 5.2 (0x0b) subver 0x0d15
    HL [00:00:00.433,776] <inf> ble: mac_print: MAC: 44:43:CF:DA:0F:E1 (random)
    HL [00:00:00.433,990] <inf> ble: on_bt_ready: Controller version: 3349
    HL [00:00:00.527,862] <inf> ble_iso: uart_control_sub_thread: Bluetooth initialized
    HL [00:00:00.527,893] <inf> ble_iso: uart_control_sub_thread: Unable to register ISO server (err -112)
    HL [00:00:00.528,137] <inf> cis_headset: advertising_process: Advertising successfully started

  • Hello again, Junmin

    Junmin said:
    The console outputs are as following, could you give some clues to fix the err "Unable to register ISO server"?

    The -112 error code means 'address already in use', could it be that you are attempting to use the same instance as your CIS ACL for your NUS service?

    For future reference, please use the Insert->Code option when sharing code or logs here on DevZone.

    On a general note I would also recommend that you use the latest 3393 controller version.

    Best regards,
    Karl

  • Hello Karl,

    I checked my code and did some experiments, you are right, I'm attempting to use the same CIS ACL for NUS service. I though a lot and reviewed other people's related questions in DevZone, but still have no idea how to fix it, any suggestions?

    By the way, I have upgraded my code with the latest 3393 controller version.

    Best Regards

    Junmin

  • 	err = bt_enable(NULL);
    	if (err) {
    		LOG_INF("Bluetooth init failed (err %d)", err);
    		return;
    	}
    
    	if (IS_ENABLED(CONFIG_SETTINGS)) {
    		settings_load();
    	}
    
    	LOG_INF("Bluetooth initialized");
    
    	err = bt_iso_server_register(&iso_server);
    	if (err) {
    		LOG_INF("Unable to register ISO server (err %d)", err);
    		return;
    	}
    
    	err = bt_le_adv_start(BT_LE_ADV_CONN, ad, ARRAY_SIZE(ad), NULL, 0);
    	if (err) {
    		LOG_INF("Advertising failed to start (err %d)", err);
    		return;
    	}

    *** Booting Zephyr OS build v3.3.99-ncs1 ***
    HL [00:00:00.257,446] <inf> fw_info: fw_info_app_print: 
             nRF5340 Audio nRF5340 Audio DK cpuapp                      
             NCS base version: 2.4.0                            
             Cmake run : Wed Aug 09 23:30:14 2023
    HL [00:00:00.257,446] <inf> fw_info: fw_info_app_print: ------- DEBUG BUILD -------
    HL [00:00:00.257,446] <inf> fw_info: fw_info_app_print: HEADSET left device
    HL [00:00:00.268,066] <inf> board_version: board_version_valid_check: Compatible board/HW version found: 1.0.0
    HL [00:00:00.302,551] <wrn> bt_hci_core: set_flow_control: Controller to host flow control not supported
    HL [00:00:00.307,586] <inf> bt_hci_core: bt_dev_show_info: Identity: D4:A5:74:D6:1E:9F (random)
    HL [00:00:00.307,617] <inf> bt_hci_core: bt_dev_show_info: HCI: version 5.2 (0x0b) revision 0x0d41, manufacturer 0x07e8
    HL [00:00:00.307,617] <inf> bt_hci_core: bt_dev_show_info: LMP: version 5.2 (0x0b) subver 0x0d41
    HL [00:00:00.433,502] <inf> ble: mac_print: MAC: 79:DD:C1:19:AE:31 (random)
    HL [00:00:00.433,715] <inf> ble: on_bt_ready: Controller version: 3393
    HL [00:00:00.527,954] <inf> ble_iso: uart_control_sub_thread: Bluetooth init failed (err -120)
    HL [00:00:00.528,228] <inf> cis_headset: advertising_process: Advertising successfully started

  • Hello Karl,

    I'm still waiting for you suggestions. At the same time, I'm trying to take the following discussion as reference,

     nRF5340 Audio DK: LE Audio and UART2 Concurrently 

    Since it's based on NCS 2.20, I'll go down to this version first.

    Any comments?

    Best Regards

    Junmin

Related