Hello,
I am pretty new to protobuffers and NanoPB. I have the examples up and running on a single chip. Now I am trying to find the best way to transition this to a multi-chip system by transferring the serialized stream over something like UART or SPI.
I have read through the documentation and searched the group but haven't found or at least fully understood the correct way to do this.
The main problem I am running into is I will be transferring a byte at a time and the receiver will not know the length of the message as it comes in due to many optional fields. So I don't have a full buffer at many points and the decode then fails.
I have been trying to figure out if I need to implement something in the input stream or implement callbacks. I'm not really sure what each would look like. I would like to link the UART read/write functions directly to the input/output streams for NanoPB if possible.
Traditionally I would write a circular buffer and wrap a custom protocol with start and stop bytes (with internal matching bytes being escaped) so I know I have a complete message. As far as I can tell there is no way for me to detect when a full protobuffer message has been transmitted.
Any help is greatly appreciated! I am sure I am just missing something simple here.