Questions tagged [nanopb]

A C library implementing Google's Protocol Buffers data format. Mainly targeted towards embedded / limited resources use cases.

Nanopb is a plain-C implementation of Google's Protocol Buffers data format. It is targeted at 32-bit microcontrollers but is also fit for other embedded systems with tight (2-10 kB ROM, <1 kB RAM) memory constraints.

Project homepage

GitHub Repository

87 questions
0
votes
0 answers

Protobuf (C++) throws "missing required parameter" error for optional field

I'm communicating between embedded device that uses nanopb and desktop PC that uses protobuf-c, but get an error when parsing encoded message. Embedded device sends a message, "Response" with an optional field that is of a different message type…
dimipage
  • 1
  • 2
0
votes
1 answer

Protocol Buffer nanopb Serializing string and decoding error utf-8 character

I am currently trying to serialize a string using nanopb and decoding the message in python/java. The ints I have no trouble and I can serialize and deserialize. But when it comes to string, I keep getting the same error: 'utf-8' codec can't decode…
Asan
  • 327
  • 3
  • 17
0
votes
1 answer

Why when i encode the repeated field in nanopb with max_count, the bytes.written is zero(empty) in the other hands it cant be encoded

I'm using arduino for encoding the massage, i have tried for required and success for encoding and decoding back, but for repeated, after i encode it, the size of buffer is 0, so i cant send my buffer to other arduino here is my code file.ino { …
Estu
  • 3
  • 1
0
votes
1 answer

nanopb (Protocol Buffers library) repeated sub-messages encode

we are using the nanopb library as our Protocol Buffers library. We defined the following messages: simple.proto: syntax = "proto2"; message repField { required float x = 1; required float y = 2; required float z = 3; } message…
Tanasis
  • 795
  • 1
  • 9
  • 21
0
votes
1 answer

Input string consists of null terminating chars

I'm using NanoPB to send an encoded data (array of unsigned char) from a server to a client. I'm mapping each byte as a single char, concatenate them, and next, send as a whole string through a network. In the client side, I have a serial interface…
Masoud Rahimi
  • 5,785
  • 15
  • 39
  • 67
0
votes
1 answer

c++ nanopb Protobuff without

I have a protoBuff3 specification which looks something like message MSG { string name = 1; repeated string data = 2; } And a options file that sets "MSG.data max_count:20" I am trying to encode and decode protobuffs without using . I am…
lufthansa747
  • 1,923
  • 3
  • 26
  • 39
0
votes
1 answer

Depending on protos from external repo with custom rules

How do I properly depend on proto_libary rules defined in external repos and use custom rules? I need to generate files using nanopb for a proto in an external repo. This works: proto_library( name = "awesome_proto", deps =…
user1483946
  • 151
  • 2
0
votes
1 answer

nanopb can't communicate with google protobuf

I have created a simple server client program. I wanted to enable the communication between NanoPb and Protobuf. However, it does not work. Does anyone know what I'm doing wrong? TestParameterProto.proto : syntax = "proto2"; import…
Cooper47
  • 1
  • 1
0
votes
2 answers

Apple Mach-O Linker (ld) Error(Xcode Swift) nanopb

When I went to upload to iTunesConnect for TestFlight, I noticed a framework that I never installed into my application. "nanopb" is what it was called. I have never heard of it before either. I went to delete the files from my application and then…
user8350399
0
votes
2 answers

Nanopb without callbacks

I'm using Nanopb to try and send protobuf messages from a VxWorks based National Instruments Compact RIO (9025). My cross compilation works great, and I can even send a complete message with data types that don't require extra encoding. What's…
Chuck Claunch
  • 1,624
  • 1
  • 17
  • 29
-1
votes
1 answer

How do I get field names and the message name using nanopb in C?

I need the message name and the field name of the protobuf in the form of a string. I could not find a way to do this in nanopb's documentation.
Malhaar-K
  • 1
  • 2
-2
votes
1 answer

enncoding and decoding issue in nanopb

Recently started exploring nanopb - apology if my questions sound sily. I faced some issues while assigning and retrieval of strings and integers when I modified simple example of nanopb. Let me give my steps before my questions - I defined…
Dhiman
  • 59
  • 6
1 2 3 4 5
6