dnlplm / WiresharkQMIDissector

Wireshark QMI dissector for Qualcomm based modems
GNU General Public License v3.0
10 stars 6 forks source link

No QMI decoding at QMI-over-MBIM #4

Closed vheat closed 4 weeks ago

vheat commented 1 month ago

thanks for the tool, I found an issue when trying to run it. Only the Service ID and the CID and the dump of the Information buffer was shown in Mobile Broadband Interface Model section of the decoding. Not any QMI section at all. Looking and some debug prints at the lus script of this repo revealed a string change coming out of the USB decoding, a string "0x02" has to be used instead of "2". Why this change happened in Wireshark infrastructure I did not follow (I used Wireshark 3.6.2 on Linux).

diff --git a/qmi_dissector_body_1.part b/qmi_dissector_body_1.part
index 02ad9b3..e98db1f 100644
--- a/qmi_dissector_body_1.part
+++ b/qmi_dissector_body_1.part
@@ -31,7 +31,7 @@ function qmi_proto.dissector(buffer, pinfo, tree)
        local usb_bInterfaceClass = usb_bInterfaceClass_f()

        -- Check if this is QMI-over-MBIM looking at the interface class that should be CDC
-       if getstring(usb_bInterfaceClass) == "2" then
+       if getstring(usb_bInterfaceClass) == "0x02" then
                is_mbim = true
                tvb_qmi_over_mbim_service_uuid = ByteArray.tvb(qmi_over_mbim_service_uuid, "qmi_over_mbim_service_uuid Tvb")
                len_tvb_qmi_over_mbim_service_uuid = tvb_qmi_over_mbim_service_uuid:len()
dnlplm commented 1 month ago

Hi @vheat,

thanks for reporting! In the next few days I'll try to take a look at this: with 3.4.7 it seems that I was not experiencing this issue, but I could very well remember badly.

I'll update this ticket once I have news.

dnlplm commented 1 month ago

Hi @vheat,

the linked PR seems to fix the issue on my side and works with Wireshark versions showing the two different behaviors.

Thanks!