c# - Binary to Ascii and back again -


I am trying to interface with a hardware device through a serial port. When I use software like Portmon to view messages, they look like this:

  42 21 21 21 21 41 45 21 26 21 29 21 26 59 5 F 41 30 21 2 B 21 27 42 21 21 21 21 41 47 21 27 21 28 21 27 59 5 D 41 32 21 2 A 21 28 When I made them to an asxi converter a hex Goes through the medium, does not mean the commands. Are these messages really different from hex? I expected that the machine is passing to see the message and they have to use C #. What can I do to know the messages? 

Does the hardware device specify a protocol? Just because it is a serial port connection does not mean that it should be ASCII / readable English text. It can also be a sequence of bytes, where instance 42 is a command and 21212121 is the data of that command. An initial sequence or whatever can be.

At the end of the day, whatever you do is a series of bytes. One of them can be found in protocol specificity or if you do not have one, you need to see each order manually. Issue an order on the device, capture the input, issue another command.

See Common Managing for Patterns? What can be the order? What data is passed?

Yes, this is tedious, but reverse engineering is rarely easy.

ASCII is for hex:

B !!!! AE! And!)! And Wi_A 0! +! 'B! AG! '! (! 'Y') A2! *! (

It looks like some type of protocol, some initial sequences (B !!!!) and commands (AE and AG), but this is just guessing.


Comments