Using Classic Bluetooth (RFCOMM) not LE, how many bytes at most can fit into one data packet?

Matthew Exline 0 Reputation points
2023-05-30T18:02:57.5166667+00:00

I just want to know how many bytes at most I can send in a single packet.
I'm looking at this tutorial provided by Microsoft: https://github.com/microsoft/Windows-universal-samples/blob/main/Samples/BluetoothRfcommChat/cs/Scenario1_ChatClient.xaml.cs
and it does a good job explaining basically how to implement a bluetooth-using app, but I want to see if I can optimize for specific situations and part of being able to do this is knowing how many bytes I can send in JUST ONE PACKET.
I've read that Payload for Data Channel PDU is 255 bytes. I've also read that the maximum is 251 bytes because of a 4-byte MIC included in there that you can't store data over. I've then also read that the MIC is actually not mandatory.
I'd like to know how I can know that I can send as much data in each and every packet to reduce overhead as much as possible and be as efficient as possible with the app that I'm writing. As it stands now, there's no hard-set amount of bytes I need to transfer per-second. It would be best if I can design the system around how many bytes of data (excluding headers and such) I can fit into my standard data packets.
https://www.rfwireless-world.com/Articles/Bluetooth-Physical-Layer.html
https://www.mathworks.com/help/bluetooth/ug/bluetooth-packet-structure.html#responsive_offcanvas

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,640 questions
{count} votes