Commands are specified as two digit hexadecimal characters in the format <command> <subcommand> <data>
.
The subcommand and data fields are optional depending on the command. You should not specify the leading
FE FE or the trailing FD. It is OK to prepend each byte with a leading '0x', but it is not necessary. Spaces
are optional, but can be used for readability. If the '#' character is present, anything after it is treated as a comment.
Send-CIVCommand is able to use commands from multiple sources. It can use commands that you specify on the command line using the -c option, commands
saved in a macro file using the -f option, or commands piped in from a command that generates CI-V commands.
Here are a few examples:
CI-V commands specified on the command line using the -c option
Single command to set frequency to 14.175 MHz
Send-CIVCommand -p COM1 -a 0x94 -c "05 00 50 17 14 00"
Multiple commands to set frequency to 14.175 MHz and operating mode to USB with filter 1
Send-CIVCommand -p COM1 -a 0x94 -c "05 00 50 17 14 00" "06 01 01"
CI-V commands read from a file.
The file can be created using either CI-V Scout or a text editor such as Notepad.
Send-CIVCommand -p COM1 -a 0x94 -f path\to\some\file.txt
CI-V commands read from a pipeline
Pipe in commands from any program that outputs CI-V commands as text
YourCIVCommandGenerator | Send-CIVCommand -p COM1 -a 0x94
CI-V command sources can be combined. For example, commands can be specified on the command line and also read from a file. When more than one source is specified,
the order that Send-CIVCommand looks for commands are:
- Command line parameters using the -c option
- A text file using the -f option
- Piped in commands
Here are all of the command line options for Send-CIVCommand
Description:
Send CI-V command(s) to a compatible device. There are options to suppress console output, and to set communication
parameters. Commands to be sent can be specified on the command line, read from a file, or piped in from another
command.
Usage:
Send-CIVCommand [options]
Options:
-p, --port <COM10|COM5|COM7|COM8|COM9> (REQUIRED) The COM port connected to the CI-V device.
-a, --destinationaddress <destinationaddress> (REQUIRED) The address of the CI-V device to communicate with.
-c, --commands <commands> A list of CI-V commands specified as a hexadecimal string.
-f, --file <FILEPATH> Path to a file that contains CI-V commands, one per line. []
-b, --baud <115200|19200|38400|4800|57600|9600> COM port baud rate setting. [default: 115200]
--databits <databits> COM port data bits setting. Must be an integer >= 5 and <=
8. [default: 8]
--parity <Even|Mark|None|Odd|Space> COM port parity setting. [default: None]
--stopbits <None|One|OnePointFive|Two> COM port stop bits setting. [default: One]
--handshake COM port handshake setting. [default: None]
<None|RequestToSend|RequestToSendXOnXOff|XOnXOff>
--RTS COM port RTS setting. [default: False]
--DTR COM port DTR setting. [default: False]
-t, --timeout <timeout> Command timeout period in milliseconds. [default: 500]
-q, --quiet Don't display normal output to the console. Error messages
will still be displayed. [default: False]
-d, --debug <Debug|Information|None|Verbose|Warning> Turn on debug logging. Order of severity is None, Warning,
Information, Debug, Verbose. [default: None]
--version Show version information
-?, -h, --help Show help and usage information