LE Audio device advertisement not scannable by nrf5340

I am working on dissecting the nrf5340 audio application to include only the necessary bits to make a custom gateway on a nrf5340 audio DK. I am using the example application built as a headset device on another Audio DK to test my application. I am at the stage now where I can scan for advertisements, but I can't find the advertisement from my headset device.

It shows up in the nrf Connect mobile application so I know it is advertising, but I don't receive the advertisement on the gateway. Is there anything special that needs to be added to scan for LE Audio devices? I can receive advertisements from all other bluetooth devices in the area.

  • Hello,

    My initial thought was that the headset is using directed advertising, but then the phone would not have been able to read them. The headset log will show if the headset is using directed advertisement (<inf> bt_mgmt_adv: Adv directed to: MAC address (random)) or not. To completely rule this possibility out you can reset or switch on the headset while pressing BTN 5. This will remove any bonding data stored on the headset device.

    Can you share the log you get when running the gateway? You can also include the log for the headset, but I think the gateway is more important at this stage.

    I am working on dissecting the nrf5340 audio application to include only the necessary bits to make a custom gateway on a nrf5340 audio DK.

    Do I understand correctly that you

    • started with the nRF5340 Audio application, and
    • are gradually removing features to only include what you need?

    Is the edited gateway application and the unedited headset application from the same version of nRF Connect SDK?

    Best regards,

    Maria

  • Hi, that was my initial thought too, so I have tried what you suggested to rule it out already before I asked :) 

    I thought I was using the same version of the SDK for both, but realized I was actually using 2.5.0 for the gateway and 2.5.1 for the headset application, but that is fixed now and didn't make a difference.

    I started with an application we have for an USB amplifier using nRF5340 without bluetooth and added part by part of the relevant code from the nRF5340 Audio application, so there might be some missing configuration, but I am not sure where to look as scanning for other devices works fine. I haven't started adding any of the audio code yet, just enabled the bluetooth and started scanning.


    Log from gateway (I'm using a log wrapper so it looks a little different than the standard application:

    *** Booting nRF Connect SDK v2.5.1 ***
    [INFO] (../src/main.cpp:54) Started application
    [INFO] (../src/main.cpp:57) USB ready for playback!
    [00:00:00.296,600] <inf> usb_cdc_acm: Device suspended
    [00:00:00.314,025] <inf> bt_hci_core: Identity: CC:14:C1:FF:E8:C4 (random)
    [00:00:00.314,056] <inf> bt_hci_core: HCI: version 5.2 (0x0b) revision 0x0d60, manufacturer 0x07e8
    [00:00:00.314,086] <inf> bt_hci_core: LMP: version 5.2 (0x0b) subver 0x0d60
    [INFO] (../src/bt_mgmt.c:162) Scanning successfully started
    [00:00:00.397,949] <inf> usb_cdc_acm: Device resumed
    [00:00:00.535,461] <inf> usb_cdc_acm: Device configured

    After this I log all the devices found and use the "device_name_check" function to look for devices with the name "NRF5340_AUDIO". No hits on devices with that name, and I can't find the uuid of the headset in the list of found devices.

    Log from headset:

    *** Booting nRF Connect SDK v2.5.1 ***
    HL [00:00:00.328,125] <inf> fw_info:
    nRF5340 Audio nRF5340 Audio DK cpuapp
    NCS base version: 2.5.1
    Cmake run : Tue Feb 13 10:06:46 2024
    HL [00:00:00.328,125] <inf> fw_info: ------- DEBUG BUILD -------
    HL [00:00:00.328,125] <inf> fw_info: HEADSET left device
    HL [00:00:00.338,745] <inf> board_version: Compatible board/HW version found: 1.0.0
    HL [00:00:00.379,638] <inf> bt_hci_core: No ID address. App must call settings_load()
    HL [00:00:00.380,371] <inf> bt_hci_core: Identity: FD:5F:38:ED:D5:0C (random)
    HL [00:00:00.380,401] <inf> bt_hci_core: HCI: version 5.2 (0x0b) revision 0x0d60, manufacturer 0x07e8
    HL [00:00:00.380,401] <inf> bt_hci_core: LMP: version 5.2 (0x0b) subver 0x0d60
    HL [00:00:00.382,171] <inf> bt_mgmt_ctlr_cfg: Controller: LL_ACS_NRF53. Version: 3424
    HL [00:00:00.384,124] <inf> bt_mgmt: Local identity addr: FD:5F:38:ED:D5:0C (random)
    HL [00:00:00.415,710] <inf> bt_mgmt_adv: Local addr: 7B:48:FA:E9:29:59 (random)
    HL [00:00:00.416,259] <inf> bt_mgmt_adv: Device name is: NRF5340_AUDIO
    HL [00:00:00.416,259] <inf> bt_mgmt_adv: Advertising successfully started

    Screenshot from nRF Connect app: 

  • After doing some more investigations I found out all the devices I was able to scan for was the ones with legacy advertisements. I found out I had to enable extended advertisements in the configuration for the central/gateway to be able to scan for them ( I didn't include the configs because I thought they were for the peripheral creating the advertisements). This ticket helped me: https://devzone.nordicsemi.com/f/nordic-q-a/93525/scan-extended-advertising-with-nrf-connect-desktop/394357

    As I understand it 

    CONFIG_BT_CTLR_ADV_EXT=y is for enabling it in the controller and 
    CONFIG_BT_EXT_ADV=y is for enabling api support
  • Hello,

    Thank you for your patience.

    Which scan parameters are you using when starting the scanning on your custom gateway? Make sure that the scan parameters is compatible with extended advertisements.

    Best regards,

    Maria

  • Sorry I should have specified that after I updated these configurations I was able to detect my headset device, so it's sorted out now :) I am using the same parameters as in the Audio Application so active scanning and filter duplicates.

Related