Reverse Engineering Serial Protocol Project
Reverse Engineering Serial Protocol Project
Reverse Engineering Serial Protocol Project
Richard Msiska Thompson Rivers University Supervisors: Kevin ONeil, Sharon Brewer, and Bruno Cinel
Outline
Term Objectives and Analysis Current progress Future progress
Term Objectives
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.(if Time Permits)
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.
Objectives Completed
Completed Analysis of the Perform Lab use case Completed Analysis of the Shutdown Commands Use case. Partial Analysis of start up commands.
Current Configuration
Perform Lab and Shutdown
Initialization
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
Shutdown Protocol
A5 0F F0 07 04 51 00 00 00 00 00 00 00 01 00 00 00 5C A5 03 FC 00 01 00 (Command to initiate shutdown)
A5 03 FC 0001 00 + Payload(Good)
A503FC000200 (Bad)
Future Prospects
Updated configuration Finalize Serial Port Commands and Communication Create Local Interface Create Web Interface Network Security Assessment New chair to sit on.
Toc Analyzer Lab Results and protocol feedback File containing sample information
LAB REQUEST
LAB RESULTS
Remaining Analysis
Completing start up commands Starting and completing Lab Results analysis
Network Assessment
To verify that the network that instrument on is secure.
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.
Questions?
Demonstration
Head to the Science Lab room 237