title: Reverse engineer serial data packet
body: <p>i have a device connected to PC vie serial port (rs-232).
  That device send data after receiving command from serial port, i sniffed data flows throught port and almost completely found out packet structure, but at least two important fields i cant determine.</p>
  
  <p>First example packet (in hex) - 2 payload packets inside:</p>
  
  <pre><code>0baa00000200039540330137732904020033000005534d6c07a567a73e15040701125600043853048a5c085500000000e940406f00039540330058388900020033000005534d6c07b501b4f01504070113020004fd1d040342155500000000e940406f0002009d0a03004a3030313733353530303830343630303830373131313030323415040701210801001035390000000000000000d3a7226c287472874b2a216a000000000000000000ab04
  </code></pre>
  
  <p>Second example packet (in hex) - 6 payload packets inside:</p>
  
  <pre><code>0b6601000600039540330137732904020033000005534d6c07a567a73e15040701125600043853048a5c085500000000e940406f00039540330058388900020033000005534d6c07b501b4f01504070113020004fd1d040342155500000000e940406f00039540330137732904020033000005534d6c07a567a73e15040702174901043853048a5c085500000000e940406f00039540330058388900020033000005534d6c07b501b4f01504070218010104fd1d040342155500000000e940406f00039540330137732904020033000005534d6c07a567a73e15040703301002043853048a5c085500000000e940406f00039540330058388900020033000005534d6c07b501b4f01504070331280204fd1d040342155500000000e940406f000600a10a03004a303031373335353030383034363030383037313131303032341504071152520100103539000000000000000094b5d2c94a11672acaa0abec0000000000000000006a85
  </code></pre>
  
  <p>Packet structure that i determined (first packet as example):
  <img src="https://i.stack.imgur.com/svAOA.jpg" alt="Packet structure"></p>
  
  <p>Fileds marked as ??? - i dont know what is it and need to guess.
  Payload data packets may be vary count.
  If i edit any byte from inside packets and recalculate last CRC16, programm will accept packet, but with message that its corrupted. If i edit any byte without CRC16 recalculation, program will reject that packet.</p>
  
  <p>What i need from that? For example, i need to edit - add or delete some inside payload data packets.</p>
  
  <p>I will be very appreciate for any help.</p>
  
  <p><strong>UPDATE 1</strong></p>
  
  <p>Two same packets with different request time field:</p>
  
  <pre><code>0b6601000600039540330137732904020033000005534d6c07a567a73e15040701125600043853048a5c085500000000e940406f00039540330058388900020033000005534d6c07b501b4f01504070113020004fd1d040342155500000000e940406f00039540330137732904020033000005534d6c07a567a73e15040702174901043853048a5c085500000000e940406f00039540330058388900020033000005534d6c07b501b4f01504070218010104fd1d040342155500000000e940406f00039540330137732904020033000005534d6c07a567a73e15040703301002043853048a5c085500000000e940406f00039540330058388900020033000005534d6c07b501b4f01504070331280204fd1d040342155500000000e940406f000600a10a03004a303031373335353030383034363030383037313131303032341504081008320100103539000000000000000021c3e1c0e04d909a7cf512b20000000000000000008b61
  
  0b6601000600039540330137732904020033000005534d6c07a567a73e15040701125600043853048a5c085500000000e940406f00039540330058388900020033000005534d6c07b501b4f01504070113020004fd1d040342155500000000e940406f00039540330137732904020033000005534d6c07a567a73e15040702174901043853048a5c085500000000e940406f00039540330058388900020033000005534d6c07b501b4f01504070218010104fd1d040342155500000000e940406f00039540330137732904020033000005534d6c07a567a73e15040703301002043853048a5c085500000000e940406f00039540330058388900020033000005534d6c07b501b4f01504070331280204fd1d040342155500000000e940406f000600a10a03004a303031373335353030383034363030383037313131303032341504071152520100103539000000000000000094b5d2c94a11672acaa0abec0000000000000000006a85
  </code></pre>