meshtastic / protobufs

Protobuf definitions for the Meshtastic project
https://meshtastic.org
GNU General Public License v3.0
73 stars 107 forks source link

How to extract message id directly from protobuff? #455

Closed lollo03 closed 4 months ago

lollo03 commented 4 months ago

Hi, I am writing a small " router " application for meshtastic mqtt messages. I need to extract the message ID from the raw message that the nodes send to the mqtt broker. However, I would like to not use the meshtastic library or any protobuff (I am writing my application in go)

There is some way to extract the message ID directly from the raw data without using protobuff libraries?

I tried to search on the docs but it appears that there isn’t any indication on how the data are encoded.

I also tried to look at some data with a hex editor and I wasn’t able to find the message id.

Can anyone help me?

Best regards, Lorenzo

garthvh commented 4 months ago

There is not

garthvh commented 4 months ago

Google makes protobufs, there is a good go library.

lollo03 commented 4 months ago

Thank you for your answer!

geeksville commented 4 months ago

This issue has been mentioned on Meshtastic. There might be relevant details there:

https://meshtastic.discourse.group/t/how-to-extract-message-id-directly-from-protobuff/10512/2

crypto-smoke commented 4 months ago

We've done some work that might make this easier for you https://github.com/meshnet-gophers/meshtastic-go