SmartToFCli instructions¶
Overview¶
The dmcam-cli tool in the SDK is convenient for users to diagnose and test during secondary development. The tool covers almost all the API support of the dmcam library. You can use the dmcam-cli tool to make batch scripts and design your own scenarios. Get the corresponding data. Including the following functions:
View a list of available devices
Obtaining device information
Destination register configuration
Read and set common parameters
Acquisition and storage of different types of image data
Device reset
Device firmware update
Operating mode¶
dmcam-cli can interact with hardware devices through the command line. Generally, it is used in the following three ways:
Command line parameter mode:See below for specific parameter definitions Detailed command
Script file mode: refer to ‘-s, –script <file>’ option in Detailed command
Interactive mode:refer to ‘-i, –interactive’ option in Detailed command
The following figure is a reference screenshot of the command line parameter mode and interactive mode.
Tip
Under windows, double-click to run dmcam-cli.exe directly, and enter interactive mode by default.
Detailed command¶
The following table lists all dmcam commands and parameters, and shows the basic usage of the sample. For more detailed instructions, you can enter –help and –help-interactive parameters to view.
Script mode functions |
options |
appended options |
example |
---|---|---|---|
Designated device |
|
|
|
set verbosity |
|
|
|
Enumerating devices |
|
|
|
Reset device |
|
|
|
Interactive mode command, supports multiple executions. |
|
|
|
Run provided script |
|
|
|
Enter interactive mode |
|
|
|
print cli version |
|
|
|
print cli help info |
|
|
|
show interactive mode help info |
|
|
|
Firmware upgrade |
|
|
|
Write register |
|
|
|
Read register |
|
|
|
Set parameter |
|
|
|
Get parameter |
|
|
|
The following is the interactive mode |
|||
View command help information |
|
|
|
Device List |
|
||
Firmware upgrade |
|
|
|
Write register |
|
|
|
Read register |
|
|
|
Set parameter |
|
|
|
Get parameter |
|
|
|
Collect a fixed number of frames data to a file |
|
|
|
Collect a fixed amount of data into the buffer |
|
|
|
The same as print info |
|
|
|
Display all version information |
|
|
|
Collect data at specified time and distance |
|
|
|
Filter parameter configuration |
|
|
|
Reset command |
|
|
|
others |
|
Caution
For the TC series modules, the read and write operations of the registers are cautious. Misreading and writing may cause unpredictable problems.
View a list of available device information¶
After the device is connected, you can use the dmcam-cli -l command to view the list of available devices. The command is as follows:
dmcam-cli -l
The output is as follows:
4 dmcam device found
[0]: Type=USB BUS:PORT:ADDR=07:04:03
[1]: Type=USB BUS:PORT:ADDR=07:03:04
[2]: Type=ETH IP=192.168.1.38 CID=0xfbf056c1
[3]: Type=ETH IP=192.168.1.53 CID=0xf2a4fa3e
Obtaining hardware device information¶
After the device is connected, you can use the print command of the dmcam-cli interactive mode to obtain hardware device information. The command format is as follows:
p [parameter]
Common parameter settings¶
After the device is connected, you can set the hardware parameters through the set command of the dmcam-cli interactive mode. The command format is as follows:
set <parameter> <arguments>
You can use the following command to view which parameters can be set and their meanings. The command is as follows. The result is shown in the figure below.:
help set
Acquisition and storage of different types of image data¶
After the device is connected, you can use the dmcam-cli interactive mode rx command to collect data and save the data into the specified file. The collected data format includes raw data, depth data, grayscale data, and point cloud data. The command format is as follows:
rx <data src> <&file> <frame count>
Save or print the pixel distance information of the specified area¶
After the device is connected, you can use the capture command of the dmcam-cli interactive mode to collect data and save the data into a specified file or print it out. The format of the collected data includes temperature, distance, amplitude, and the command format is as follows. See help cap :::
cap -s 10 -p 119,159,120,160 -c start
Device reset¶
After the device is connected, you can reset it using the reset command of the dmcam-cli interactive mode. The command format is as follows:
reset <target>
The test results are shown below:
Firmware upgrade¶
Reference for detailed firmwareupgrade