
RMV-71 Operations
Copyright illunis LLC, 5/19/2014
Page 30
3.2: Software ICD
Command Packets
Protocol
The camera is controlled through command packets. The camera is considered a slave device and never generates
data without a read request. The data packet formatting is described in detail below –
note
That the checksum is calculated
only on the 4 ascii characters comprising the Data.
Data Packets
Data packets are of either ‘read’ or ‘write’ types. For example to read the camera serial number, the packet sent to
the camera would be {r07000002fe} to which the camera would respond by issuing an acknowledge character ! followed by the
response {r0700sssscc}, where ssss is the camera serial number and cc is the checksum calculated in hex as 0x0100 – ( ss
(high byte hex) + ss (low byte).
1 Char
2 Char
2 Char
2 Char
4 Char
2 Char
1 Char
1 Char
Start
Command
Target
Index
Data
Checksum
End
Ack/Nack
Packet Format
Start:
Indicates the Start of the frame
Size = 1 ascii character
Value = 123 Decimal (ascii { )
Command:
Command descriptor
Size = 1 ascii character
Value = 114 Decimal (ascii r ) for Read
Value = 119 Decimal (ascii w ) for Write
Target:
Command descriptor
Size = 2 ascii characters
Index:
Command descriptor
Size = 2 ascii characters
Data:
The data transferred
Size = 4 ascii characters
Checksum of Data only (default)
Size = 2 ascii characters - Intel-Standard - two’s
compliment of sum of data.
Example1: Data = 2002, checksum = lower byte of
(0x100 – (0x20 + 0x02)) = 0xde
Example2: Data = 0000, checksum = lower byte of
(0x100 – (0x00 + 0x00)) = 0x00
Example3: Data = fef0, checksum = lower byte of
(0x100 – (0xfe + 0xf0)) = 0x12
Checksum of Command and Data:
checksum( comandindex ) + checksum( data)
Example4: Command = 0400, data = 0x0001
(0x100 – (0x04 + 0x00)) = 0xFC
(0x100—(0x00 + 0x01)) = 0xFF
Checksum = lower byte of 0xFC + 0xFF => 0xFB
End
Indicates the End of the frame
Size = 1 ascii character
Value = 125 Decimal (ascii } )
Ack/Nack
Positive acknowledge - Negative acknowledge
Size = 1 ascii character
Ack Value = 33 Decimal (ascii ! )
Nack Value = 63 Decimal (ascii ? )
COMMAND DESCRIPTIONS
Read Command Structure
The camera parses the sequence byte by byte. An invalid read
command, target or index will cause the camera to issue an
NACK. The Host (You) will generate dummy data with a valid
checksum then an end. The camera will respond with an ACK
and re send the command with valid data and checksum. If the
Host detects an error, it will re issue the command.
Host {r tt ii 0 0 0 0 cc}, camera issues !
Camera issues {r tt ii data data data data cc} (NOTE no ACK)
Write Command Structure
The camera parses the sequence byte by byte. An invalid
write command, target, index or checksum will cause the cam-
era to issue a NACK, otherwise the write sequence will com-
plete and the camera will issue an ACK after the command has
been executed. The camera receives the checksum from the
Host.
Host {w tt ii data data data data cc} camera issues !
Error Checking
The camera parser is character by character and will respond
with an immediate NACK if any unrecognised command, tar-
get, index or checksum occurs.
Communication Timeouts
The camera micro controller uses a hardware watchdog timer
that will time out if the time between bytes are longer than ???
ms. When sending command frames to the camera the host
must not have significant delays between bytes sent.
All manuals and user guides at all-guides.com