I was looking into using nanopb on the Electron but have been having issues compiling it. Most examples concern the Arduino. I’m not yet experienced with the Electron enough to make the necessary changes. I noticed when I looked into the firmware files on the GitHub that the firmware seem to have a nanopb folder.
Does the Electron already support protobuf natively?
If not, can you point me in the direction of how I would go about implementing protobuf on the Electron?
Protobuf is just a communications protocol. I don’t think it makes sense to think of it as “native” support. You will have to compile in the C files generated by nanopb from your protobuf descriptor files.
FWIW, we moved away from protobuf to MQTT. I don’t know your particular use case, and there are certainly many cases where the extreme efficiency of protobuf is useful. However, in most development cases the human time is far more expensive than the bandwidth. Our custom protobuf endpoint was a constant headache, it was a lot easier to work with standard server endpoints.
We covered this in another thread: you can use the Device-OS nanopb if you build locally with gcc and monolithically, giving up on over-the-air updates. Otherwise you need to copy the library with your user code.