DVR communication
ShadowUA
Junior Member
in AMX Hardware
Hello all,
I need some help with commucations protocol DVR Infinity NDR-X5416P.
I have a litle information about protocol.
This is message format.
<BOM><ID>:<Class>:<Code>[:Operands]:<Checksum>[EOM]
Where
Symbol Value Description
: Field delimiter
<BOM> @ Beginning of message (for command)
< Beginning of message (for reply)
<ID> 00~99 Device ID
<Class> DR Device Class (?DR? for DVR systems)
<Code> AA~zz Op-code (see below)
<Operands> Optional operands defined for each operation
<Checksum> 00~99 Checksum (sum of ASCII codes before checksum discarding overflow)
[EOM] ^J^M End of message (optional: only for convenience of users using general terminal)
I am wrote function to get checksum:
Define_Function Char[256] GetFullPacket (Char Packet[])
{
local_var volatile Char ChkSum;
local_var volatile Integer i;
ChkSum = 0;
For (i = 1; i <= Length_String(Packet); i++)
ChkSum = ChkSum + Packet;
ChkSum = ChkSum + $3A; // $3A = ASCII code of ":" sing
ChkSum = ChkSum % 100;
return "Packet, ':', Format('%02d', ChkSum)";
}
When com port online :
Send_Command Data.Device, 'SET BAUD 9600,N,8,1';
SEND_STRING DATA.DEVICE, GetFullPacket("'@00: DR:vs'");
In protocol says "Checksum -sum of ASCII codes before checksum discarding overflow".
This Function is correct?
And another question - the DVR have 1 RS 485 and 1 RS 232. I tryed them - dont work.
Where is mistake?
I need some help with commucations protocol DVR Infinity NDR-X5416P.
I have a litle information about protocol.
This is message format.
<BOM><ID>:<Class>:<Code>[:Operands]:<Checksum>[EOM]
Where
Symbol Value Description
: Field delimiter
<BOM> @ Beginning of message (for command)
< Beginning of message (for reply)
<ID> 00~99 Device ID
<Class> DR Device Class (?DR? for DVR systems)
<Code> AA~zz Op-code (see below)
<Operands> Optional operands defined for each operation
<Checksum> 00~99 Checksum (sum of ASCII codes before checksum discarding overflow)
[EOM] ^J^M End of message (optional: only for convenience of users using general terminal)
I am wrote function to get checksum:
Define_Function Char[256] GetFullPacket (Char Packet[])
{
local_var volatile Char ChkSum;
local_var volatile Integer i;
ChkSum = 0;
For (i = 1; i <= Length_String(Packet); i++)
ChkSum = ChkSum + Packet;
ChkSum = ChkSum + $3A; // $3A = ASCII code of ":" sing
ChkSum = ChkSum % 100;
return "Packet, ':', Format('%02d', ChkSum)";
}
When com port online :
Send_Command Data.Device, 'SET BAUD 9600,N,8,1';
SEND_STRING DATA.DEVICE, GetFullPacket("'@00: DR:vs'");
In protocol says "Checksum -sum of ASCII codes before checksum discarding overflow".
This Function is correct?
And another question - the DVR have 1 RS 485 and 1 RS 232. I tryed them - dont work.
Where is mistake?
Comments
-
The function looks like it should work, can you pass us the manual?
-
-
And part two...
And here is analog of this DVR with analog protocol.
http://www.commandsys.com.au/dealers/downloads/LIBRARY/DEVICES/DVR/Pacom/PDR4L/DVR-protocolVer1_5_SDR40.doc -
I found the problem.
Problem is in the cable. Need to use nullmodem cable RS232 DB9m-DB9m, rs485 - dont work.
Leave a Comment
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums