Reverse Engineering Serial Protocol
Reverse Engineering Serial Protocol
Richard Msiska Thompson Rivers University Supervisors: Kevin ONeil, Sharon Brewer, and Bruno Cinel
Outline
What? Why? How? What did I find?
Goal of project
Discover commands for initializing the instrument, performing a Lab and shutting down the TOC analyzer. Send and receive those commands using a C++ interface. Create a simplified web interface that allows remote connection to the TOC Analyzer.
The Instrument
The Total Organic Carbon/Total Nitrogen (TOC/TN) Analyzer analyses for the Organic Carbon or Nitrogen present in a water sample. The TN value is used to infer water quality, the higher it is the poorer the quality of the water.
Software Implementation
A standard C++ Library was used for serial port communication. The interface contains a lot of timing issues. Development methodology used was Agile.
System Parameters
System Parameters
Header A503FC000100 Payload Checksum A503FC000100A523DC0 50 1041B000000000000D000 1 00 00 00 150000000B000000030000 00 29 00 00 00
0B determines the Hours when this was sent. 03 determines minute when this was sent. 29 determines seconds when this was sent. 50 is the checksum A hexadecimal conversion tells us this command was sent at 11:03:49
Difficulties
Determining correct serial port timings as software works in milliseconds. Determining correct serial port configuration. Decoding a serial port protocol simply by observing bytes. Black Box Reverse Engineering.
Overall
Working towards an interface that will allow labs to be performed remotely. Next step is finding out more information about the protocol.
Acknowledgements
Kevin O'Neil for proposing the idea, helping me when I got stuck. Sharon Brewer and Bruno Cinel for being great clients and helping me with the equipment needs. Questions? Send me an email at [email protected]