This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF5340 - Communicating with Android app at 2 mbps

I need to transfer large amount of data from Android app at 2 mbps (it seems that bitrates about something like 1300 kbps are achievable) to nRF5340 device.

Data is audio, it will be capture using Sound Capture API, encoded with something like LC3plus, transferred over BLE 2M PHY to network core, when to application core, decoded and to I2S device.

Does some examples what can help me with my goal available (i.e. 2M phy transfer to/from Android (with Android app sources if possible), data transfer between cores, PCM output etc).

Can I also have some configuration packets transferred over BLE and DFU (not at the same time)?

Does I2S of nRF5340 support transferring 24/32 bit samples?

Parents Reply Children
  • There exists small problem: there is no support for LE Audio on any OS (Android 12 Beta has it, but it's not clear if it will be possible to use this feature with BT5.0-only capable device, probably not).

    I want something that will be available since Bluetooth 5.0 (as this is hardware I have) and with patched Android or app that will capture all system sounds and transfers it over BLE. It won't be actual LE Audio, but rather audio-over-BLE. There exists similar thing (but not same) from STMicroelectronics: https://www.st.com/en/embedded-software/fp-aud-bvlinkwb1.html, but there are >6000 code lines which are pretty much impossible to read.

    Is it possible to modify UART example such that it will pass everything that it got to decoding procedure (to lines 339-391 in codec_exe.c from LC3plus implementation)?

    How much bytes can I get in one BLE packet?

  • O11111 said:
    Is it possible to modify UART example such that it will pass everything that it got to decoding procedure (to lines 339-391 in codec_exe.c from LC3plus implementation)?

    The data transfer is agnostic, so feel free to handle and use the data as you best see fit. 

    O11111 said:
    How much bytes can I get in one BLE packet?

    You can find some useful information here:
    https://www.novelbits.io/bluetooth-5-speed-maximum-throughput/

    Short answer: 247bytes.

  • It looks like all received packets go to 'bt_receive_cb' and I should process them there, right? And if I'll send 247 bytes from nRF Toolbox UART then all of them will be in 'const uint8_t *const data', right?

    What is the maximum throughput I could expect from this setup (assuming I'll modify Toolbox to send data that was read from file)?

    Is 2M PHY enabled by default or I will have to do it manually (in both Toolbox and UART example)? How if so?

    Do I2S examples (for PCM5102A) exist?

Related