Converting floating-point MMS
Hello everyone,
in a MMS trace, I've got the analogs measures in a kind of a hexa format, how to convert to wireshark show as the sender is sending?
floating-point: 0843adb762
Hello everyone,
in a MMS trace, I've got the analogs measures in a kind of a hexa format, how to convert to wireshark show as the sender is sending?
floating-point: 0843adb762
Apparently MMS floating point values come in several flavours and only one of them is dissected as a float, others just show the hex bytes as displayed in your picture.
However, it looks as if that field does fit the requirements to be dissected as a float, i.e. the first byte is 0x08 and there are 4 other bytes, what version of Wireshark are you using?
Again if you can provide the capture, rather than an image, this can be looked at in more detail, i.e. using a debugger.
This looks indeed that the MMS dissector can be improved.
For now, a trick to show the float as a real number you can use Perl:
perl -e 'printf "%.12g\n", unpack "f", pack "L", 0x0843adb762'
347.432678223
Yes, the code for floating-point items needs to be redone.
Please file a bug about this on the Wireshark issues list, and attach an MMS network trace containing packets with floating-point data - not a picture of what Wireshark shows for that capture - to the bug.
The FloatingPoint Type described in IEC 9506-2 14.4.2.2. The first octet is exponent width part.
The representation of the subsequent octets is compatible with the single precision IEEE 754 floating-point representation when the number of subsequent octets is four and the value of the initial octet is eight. Compatibility with double precision IEEE 754 floating-point representation exists when the number of subsequent octets is eight, and the value of the initial octet is eleven.
To enter a block of code:
Comments
Which protocol is that and in which field of that protocol? Sharing a capture with the info would help enormously, post it on a public share and amend your question with a link to it.
Hello, sorry for not sharing a pic, I've edited my post, the protocol is MMS from IEC 61850. Thanks
What grahamb asked for was a network capture, not a picture.