?
Solved

Decode floating point values from binary packets

Posted on 2012-09-15
6
Medium Priority
?
916 Views
Last Modified: 2013-11-29
I need to reverse engineer how propritory protocol encodes floating point numbers.

What are the different ways in which floating point values can be encoded in binary? Request to provide source code for encoding/Decoding floating point number.

in C# I know it is, BitConverter.GetBytes(float number)

Any other ways?
0
Comment
Question by:coolprg
  • 3
  • 2
6 Comments
 
LVL 84

Assisted Solution

by:Dave Baldwin
Dave Baldwin earned 1000 total points
ID: 38402216
There are multiple sizes of  IEEE 754 (aka. IEC 60559) floating point numbers.  And there are other proprietary standards.  You may need more info about the protocol you're trying to decode.

http://en.wikipedia.org/wiki/Floating_point
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 38402584
What is the purpose of your research?
 Indeed there is not too much secrets about this, but it is rare a case where you need to know the details.
0
 

Author Comment

by:coolprg
ID: 38402610
Here is the actual message packet:

B1|B2|B3|B4|B5|B6|B7|B8 |B9 |B10 |B11|B12|B13|B14|B15|B16|B17|B18|B19|B20|B21|B22|B23|B24
-----------------------------------------------------------------------------------------
04|ff|00|31|04|01|e0|b2 |b8 |ff  |80 |3d |19 |0b |28 |0f |51 |42 |19 |73 |01 |42 |57 |b8

Open in new window


Byte 1 and Byte 2(B1, B2): Message header
Byte 3 and byte 4(B3,B4): Message type
B5 to B22: Message Data
B23 and B24: Message CRC

In above message, in message data portion(B5 to B22) below values are encoded. I need to determine what bytes and at what positions have these values by what algorithm

Value1: 52.264801
Value2: 32.362400
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 1000 total points
ID: 38402616
Value1 is 42 51 0f 28 (B13 to B16), but is stored in reverse order
Value2 is 42 01 73 19 (B17 to B20) in similar fashion
They are encoded as standard IEEE 754
0
 

Author Comment

by:coolprg
ID: 38402640
jaime,

super quick and to the point, thanks a lot. Is there any strategy you would like me to suggest to crack similar values in future or tools you have used?
0
 
LVL 55

Expert Comment

by:Jaime Olivares
ID: 38402642
you can use any online tool like:
http://www.binaryconvert.com
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We recently endured a series of broadcast storms that caused our ISP to shut us down for brief periods of time. After going through a multitude of tests, we determined that the issue was related to Intel NIC drivers on some new HP desktop computers …
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Suggested Courses
Course of the Month15 days, 8 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question