THIS IS A TEST INSTANCE. Feel free to ask and answer questions, but take care to avoid triggering too many notifications.
0

Converting floating-point MMS

  • retag add tags

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

Zebacking's avatar
1
Zebacking
asked 2021-10-06 15:24:27 +0000, updated 2021-10-06 16:26:44 +0000
edit flag offensive 0 remove flag 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's avatar grahamb (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's avatar Zebacking (2021-10-06 16:27:23 +0000) edit

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

Guy Harris's avatar Guy Harris (2023-10-13 20:50:39 +0000) edit
add a comment see more comments

2 Answers

0

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.

grahamb's avatar
23.8k
grahamb
answered 2021-10-07 08:31:05 +0000
edit flag offensive 0 remove flag delete link

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é's avatar André (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's avatar Guy Harris (2023-10-13 20:50:00 +0000) edit
add a comment see more comments
0

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.

ttonway's avatar
1
ttonway
answered 2023-10-12 02:30:04 +0000, updated 2023-10-12 02:30:38 +0000
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss.

Add Answer