#Meshtastic folks, I need your help! How do I take the bytes off the wire and decode it into a Python class?

I'm reading in "raw protobufs" (according to the docs) from MQTT, which gives me a byte string. The ParseFromString methods don't take a bytes object, they take a String.

I see that if I can get the bytes converted into a google._upb._message.Message object, there's a meshtastic.util.message_to_json() that will probably guve me what I'm looking for.

#AskNostr #GrowNostr #programming #development

Reply to this note

Please Login to reply.

Discussion

Nevermind, I found another MQTT topic that publishes the data in JSON! I was subscribed to the topic that gives out the raw data and didn't realize that the "publish in JSON format" option published in both formats; I thought it just wasn't working right since I was still getting the raw packets.

I'm still curious about how to convert the raw data, but it's no longer in my critical path.

❤️

No idea how you find your LoRaWAN application encryption key or if you can crack it.

but i have used python and c11 libraries for just LoRaWAN packet parsing.