In a nutshell: I've sniffed the data that goes from the controlling PC to the modem via RS232 serial port by building a little Y-adapter, now I want to figure out how to reverse engineer that data so that I can have full access to the device. My approach is to do one operation at a time and look for a pattern in the incoming data.
However, I have some problems with the code I received by using PySerial in Python. I hope you can help me. Here is an example for one single operation:
b'_S\xf0\xfb\x15\xf5_S\xf0S%\xc5_S\xf0\x1bY\xf7_S\xf0\xda\xd1\xf7_S\xf0_=\xf3' (marked as byte string by the 'b')
Or sorted as 'question' and 'answer': data sent by DTE (left) and DCE (right)
DTE (PC) DCE (modem) _S\xf0 \xfb\x15\xf5 _S\xf0 S%\xc5 _S\xf0 \x1bY\xf7 _S\xf0 \xda\xd1\xf7 _S\xf0 _=\xf3
As you can see some of it is hexadecimal code (marked by the '/x')- some of it is not. I tried to understand it for quite some time now, but I'm still not sure if this is really the raw code or Python has to convert some of it to ASCII on order to be able to show it to me (like the '_S' letters).
I need to know this because as a next step I want my Python script to act as the new controlling PC. For this I want to use the
serial.write-command of PySerial. It seems that it doesn't work to just send the string I received. Maybe I made some other mistake but my question remains: is this the raw code the device sends and receives? Or do I have to convert it some other way?
Thanks in advance. Tobi