I needed to send a structure from an STM32 running an Arduino core to an Android device using Async Streams in prefix mode over Bluetooth. This snippet should work with the 8 bitters too.
Seems to work for me. Better programmers than me are sure to find holes in it so I am waiting to learn...