nRF5340 Audio - configure gateway unit also as ACL peripheral

Hi,

I'm working with nRF5340 Audio DKs.

I'm able to successfully run the audio example in BIS mode (with gateway and headset devices).

My goal is to open another BT connection, in parallel to the audio broadcast on my gateway device, to which I can connect with the headset units and the nRF Toolbox App via NUS. I'd like the gateway device to act as peripheral in that manner and to be able to connect to 6 different devices concurrently via NUS (5 headset units + 1 smartphone app).

I tried implementing it by myself, and I feel like on the brink of it, but calling bt_le_ext_adv_create() twice (once for audio and once for ACL) fails with EIO (I/O error). It's unclear to me why it happens. As I see it, the challange is to create 2 concurrent advertisements in the gateway unit - audio streaming and ACL connection.

On this ticket I received great help from , which implemented the gateway device as central in terms of ACL connection.

I'll share that I was able to deduce from his development and successfully configure the headset device as central in terms of ACL connection (in parallel to audio streaming receival). here are the relevant files: headset_as_ACL_central.rar

I would appreciate any help with such implementation.

Thank you,

Dekel

Parents Reply Children
  • Hello Dekel,

    I see the error code 0x0E, which is BT_HCI_ERR_INSUFFICIENT_SECURITY.

    I guess the bonding information on the phone side might have trouble. Would you try it again after erasing it on the phone side?

    //Brian

  • Hi Brian,

    The unit wasn't bonded with my Android phone, therefore there's nothing to erase.

    I'll mention that compiling the code you've provided out-of-the-box fails on my PC:

    That's probably due to prj.conf. When I replace it with another file it compiles without issues: 28130.prj.conf

    The attached file is a combination of your prj.conf and another prj.conf, which suits the scenario of using the headset unit as ACL central.

    Can you please take a look on that?

  • Hello Dekel,

    I verified it all from scratch on NCS2.6.0 and confirmed it's built without any errors.

    are you sure that you modified all the files as below?

    -. applications/nrf5340_audio/broadcast_source/main.c
    -. applications/nrf5340_audio/child_image/hci_ipc.conf
    -. applications/nrf5340_audio/prj.conf
    -. applications/nrf5340_audio/src/bluetooth/bt_management/bt_mgmt.c

    And please make sure it should be built with pristine option(--pristine) when you build again.

    //Brian

  • Hi Brian,

    In order to test the Android functionality properly, I've cloned the sdk-nrf to my PC and switched to the "v2.6.0" tag. As a sanity check, I've built it as is using the original buildprog.py (with --pristine). It worked well.

    The next thing I did was replacing the 4 files you've mentioned above and then using buildprog again. It was built & flashed successfully to 2 units (one headset and one gateway).

    I'm able to stream audio through the gateway unit and receive it on the headset unit, but when I try to connect to the NUS advertisment with an Android smartphone, I get this error (BT_HCI_ERR_CONN_FAIL_TO_ESTAB):

    I've tried multiple times, both with nRF Connect For Mobile and nRF Toolbox apps. Furthermore, my Android's bonding list is empty.

    I would appreciate your help with this.

    In addition, I'd appreciate an update regarding the iOS communication. Our project will include both Android and iPhone support.

    Thank you,

    Dekel

  • Hello Dekel,

    Thanks for your update.

    Dekel said:
    I'm able to stream audio through the gateway unit and receive it on the headset unit, but when I try to connect to the NUS advertisment with an Android smartphone, I get this error (BT_HCI_ERR_CONN_FAIL_TO_ESTAB):

    Can you share the binary(merged-domains.hex) of the gateway? I will try it on my side to check. And also, can you tell me what Android model you are testing?

    Dekel said:
    In addition, I'd appreciate an update regarding the iOS communication. Our project will include both Android and iPhone support.

    I believe iOS seems to have trouble with ADV-EXT for connection(NUS). We keep on eye on their response or guide. 

    Thank you,

    Brian

     

Related