Protobuf on the Electron with nanopb

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?

Thank you in advance

Nobody knows/can help? I looking the same thing for Argon/Xenon

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.

I was thinking about using nanopb library which is part of Device-OS for Particle Protocol. Yes, I know how it works, but still I will have to add nanopb library manually to my user code.

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.

Yes, I know but there is no explicit tutorial for building monotonically. Could you provide example ‘make’ command? Thanks in advance!