Connecting NRF5340 to ear buds

Hello,

I am new to Bluetooth. I have two nrf5340 LE Audio SDKs which I have been able to configure and use as gateway and headset (walkie talkie, USB, and line-in, CIS and BIS). Now the next step is I want to connect the gateway to a third party headset or ear bud to stream audio. I connected the gateway to the serial terminal on my PC through NRF connect which prints out the following at startup. I have not been able to connect to any earbuds (classic or BLE). I have tried earbuds with BT 5.0, 5.1, and 5.3. Seems the gateway needs to provide a list of connectable devices to choose from. How is this done?

*** Booting nRF Connect SDK v2.9.0-7787b2649840 ***
*** Using Zephyr OS v3.7.99-1f8f3dc29142 ***
GW [00:00:00.269,836] <inf> board_version: Compatible board/HW version found: 1.0.0
GW [00:00:00.304,321] <inf> sd_card: SD card volume size: 30941380608 B
GW [00:00:00.308,166] <inf> fw_info:
nRF5340 Audio nRF5340 Audio DK cpuapp
NCS base version: 2.9.0
Cmake run : Tue Mar 04 09:59:45 2025
GW [00:00:00.308,166] <inf> fw_info: ------- DEBUG BUILD -------
GW [00:00:00.308,166] <inf> fw_info: Compiled for GATEWAY device
GW [00:00:00.338,500] <inf> bt_mgmt_ctlr_cfg: Controller: SoftDevice: Version 6.0 (0x0e), Revision 8299
GW [00:00:00.338,714] <inf> bt_mgmt: Local identity addr: CF:33:22:1D:A1:B8 (random)
GW [00:00:00.366,882] <inf> broadcast_source: Enabling broadcast_source 0
GW [00:00:00.369,567] <inf> main: Broadcast source: NRF5340_BROADCASTER started
GW [00:00:00.370,666] <inf> bt_mgmt_adv: Local addr: 35:E1:69:8E:57:04 (random)
GW [00:00:00.372,711] <inf> main: Ext adv ready
GW [00:00:00.373,443] <inf> bt_mgmt_adv: Advertising successfully started
GW [00:00:00.381,286] <inf> broadcast_source: Broadcast source 0x2000da8c started
GW [00:00:00.381,317] <inf> le_audio: LC3 codec config for source:
GW [00:00:00.381,317] <inf> le_audio: Frequency: 48000 Hz
GW [00:00:00.381,317] <inf> le_audio: Duration: 10000 us
GW [00:00:00.381,317] <inf> le_audio: Channel allocation: 0x1
GW [00:00:00.381,347] <inf> le_audio: Octets per frame: 120 (96000 bps)
GW [00:00:00.381,347] <inf> le_audio: Frames per SDU: 1
GW [00:00:00.381,774] <inf> broadcast_source: Broadcast source 0x2000dab4 started
GW [00:00:00.381,805] <inf> le_audio: LC3 codec config for source:
GW [00:00:00.381,805] <inf> le_audio: Frequency: 48000 Hz
GW [00:00:00.381,805] <inf> le_audio: Duration: 10000 us
GW [00:00:00.381,805] <inf> le_audio: Channel allocation: 0x2
GW [00:00:00.381,805] <inf> le_audio: Octets per frame: 120 (96000 bps)
GW [00:00:00.381,805] <inf> le_audio: Frames per SDU: 1
GW [00:00:00.409,301] <inf> audio_datapath: Drft comp state: CALIB
GW [00:00:00.509,277] <inf> audio_datapath: Drft comp state: INIT
GW [00:00:00.510,284] <inf> audio_datapath: Drft comp state: CALIB
GW [00:00:00.610,290] <inf> audio_datapath: Drft comp state: OFFSET
GW [00:00:01.010,559] <inf> audio_datapath: Drft comp state: LOCKED

Thank you,

Rich

