I believe i've already correctly caculated that 2 bytes code and send back to pump, but still can't get expected msg from pump to show itself in `Normal` state, could you help to check?Yes, It is using Kermit crc16, Thank to Acuy for the tip. the calculation base from 6 digits from the source 00XXXX, use Kermit to get the result which is 2 Byte. XX, If they are 3 byte in the result, truncate the highest byte. (most likely a 1), after that, form the code send back to dispenser is 00 + XX + ASCII 31 20 20 20 (this 4 Bytes is not in the book, it is "1" + 3 Space Characters ), 00 is the command.
Example:
04405105 024051 3030 32463432 0360 1031 04 -> 3030 32463432
04404105 1030 024041 3030 4545 31202020 0313 1031 04 -> 3030 4545 31202020
04405105 024051 36303130 0315 1031 04 -> 36 30 31 30 =POWER ON = ASCII 60 10
this is the message flow i've got when the console get started and initially comm with the pump:
console send - 0x02 43 41 31 35 03 05 - actively ask for pump state
console send - 0x04 43 51 05 - Enq
pump send - 0x02 43 51 30 30 32 39 32 37 03 1F - ask for decode with content: 0x30 30 32 39 32 37
console send - 0x02 43 41 30 30 44 37 31 20 20 20 03 63 - decoded to 0x44 37, and appended a fixed 0x31 20 20 20 as you suggested.
console send - 0x04 - Eot
but, the above flow is looping, the pump is keep asking for decode and never entered into `Normal` state.
could you help? thank you so much!!!
