5

My task is to connect via bluetooth from an android device to the device running nanoPB.

I know NonoPB handles certian things like enums diffrently... Can NanoPB handle enums if they are passed? Or failing that will any of the Protobuf modes like "Lite" allow them to communicate.

jpa
  • 10,351
  • 1
  • 28
  • 45
Mytheral
  • 3,929
  • 7
  • 34
  • 57

2 Answers2

11

All implementations of Protocol Buffers should use the same wire format, otherwise they really shouldn't be called "Protocol Buffers". The only differences are how you interact with them in your code, but the way they are encoded on the wire should be the same. So, yes, you should be able to communicate with nanoPB using any other Protobuf implementation.

(I say "should" because I haven't actually used nanoPB myself, but I would be very surprised if it didn't work.)

Kenton Varda
  • 41,353
  • 8
  • 121
  • 105
  • 9
    Yes, nanopb should be fully compatible with all other protobuf implementations. (I am the author.) – jpa Aug 08 '14 at 09:44
0

You can test your output on this decoder. You don't have to provide .proto as it treats all fields as generic. If this decoder succeeds with your data it is compliant with specs.

gmag11
  • 91
  • 1
  • 3