Commands 37
© 2017 Nortek AS
5.29 DOWNLOAD
This command enables reading a file at the instrument recorder.
Start address (offset) of the first byte to be returned.
Number of bytes to be downloaded.
Use Cyclic redundancy check.
CRC=1 enables crc.
Use Checksum.
CKS=1 enables checksum.
If no other parameters than the file name are sent with the DOWNLOAD command the complete
file is directly returned, without the number of bytes to follow. The end of the file can then be
detected by parsing the OK<CR><LF>.
The parameters can be used to download the file in several pieces. The number of bytes to follow
will then be returned in ASCII format and terminated with <CR><LF> before the data is output.
The end of file stream is terminated with OK<CR><LF>. A cyclic redundancy check or a checksum
will then be added to be able to verify data integrity during download. The complete file can also
be downloaded in this way by specifying SA=0 and a large value for LEN. The actual file size is then
returned before the data follows.
Example:
DOWNLOAD,FN=”TestFile.ad2cp”,SA=0,LEN=4096,CRC=1,CKS=0<CR><LF>
4096<CR><LF>
<binary or ASCII data>
23432<CR><LF> (CRC value)
OK<CR><LF>