Jump to content

DSM Communication Protocol: Difference between revisions

No edit summary
 
(8 intermediate revisions by 4 users not shown)
Line 6: Line 6:
Together with the communication protocol, this server side source code can be downloaded and implemented upon personal servers for the ease of use and configuration, please see index.js, debug.js and protocol.js which can be copied into the server.  
Together with the communication protocol, this server side source code can be downloaded and implemented upon personal servers for the ease of use and configuration, please see index.js, debug.js and protocol.js which can be copied into the server.  


Server files & source code can be downloaded [hhttps://drive.teltonika.lt/f/e2a91c1a5f714123a544/?dl=1 here].
Server files & source code can be downloaded here:
* [[Media:Camera Server files for Video Solutions.zip|Camera Server files]]
 


Please see index.js, debug.js and protocol.js files. These files contain required support for camera downloads and they can be inserted straight into server. The folder can also be run as server and will work with file downloads, so if personal server is not available, there is always a possibility to use this default server.  
Please see index.js, debug.js and protocol.js files. These files contain required support for camera downloads and they can be inserted straight into server. The folder can also be run as server and will work with file downloads, so if personal server is not available, there is always a possibility to use this default server.  
Line 340: Line 342:
|'''Command ID (2 bytes)'''
|'''Command ID (2 bytes)'''
|'''Data length (2 bytes)'''
|'''Data length (2 bytes)'''
|'''Packet offset (4 bytes)'''
|'''Packet offset (in bytes) (4 bytes)'''
|-
|-
|0x0002
|0x0002
Line 346: Line 348:
|0x00000000
|0x00000000
|}
|}
To begin file transfer from the start, offset should be set to 0 (4 bytes value). In case when the file transfer was interrupted, to resume file transfer, offset can be set to the desired value (1 ≤ <offset> ≤ <file_packets>).
To begin file transfer from the start, offset should be set to 0 (4 bytes value). In case when the file transfer was interrupted, to resume file transfer, offset can be set to the desired value (1 ≤ <offset (in bytes)> ≤ <file_packets>).


=== Synchronize file transfer command (CMD_ID 0x0003) ===
=== Synchronize file transfer command (CMD_ID 0x0003) ===