Hi Mynewt Team,

Am facing some weird problem trying to use CBOR encoding and decoding.

The structure am trying to do is the following.

Decode :-
{“field1”:1, “field2”:2, “field3”:[{“field4”:4,”field5”:5}]}

Encode :-
{“field1”:1, “field2”:2, “field3”:[{“field4”:4,”field5”:[1,2,3,4,5]}]}

Decoding works, however when am trying to encode it doesn’t work.

Now heres the kicker, Encoding works every single time when am trying to 
trigger it from a Task.

And it doesn’t work when am trying to trigger it from BLE. 

Assuming it was a memory issue, I used a mem_pool, mbuf, allocating and 
reserving space. However, problem remains.

It usually encodes and sends the following structure:

{“field1”:1, “field2”:2, “field3”:[{“field4”:4,

Which naturally fails because of incomplete cbor structure.


Thanks,
Aditya Xavier.

Reply via email to