Thingy53 as Bluetooth Audio Broadcast Source

Hello!

I am currently working on utilizing the Thingy53 as a Bluetooth Audio Broadcast Source. I have so far successfully developed an application that utilizes the DMIC interface on the Thingy53 to transmit audio over USB. While this USB functionality is functioning as intended, I am now attempting to achieve the same audio transmission over a Bluetooth connection instead, rather than a USB connection.

I am referencing the 'samples/bluetooth/broadcast_audio_source' code, which is serving as a helpful starting point for Thingy53 development. I've come across a challenge, however, since the repository is designed specifically for the nrf5340dk board, not the Thingy53. Because of this, I am not sure where to start porting the code to suit the Thingy53.

Any assistance, advice, or pointers on implementing this Bluetooth functionality would be greatly appreciated!

  • Hello,

    Thank you for your extreme patience with this.

    I am referencing the 'samples/bluetooth/broadcast_audio_source' code, which is serving as a helpful starting point for Thingy53 development. I've come across a challenge, however, since the repository is designed specifically for the nrf5340dk board, not the Thingy53. Because of this, I am not sure where to start porting the code to suit the Thingy53.

    There will be some changes necessary to the LE Audio reference application to have this working on the Thingy:53, but there is no technical limitation on the Thingy:53 that would be in the way of using it as a Auracast Broadcaster device.
    The primary changes is to the devicetree, since the board components are different for the Thingy:53 compared to the nRF5340 LE Audio DK, but it sounds like you are already aware of these changes.

    In the application there will also be a couple of changes necessary. Most prominently is that you will have to remove the calls to initialize and configure the CS47L63 hardware codec used on the nRF5340 LE Audio DK. You could also remove all the buttons, and LEDs functionality for instance, since this is not available on the Thingy:53.

    Unfortunately, we do not have a guide or example that shows how to modify the LE Audio reference application to work on the Thingy:53, but I have also heard from other customers in the past that this has worked without issue.

    Have you started the work with the devicetree changes (changing build target, and then going through the application's overlay file to reroute functionality to match the resources available on the Thingy:53)? If so, what sort of issues are you seeing?

    Best regards,
    Karl

  • I apologize for taking so long in responding. Although I am aware that both the device tree and the application code itself needs to be altered, I am not too sure where to begin with the process. I am new to both Zephyr and embedded systems using Nordic as a whole. I have begun to look into the code but I am confused where to begin.

  • Hello,

    Coalby said:
    I apologize for taking so long in responding.

    No need to apologize - we'll continue this whenever you have a chance!

    Coalby said:
    Although I am aware that both the device tree and the application code itself needs to be altered, I am not too sure where to begin with the process. I am new to both Zephyr and embedded systems using Nordic as a whole. I have begun to look into the code but I am confused where to begin.

    Thank you for clarifying this - this is great for me to know when typing out my answers! :) 

    If you are new to developing with the nRF Connect SDK I strongly recommend familiarizing with it through the DevAcademy nRF Connect SDK Fundamentals course which takes you through all the fundamentals of working with the SDK.

    Following this, I would take a look through the board files for the nRF5340 Audio DK and compare them with the board files for the Thingy53(a daunting task, at first glance), to see how they are set up differently.
    Fortunately, there is a lot of the functionality of the nRF5340 Audio DK board files that we can look past (like the I2C communication to the onboard hardware codec, or the I2S output capabilities), since we do not need this functionality in the Thingy:53 version.

    Then, you can create an instance of the broadcast_source application in your VSC, with the Thingy:53 as your board target (configured in the build configuration of the application), and lastly create an overlay file with the (few) necessary hardware changes, and that should be it! 
    Leaving in unused and inaccessible functionality in your application will cause errors and warnings when you try to build (because instances or resources for instance is used in two places at once), which you then can deal with incrementally until you finally have the application running on the Thingy:53!

    Please give this a try, and let me know if you encounter any issues or questions, or would like for me to elaborate on anything! :)
    Best regards,
    Karl

  • Thanks for the response Karl! Following your advice, I have looked back over the nRF Connect SDK Fundamentals Course and looked over both of the boards files. Should I keep all the code in the sdk-nrf/applications/nrf5340_audio folder other than the broadcast_sink, unicast_server, and unicast_client directories? Also, should the overlay files for the thingy53 be placed in the dfu/conf directory or in the broadcast_source directory itself? I greatly appreciate your assistance on this issue.

  • Hello,

    Coalby said:
    Thanks for the response Karl!

    No problem at all, I am happy to help! :) 

    Coalby said:
    Following your advice, I have looked back over the nRF Connect SDK Fundamentals Course and looked over both of the boards files.

    Great, I am glad to hear that!

    Coalby said:
    Should I keep all the code in the sdk-nrf/applications/nrf5340_audio folder other than the broadcast_sink, unicast_server, and unicast_client directories? Also, should the overlay files for the thingy53 be placed in the dfu/conf directory or in the broadcast_source directory itself?

    You can remove the code for the non-relevant configurations from your application's folder, correct.
    You should place your overlay file in the broadcast_source directory.
    If any configuration change is needed for the dfu you can find the relevant files within the dfu/conf directory.
    Which DFU method are you using to program your Thingy:53?

    Best regards,
    Karl

Related