Downloading¶
A useful file management feature that gives the ability to download a file from the instrument. The download command can be used to download a file identified by either a file name and type, or a full file path.
Caution
File downloads over serial (especially Bluetooth) are rather slow, and greatly affected by the communication speed settings.
Requirements¶
GeoCOM capable instrument
Process¶
The download process is carried out by exchanging chunks of data. The individual chunks are sent down by the instrument, and slowly reassambled on the receiving side. The block size can be customized, but the maximum is 450 hex characters/block (or 225 bytes). Newer instruments support large file downloads, where the block size can be increased up to 1800 characters/block.
Under normal circumstances it is recommended to use the maximum chunk size, as this results in the fastest transfer. If the connection is not completely reliable, decreasing the chunk size might reduce the size of data, that needs to be resent due to timed out exchanges.
Examples¶
iman download file -f database COM1 job.xcf job.xcf
// or
iman download file COM1 DBX/job.xcf job.xcf
iman list files -d cf COM1 Data/coordinates.txt coordinates.txt
Usage¶
iman download file¶
Download a file from the instrument.
Any format can be transferred. The file is downloaded in chunks of hex encoded binary data. The speed is strongly dependent on the connection baud and chunk size. Use the highest baud supported by the instrument, and the largest chunk size for the fastest download.
This command requires a GeoCOM capable instrument, that supports file operations (TPS1200 and later).
iman download file [OPTIONS] PORT FILENAME OUTPUT
Options
- -b, --baud <baud>¶
Serial speed
- Options:¶
1200 | 2400 | 4800 | 9600 | 19200 | 38400 | 56000 | 57600 | 115200 | 230400 | 921600
- -t, --timeout <timeout>¶
Serial timeout
- -a, --attempts <attempts>¶
Number of connection attempts
- --sync-after-timeout¶
Attempt to synchronize message que after a timeout
- -f, --filetype <filetype>¶
File type (full file path is required if this option is not set)
- Options:¶
image | database | overview-jpg | overview-bmp | telescope-jpg | telescope-bmp | scan | unknown | last
- -c, --chunk <chunk>¶
Chunk size (max. 225 for normal and 900 for large download mode)
- --large¶
Use large download commands (only available from VivaTPS)
Arguments
- PORT¶
Required argument
Serial port that the instrument is connected to (must be a valid identifier like COM1 or /dev/usbtty0)
- FILENAME¶
Required argument
File to download (including path with ‘/’ separators if filetype option is not specified)
- OUTPUT¶
Required argument
File to save downloaded data to