Ask Your Question
0

Protobuf decoding for Mqtt messages

asked 2022-03-10 07:04:00 +0000

Vivan5 gravatar image

i see details about adding protobuf decoding to TCP UDP messages, but is there a way to add protobuf decoding to already dissected mqtt messages?

edit retag flag offensive close merge delete

Comments

Not entirely sure what your end goal is here, but the SparkPlugB dissector relies on the MQTT dissector to deliver messages, parses off the SparkPlugB header and then uses the protobuf dissector to dissect the message contents.

What are you trying to do and does the protocol have a name or specification?

grahamb gravatar imagegrahamb ( 2022-03-10 09:30:30 +0000 )edit

Thanks for your comment. No new protocol, basically i am sending protobuf encoded messages on mqtt. i am trying to see protobuf decoding of mqtt messages data in wireshark log itself. Like there is a way to directly link protobuf with UDP messages. Can we do some similar linking between protobuf and Mqtt message data.

Vivan5 gravatar imageVivan5 ( 2022-03-11 08:35:40 +0000 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-03-14 14:56:02 +0000

grahamb gravatar image

The MQTT dissector has a preference "Message Decoding" to allow dissection of a topic using any other dissector.

The preference setting is comprised of a match operator (Equal To, Contains, ...) the topic string to match against, whether the payload is compressed or not and lastly the dissector to call.

Note that the latter argument has to be the registered name of the dissector, e.g. as shown in the first column of the "Enabled Protocols" dialog.

edit flag offensive delete link more

Comments

Thanks a lot Graham for your answer, It is working. I created specific protobuf message's dissectors in a Lua script and assigned them in Mqtt "Message Decoding" preference to different topic strings in Wireshark. Now i can see protobuf decoding for all mqtt messages in Wireshark

Just another question. Can we do it all in a Lua script? Parse mqtt topic strings and map them to different protobuf dissectors without having to go to Wireshark MQTT dissector preference "Message Decoding"?

I am not that expert in Lua script but just curious if it's a possible option as it will give easy working

Vivan5 gravatar imageVivan5 ( 2022-03-14 16:47:38 +0000 )edit

I'm not sure if a Lua dissector can set the preferences of another dissector.

grahamb gravatar imagegrahamb ( 2022-03-14 17:23:05 +0000 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2022-03-10 07:04:00 +0000

Seen: 817 times

Last updated: Mar 14 '22