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
  • Thanks for your patience, Dekel.

    Please the attached file. As you know, adding ACL link affects the LE audio performance directly. so you can tune the related parameters number of retransmissions, bitrate, advertising interval and so on. For better performance, you should tune the numbers accordingly. 

       

    Best regards,

    BrianModifiedFiles.7z

  • Hi Brian,

    I tried to run the code you've shared as it is. When trying to connect to the gateway unit with my iPhone, either through nRF connect for mobile or nRF Toolbox, it doesn't succeed.

    I receive the error of BT_HCI_ERR_CONN_FAIL_TO_ESTAB and the unit constantly connects and disconnects from the iPhone:

    I'll mention that there's no I2S audio source connected to the gateway unit and also there's no headset unit around it. That's in order to avoid interference.

    I tried to manipulate prj.conf, but with no success.

    I would appreciate your help.

    Thanks,

    Dekel

  • It's not fully optimized yet, but it looks good for both iPhone and Android. you can simply merge the attached one file((\broadcast_source\main.c) to your previous patch. Feel free to comment about your result.

    I tried it, but unfortunately I'm not able to connect with my iPhone. I receive the following error (BT_HCI_ERR_CONN_TIMEOUT):

    I'm using iOS 17.5.1 and tried with both nRF Connect for Mobile (v2.7.6) and nRF Toolbox (v5.0.9).

    I'll mention that the Android connection still works, which is great Slight smile

    Thanks.

  • Hello Dekel,

    sorry for this delay. In the meantime, I've tried on 2 devices with the similar condition, one iPad(iOS17.5.1, nRF Toolbox 5.0.9) and the other, iPhoneX(

    16.7.8). 

    It works on both on my side, but it seems to be worse on your side. I believe this can be mitigated adjusting the related parameters.

    Just for your verification, you can lower the streaming quality and see the ACL connection status.

    If you need further issues or questions, please let me know.

    //Brian

  • Just for your verification, you can lower the streaming quality and see the ACL connection status.

    Is there a specific parameter that should be modified in order to achieve that? Because I'm not sure how to do that.

  • Hello Dekel,

    It looks like radio 'still' needs to have more margin for ACL link. Then we can modify the performance of LE Audio from stereo to mono. You can add these two lines in the configuration file. 

    CONFIG_MONO_TO_ALL_RECEIVERS=y

    CONFIG_BT_BAP_BROADCAST_SRC_STREAM_COUNT=1

    I believe this should work. Would you come back to me after trying this?

    //Brian

  • Hello Dekel, any update with the last suggestion?

    It's pretty promising because it relieved a lot of radio occupancy with modo.

    Please let me know the result and close if it's cleared. ;)

    //Brian

Reply Children
Related