4 responses, Responses – DVDO VP50 PRO User Manual
Page 24
1.4 Responses
Responses (aka “feedback”) is arguably what really make RS-232 a powerful
interface. As opposed to infrared control, the RS-232 port allows for bi-directional
communication, so that the controlling device can get information from the controlled
unit to make decisions based on the actual state of the unit. Response packets are about
the same as Command or Query packets – with some minor differences is the data they
contain.
First, there are only three types of response the iScan can give (and remember that the
iScan will not just start transmitting data without first being “asked” to do something).
• Acknowledge – This means the control you just sent was accepted and valid
• Query Response – the value for the control you would have just asked about
• Error Response – Something went wrong, this packet you what
Just like “Commands” and “Queries” have two bytes signifying those
communications, these response packets each have their own:
• Command = “3” and “0” or 0x33 and 0x30 in HEX notation
• Query = “2” and “0” or 0x32 and 0x30 in HEX notation
• Acknowledge Response = “0” and “1” or 0x30 and 0x31 in HEX notation
• Query Response = “2” and “1” or 0x32 and 0x31 in HEX notation
• Error Response = “0” and “2” or 0x30 and 0x32 in HEX notation
For acknowledge, you will only ever see one packet:
“Attention this is an acknowledge which is this long the data was accepted >>pause<<
the packet was a command >>pause<< [checksum – always included in replies] I’m
done talking”
We won’t spend a great deal of time on the “acknowledge” except replacing the
known items above with the values:
“0x02 0x30 0x31 0x30 0x35 0x31 0x00 0x33 0x30 0x00 0x35 0x43 0x03”
Since you will only ever get an “Acknowledge” packet for a “command”, this is the
only variant you should ever expect (using these exact above values). However should
something go wrong, you will get an error reply:
“Attention this is an Error which is this long this is the Error >>pause<< [checksum –
always included in replies] I’m done talking”
Replacing the items which should be starting to get familiar, we get:
“0x02 0x30 0x32 [count byte 1 0x30] [count byte 2 – either 0x32 or 0x33] [error byte n
(there may be up to two bytes based on the error)] 0x00 [checksum – always included in
replies] 0x03”
The values you may get in an error reply are on the next page.
24