Failed to read MAVLink TUNNEL message

Hi,

I am trying to read MAVLink TUNNEL messages.
My code looks like this:

mavlink_msg_TUNNEL.lua (282 Bytes)

mavlink_tunnel.lua (931 Bytes)

For some reason the lua reads payload_type 0.
I can see payload_type is 208 in MAVLink Inspector.

I am stuck, any help is appreciated.

it’s just a guess, but I would think that the structure in the TUNNEL lua needs to match the order in the byte stream. If so, you need to consider MAVLink’s reordering, which in this case brings the int to the front. That is, the order in the .xml file is NOT the order on the byte stream.
see Packet Serialization | MAVLink Guide

for TUNNEL you can see the actually byte ordering here: c_library_v2/common/mavlink_msg_tunnel.h at master · mavlink/c_library_v2 · GitHub

you are perfectly right, problem solved.
Many thanks.