Set nRF5340 Audio Broadcast Stream Name

Hi,

I'm using nRF5340 Audio DK with the audio example code in BIS mode.
I would like to set the broadcast name during runtime, and not before compilation. Namely, I want to construct a string and only then run the initialization process of the stream.
I've found that CONFIG_BT_AUDIO_BROADCAST_NAME is used in the function adv_create() inside broadcast_source.c. As a simple test, I replaced it with my own string (and also updated the length parameter where needed). Surprisingly, it has no effect! Using nRF Connect for Mobile, I can verify that the broadcast name corresponds to CONFIG_BT_AUDIO_BROADCAST_NAME, although it doesn't seem to be in use.
I've searched a lot in the example code and couldn't find an explanation for that.

I'll mention that the behavior is the same when using bt_mgmt_scan_start() on the headset side.

I would appreciate your help with acquiring the ability to set the broadcast name not through CONFIG_BT_AUDIO_BROADCAST_NAME, but through a custom string.

Thanks,
Dekel

  • Thanks for the details.

    I've looked into it thoroughly, and at the bottom of it - the name is set with bt_le_ext_adv_set_data(), exactly as it is done in NCS v2.6.0.

    Furthermore, my project is in its final development stage, so changing the SDK at this point feels like an unnecessary step.

    Actually, I'll be surprised if similar code modifications in NCS v2.7.0 for setting the broadcast name will do the trick (since in the background it's similar to v2.6.0).

    I would appreciate specific support for NCS v2.6.0. I feel like I'm missing something here and believe it won't be complicated for the engineers that created the relevant modules.

    Thanks 

  • Hello,

    I got some insight internally, and the current hypothesis is that the nRF Connect for mobile application does not see the broadcast name, but the device name. I will do a test later today and report back with my findings.

    Best regards,

    Maria

  • Hello again,

    Our hypothesis has been confirmed. I captured the packets from the BIS gateway and I could see that the broadcast name was updated when I changed it during runtime.

    You should use a packet analyzer to inspect the packets from your broadcaster to find out if your implementation works as you expect.

    Edit: Note that you should configure the same name for BT_DEVICE_NAME and BROADCAST_NAME. It is not a strict requirement, but it is strongly recommended.

    Best regards,

    Maria

  • Our hypothesis has been confirmed. I captured the packets from the BIS gateway and I could see that the broadcast name was updated when I changed it during runtime.

    you're right, it does work! thank you so much for your efforts and energy invested into my issue

Related