nRF5340 Audio DK: LE Audio and UART2 Concurrently

Hi,

I have problems with the nRF5340 Audio DK to get LE Audio and UART2 concurrently on the same CIS stream to work.

GOAL

Use 2 x nRF5340 Audio DKs to transfer audio both directions via Line IN and at the same time send UART2 data from and to the 2 kits concurrently.  Exactly like the Walkie-Talkie demo but with LINE IN instead of Microphone.  And the UART must be a physical one and UART2 was chosen with a UART/RS232 converter.  So full duplex audio and serial data.

What I did so far

I did manage to modify the Application "<Path to ncs folder>\v2.2.0\nrf\applications\nrf5340_audio" to work with the LINE IN port. See my Forum post:
nRF5340 Audio DK: Walkie Talkie Demo - LINE IN instead of MIC

I also managed to modify both these samples to work with UART2 instead of the CDC Com port UART0.  I used the 2 Samples "Central UART" and "Peripheral UART". See my Forum post:

 Central and Peripheral UART Samples on UART2 - nRF5340 Audio DK 

Then I created a third Project with 2 applications that I want to combine the 2 projects. However, I only manage to get the "GATEWAY" paired with the NUS Server to work. But on the HEADSET side I can't get the NUS Client to work.  I tested the combined GATEWAY and NUS Server (Peripheral UART) with a HEADSET only and with the NUS Client (Central UART). That is why I know the GATEWAY/NUS Server side works.

The Audio still works but I cannot receive or sent serial data on the NUS client side which is on the HEADSET application side.

Application

We need to transfer Audio and Data in a full duplex Intercom system over a short distance because the wiring of an audio and data line is not possible due to moving parts.

Could you please help me combine the 4 projects into 2 please?  Is concurrent UART and LE Audio even possible?

Kind Regards

Parents
  • Hi Amanda,

    2.2.0.   (Was using 2.3.0 originally but had a problem earlier with the board so I went one version down. )

    I tried both (first Central and lastly Peripheral) with the HEADSET, currently Peripheral UART on the HS.

    I do not have a 3rd device that can run the sniffer application.

    I am having issues with the logging because of the UART2 change.  Here is my log, I had to add a lot of printk() lines to log to UART0:

    *** Booting Zephyr OS build v3.2.99-ncs1 ***

    InitLEAudio()

    nRF5340 APP core started

    bt_dev.drv

    atomic_clear_bit

    atomic_test_and_set_bit

    bt_settings_init

    bt_monitor_send

    k_work_submit

    LE Audio Setup Done.



    InitUART2()

    Starting Bluetooth Central UART example

    bt_conn_auth_cb_register

    bt_conn_auth_info_cb_register

    Bluetooth initialized

    settings_load

    module_init

    Scan module initialized

    Scanning successfully started

    UART2 Setup Done.





    *** In ble_write_thread ***

    * Entering Loop *

    Failed to send data over BLE connection(err -128)

    NUS send timeout

    Thank you

    Fritz

Reply
  • Hi Amanda,

    2.2.0.   (Was using 2.3.0 originally but had a problem earlier with the board so I went one version down. )

    I tried both (first Central and lastly Peripheral) with the HEADSET, currently Peripheral UART on the HS.

    I do not have a 3rd device that can run the sniffer application.

    I am having issues with the logging because of the UART2 change.  Here is my log, I had to add a lot of printk() lines to log to UART0:

    *** Booting Zephyr OS build v3.2.99-ncs1 ***

    InitLEAudio()

    nRF5340 APP core started

    bt_dev.drv

    atomic_clear_bit

    atomic_test_and_set_bit

    bt_settings_init

    bt_monitor_send

    k_work_submit

    LE Audio Setup Done.



    InitUART2()

    Starting Bluetooth Central UART example

    bt_conn_auth_cb_register

    bt_conn_auth_info_cb_register

    Bluetooth initialized

    settings_load

    module_init

    Scan module initialized

    Scanning successfully started

    UART2 Setup Done.





    *** In ble_write_thread ***

    * Entering Loop *

    Failed to send data over BLE connection(err -128)

    NUS send timeout

    Thank you

    Fritz

Children
No Data
Related