ProtoBuf for controlling BP5

base64 is easy, but it has quite the overhead on the wire. And I think the effective wirespeed is something relevant for some protocols where you have large consecutive chunks of data, like for example when flashing firmware, reading out SD cards or similar things.

I think with protobuf and a framing layer you don’t have fully ready-to-use support in any language. So some coding will always be required.

So I’d say aiming for a better framing to keep the overhead in check is justified.

I suggest to use Consistent Overhead Byte Stuffing (COBS) for framing: Consistent Overhead Byte Stuffing - Wikipedia

This isn’t difficult to implement on top of Protobuf.

1 Like