Stream Binary Data from Arduino Nano 33 BLE to PC via BLE

Thanks for the reply.

Yes right now, I refactored the BLEStringCharacteristic to a "BLEArrayCharacteristic" class and use the that interface for sending data with the function you listed:

int writeValue(const uint8_t value[], int length);

My overall goal would be to have a function like this:

BLEByteArrayCharacteristic deviceCharacteristic(RANDOM_UUID, BLERead | BLEWrite, 10000);
deviceCharacteristic.writeValue(packetBuffer, 10000);

All transmission is in binary bytes so it's not clear what you are asking?

I would like to send a large binary buffer via BLE for faster, one-shot transmission, rather than packet by packet. I hope this will help save clock-cycles for my normal operations on the board elsewhere, and improve my transmission rate.

What data are you trying to send?

I use a uint8_t array to contain <512 bytes of payload (multiple "packed" packets of 3-byte/5-byte sizes). Also, if there is a way for me to send a chunk of higher than the 512 byte threshold, that would be great. Serially, I have a solution right now that sends a buffer size of 10,000 bytes.

There is a data size limit of 20 bytes based on a BLE core specification of 33 maximum bytes in the payload.

I also reviewed the BLE Specification in the nRF52840 and found the maximum recommended BLE throughput is 1Mbps. Where do you find the 33 maximum payload bytes in the specification?