Ask Your Question
0

Converting floating-point MMS

asked 2021-10-06 15:24:27 +0000

Zebacking gravatar image

updated 2021-10-06 16:26:44 +0000

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

image description

edit retag flag offensive close merge delete

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.

grahamb gravatar imagegrahamb ( 2021-10-06 15:29:12 +0000 )edit

Hello, sorry for not sharing a pic, I've edited my post, the protocol is MMS from IEC 61850. Thanks

Zebacking gravatar imageZebacking ( 2021-10-06 16:27:23 +0000 )edit

What grahamb asked for was a network capture, not a picture.

Guy Harris gravatar imageGuy Harris ( 2023-10-13 20:50:39 +0000 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2023-10-12 02:30:04 +0000

ttonway gravatar image

updated 2023-10-12 02:30:38 +0000

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.

edit flag offensive delete link more
0

answered 2021-10-07 08:31:05 +0000

grahamb gravatar image

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.

edit flag offensive delete link more

Comments

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
André gravatar imageAndré ( 2023-10-12 18:13:58 +0000 )edit

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.

Guy Harris gravatar imageGuy Harris ( 2023-10-13 20:50:00 +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

1 follower

Stats

Asked: 2021-10-06 15:24:27 +0000

Seen: 687 times

Last updated: Oct 12 '23

Related questions