Parents
  • Hi,

    Which BLE earbuds have you tried to use?

    Have you checked that your selected earbuds support LE Audio?

    Best regards,
    Dejan

  • Yes, I have tried various ear buds that support Bluetooth 5.0, 5.1, 5.3, and today I tried 5.4. My understanding is that all of these are BLE using the LC3 Codec.

    I have connected to my SDK using nRF Connect and J-Link. The J-Link connects to my SDK but the scanning function is disabled. It says "Note: no pre-compiled firmware is available for the selected device..." What pre-compiled firmware should I have?

    Thank you,

    Rich

  • Hi,

    dejans said:
    Where did you see the message "Note: no pre-compiled firmware is available for the selected device..."?
    Which steps did you take before seeing this message?

    Can you answer these questions as well?

    Best regards,
    Dejan

  • Hi Dejan,

    Thanks for your help. It is quite apparent I do not have a good handle of this system. I am using NRF Connect for Desktop Standalone V4.04. I have opened the Bluetooth Low Energy app and selected my nRF5340 LE Audio SDK Gateway with J-Link via USB.

    The 'start scan' button is grayed out. I get the following in the log. I have also used the nRFConnect Mobility on my phone to find the earbuds. While it finds the SDKs and other devices, it does not find any LE earbuds. Yet me iphone can connect and stream to those earbuds. Same with an Andriod phone.

    What steps should I try to take to connect my SDK gateway to LE earbuds? As mentioned, the SDKs find each other and stream just fine.

    2025-03-07T18:38:47.978Z INFO Server setup was cleared
    2025-03-07T18:38:51.698Z INFO Selected device with s/n 001050185387
    2025-03-07T18:38:51.834Z INFO Connected to device with serial number: 001050185387 and family: NRF53
    2025-03-07T18:38:51.834Z INFO Note: no pre-compiled firmware is available for the selected device. You may still use the app if you have programmed the device with a compatible firmware.
    2025-03-07T18:38:51.835Z INFO Device setup completed
    2025-03-07T18:38:51.835Z INFO The device is not in the list of supported devices. Attempting to open as a custom device.
    2025-03-07T18:38:51.835Z INFO Opening custom device
    2025-03-07T18:38:51.835Z INFO Note: firmware must be compatible with connectivity firmware version: 4.1.4, SoftDevice API version: 5 and baud rate: 1000000.
    2025-03-07T18:38:51.835Z INFO Opening adapter connected to COM25
    2025-03-07T18:38:52.763Z INFO Successfully opened COM25. Baud rate: 1000000. Flow control: none. Parity: none.
    2025-03-07T18:38:52.764Z DEBUG State change: STATE_START -> STATE_RESET
    2025-03-07T18:38:52.764Z DEBUG 1 -> [N/A] type: RESERVED_5 reliable: no seq#:0 ack#:0 payload_length:0 data_integrity:0 err_code:0x0
    2025-03-07T18:38:52.764Z INFO Reset performed on adapter COM25
    2025-03-07T18:38:53.064Z DEBUG State change: STATE_RESET -> STATE_UNINITIALIZED
    2025-03-07T18:38:53.064Z DEBUG 2 -> [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    2025-03-07T18:38:53.315Z DEBUG 3 -> [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    2025-03-07T18:38:53.566Z DEBUG 4 -> [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    2025-03-07T18:38:53.816Z DEBUG 5 -> [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    2025-03-07T18:38:54.067Z DEBUG 6 -> [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    2025-03-07T18:38:54.317Z DEBUG 7 -> [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    2025-03-07T18:38:54.568Z DEBUG State change: STATE_UNINITIALIZED -> STATE_NO_RESPONSE
    2025-03-07T18:38:54.568Z ERROR Received status with code 0 PKT_SEND_MAX_RETRIES_REACHED, message: 'No response from device. Tried to send packet 6 times.'
    2025-03-07T18:38:55.764Z DEBUG serial port read on port COM25 aborted.
    2025-03-07T18:38:55.764Z INFO serial port COM25 closed.
    2025-03-07T18:38:55.770Z ERROR Error occured when opening port. Errorcode: NRF_ERROR_TIMEOUT (0xd)

  • This is log more updated. I am not sure what COM25 is doing but me device manager says it is connected. 

    2025-03-07T22:07:33.008Z DEBUG Application data folder: C:\Users\RichardT\AppData\Roaming\nrfconnect-bluetooth-low-energy\bundle
    2025-03-07T22:07:33.055Z INFO Using nrf-device-lib-js version: 0.4.4
    2025-03-07T22:07:33.056Z INFO Using nrf-device-lib version: 0.10.3
    2025-03-07T22:07:33.056Z INFO Using nrfjprog DLL version: 10.15.1
    2025-03-07T22:07:33.056Z INFO Using JLink version: JLink_V8.18
    2025-03-07T22:07:33.071Z DEBUG App pc-nrfconnect-ble v4.0.4 official
    2025-03-07T22:07:33.071Z DEBUG App path: C:\Users\RichardT\AppData\Local\Programs\nrfconnect-bluetooth-low-energy\resources\app.asar\resources/bundle/
    2025-03-07T22:07:33.071Z DEBUG nRFConnect 4.0.4, required by the app is (^3.8.0)
    2025-03-07T22:07:33.071Z DEBUG nRFConnect path: C:\Users\RichardT\AppData\Local\Programs\nrfconnect-bluetooth-low-energy\resources\app.asar
    2025-03-07T22:07:33.071Z DEBUG HomeDir: C:\Users\RichardT
    2025-03-07T22:07:33.071Z DEBUG TmpDir: C:\Users\RichardT\AppData\Local\Temp
    2025-03-07T22:07:33.072Z INFO Installed JLink version does not match the provided version (V7.66a)
    2025-03-07T22:07:33.237Z INFO Updated list of uuids with data from github.com/.../v1
    2025-03-07T22:07:38.440Z INFO Selected device with s/n 001050185387
    2025-03-07T22:07:38.576Z INFO Connected to device with serial number: 001050185387 and family: NRF53
    2025-03-07T22:07:38.577Z INFO Note: no pre-compiled firmware is available for the selected device. You may still use the app if you have programmed the device with a compatible firmware.
    2025-03-07T22:07:38.578Z INFO Device setup completed
    2025-03-07T22:07:38.578Z INFO The device is not in the list of supported devices. Attempting to open as a custom device.
    2025-03-07T22:07:38.578Z INFO Opening custom device
    2025-03-07T22:07:38.578Z INFO Note: firmware must be compatible with connectivity firmware version: 4.1.4, SoftDevice API version: 5 and baud rate: 1000000.
    2025-03-07T22:07:38.579Z INFO Opening adapter connected to COM25
    2025-03-07T22:07:39.508Z INFO Successfully opened COM25. Baud rate: 1000000. Flow control: none. Parity: none.
    2025-03-07T22:07:39.508Z DEBUG State change: STATE_START -> STATE_RESET
    2025-03-07T22:07:39.508Z DEBUG 1 -> [N/A] type: RESERVED_5 reliable: no seq#:0 ack#:0 payload_length:0 data_integrity:0 err_code:0x0
    2025-03-07T22:07:39.509Z INFO Reset performed on adapter COM25
    2025-03-07T22:07:39.810Z DEBUG State change: STATE_RESET -> STATE_UNINITIALIZED
    2025-03-07T22:07:39.810Z DEBUG 2 -> [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    2025-03-07T22:07:40.059Z DEBUG 3 -> [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    2025-03-07T22:07:40.310Z DEBUG 4 -> [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    2025-03-07T22:07:40.560Z DEBUG 5 -> [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    2025-03-07T22:07:40.811Z DEBUG 6 -> [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    2025-03-07T22:07:41.063Z DEBUG 7 -> [01 7e ] type: LINK_CONTROL_PACKET reliable: no seq#:0 ack#:0 payload_length:2 data_integrity:0 err_code:0x0 [SYNC]
    2025-03-07T22:07:41.314Z DEBUG State change: STATE_UNINITIALIZED -> STATE_NO_RESPONSE
    2025-03-07T22:07:41.314Z ERROR Received status with code 0 PKT_SEND_MAX_RETRIES_REACHED, message: 'No response from device. Tried to send packet 6 times.'
    2025-03-07T22:07:42.508Z DEBUG serial port read on port COM25 aborted.
    2025-03-07T22:07:42.624Z ERROR Error occured when opening port. Errorcode: NRF_ERROR_TIMEOUT (0xd)

  • Hi,

    If your earbuds are not scanning to a specific broadcaster, they would not be able to connect to it. Earbuds normally connect to a phone which acts as a broadcast assistant. The phone would scan for broadcasters, find desired stream and tell earbuds to connect to that source. 
    At present, for most phones on the market the phone needs to be connected to the earbuds as normal first, then there is a button for scanning for broadcasters/Auracasters somewhere in the menu (this is different from phone to phone). If you do not have a phone that supports LE Audio, then there is no chance for the earbuds to find the broadcaster unless you have a broadcast assistance built into the charging case like this one.

    Best regards,
    Dejan

  • I can connect my phone to my Bluetooth LE earbuds no problem. What I want to do is connect my nRF5340 SDK Gateway to my earbuds, like the phone does. I can put my earbuds in pairing mode, but how do I put my SDK in scanning mode and pair to them?

Reply Children
  • Hi,

    Which specific earbuds do you use?

    Best regards,
    Dejan

  • The final product needs to be compatible with a variety of Bluetooth LE earbuds and headsets. That includes ones with microphones. Currently I am working with this set. 

    www.amazon.com/.../B0DSKN15PV

  • Hi,

    Richard Taft said:
    What I want to do is connect my nRF5340 SDK Gateway to my earbuds, like the phone does. I can put my earbuds in pairing mode, but how do I put my SDK in scanning mode and pair to them?

    The way to connect to Nordic broadcaster is to connect through phone using Auracast on the phone. You can check if your phone supports Auracast.

    Best regards,
    Dejan

  • Neither my phone, nor my earbuds support Auracast. Broadcast (BIS) is not a requirement for this project. Shouldn't CIS mode connect without Auracast?

    My initial goal is to simply stream audio from my SDK to my BT 5.4 earbuds. What is the process? I have been using nRF5340 SDKs but it seems there is not a lot of support other than the walkie talkie demo.

    I also have a nRF52840 USB SDK which seems to be better supported. What is the process to connect this device to my earbuds and stream sound from my pc? I think it is running the original blinky demo program. What sample program should I use?

    I am really getting frustrated with the complexity of doing the most basic Bluetooth service of all- streaming sound to earbuds or a speaker. Please send me a guide to doing this.

  • Seems you have run into an issue with the way Bluetooth versions are being abused in marketing products. The Bluetooth version number is not directly linked to features in the product, it is the version of the spec the device was certified against.

    For a feature to possibly be supported the device must be certified for a Bluetooth spec no older than the one that introduced the feature. Bluetooth LE Audio came with Bluetooth 5.2 so anything with a Bluetooth spec lower than 5.2 will for sure not support Bluetooth LE Audio. Any Bluetooth Audio support then is guaranteed to be Bluetooth Classic. A product may only support the main featrures from Bluetooth 2.0 but still be certified as a Bluetooth 6.0 product, that only means it is tested to conform to the latest spec, this means good for interoperability but doesn't say anything about features.

    For a product marked with Bluetooth 5.2 or higher it MAY use Bluetooth LE Audio but it MAY also only support Bluetooth Classic. What it does support should be listed as features on the device if you are to be able to say for sure. The earbuds you linked to has no comments whatsover so impossible to say if they support Bluetooth Classic only or if they also support Bluetooth LE Audio.

    If you have a phone supporting Bluetooth LE Audio then a nRF5340 Audio kit with the earbud sample running CIS will show up as a headset like normal and you can connect to it. If it doesn't then I would check if the phone actually supports Bluetooth LE Audio as not all phones do.

Related