1
1
5
5
.
.
2
2
R
R
e
e
m
m
o
o
t
t
e
e
C
C
o
o
n
n
t
t
r
r
o
o
l
l
P
P
r
r
o
o
t
t
o
o
c
c
o
o
l
l
A computer can be used to control the DVR by sending the packet as follows.
=========================================================
485/232 Control Code Protocol
=========================================================
1-1. Sample control code packets
Example1: A packet that send "REC" key to EDR(ID=5)
0x85 (length)
0x00 (Receiver ID high byte)
0x05 (Receiver ID low byte)
0x4B (OPcode = key)
0x08 (DATA1 = "Rec" keycode)
0x5D (checksum)
Example2: A packet that send "PAUSE" key to EDR(ID=4999)
0x85 (length)
0x27 (Receiver ID high byte)
0x07 (Receiver ID low byte)
0x4B (OPcode = key )
0x0C (DATA1 = "Pause" keycode )
0x0A (checksum)
Example3: A packet that send "PLAY" key to all EDR(broadcast)
0x85 (length)
0x7f (Receiver ID high byte)
0x7f (Receiver ID low byte)
0x4B (OPcode = key )
0x0B (DATA1 = "Play" keycode )
0x59 (checksum)
2-1. The format of message packet is as follows:
Length Byte (Prefix: 0x86, 0x87, or 0x88 ..... )
Receiver ID high byte
Receiver ID low byte
Opcode Byte
Data Byte1
Data Byte2
Data Byte3
.
.
Checksum Byte
2-2. Length Byte
This Length Byte is also a prefix. Bit7 must be 1.
EX: 0x87 ==> this packet has 7 bytes length. (not included Length byte itself)
2-3. Receiver ID
1). Individual receiver ID
----------------------------------------------------------
Decimal 14bit binary value Hbyte Lbyte Receiver ID
------- ------------------- ------ ----- -----------
0 0000000 0000000 00 00 ID = 0
1 0000000 0000001 00 01 ID = 1
2 0000000 0000010 00 02 ID = 2
....
126 0000000 1111110 00 7e ID = 126
127 0000000 1111111 00 7f ID = 127