openxc-control options and arguments

openxc-control is a command-line tool that can send control messages to an attached vehicle interface.

Basic use

openxc-control provides three control commands:

version

Print the current firmware version and vehicle platform of the attached CAN translator:

$ openxc-control version

Note

The version command is not supported by the trace file interface.

reset

Reset and re-initialize the attached vehicle interface.

$ openxc-control reset

Note

The reset command is not supported by the trace file interface.

write

Send a request to the vehicle interface to write a message back to the CAN bus. The --name and --value options are required when using this command.

$ openxc-control write --name turn_signal_status --value left

Note

The write command is not supported by the trace file interface.

Note

The vehicle interface must be running firmware that supports CAN writes, and must allow writing the specific message that you request with openxc-control.

Command-line options

A quick overview of all possible command line options can be found via --help.

--name <name>

The name of a message to write to the vehicle interface. This is required when the write command is used, in addition to --value

--value <value>

The value of a message to write to the vehicle interface. This is required when the write command is used, in addition to --name.

--file <input_file>

The path to a file of OpenXC JSON messages to write to the vehicle interface. The messages should be separated by newlines

Common interface options

These command-line options are common to all of the tools that connect to a CAN translator.

--usb

Use a vehicle interface connected via USB as the data source. USB is the default data source. This option is mutually exclusive with --serial and --trace.

--serial

Use a vehicle interface connected via a USB-to-serial adapter as the data source. This option is mutually exclusive with --usb and --trace.

--trace <tracefile>

Use a previously recorded OpenXC trace file as the data source. This option is mutually exclusive with --usb and --serial.

--usb-vendor <vendor_id>

Specify the USB vendor ID of the attached vehicle interface to use. Defaults to the Ford Motor Company vendor ID, 0x1bc4.

If the data source is not set to USB, this option has no effect.

--serial-port <port>

Specify the path to the virtual COM port of the vehicle interface. Defaults to /dev/ttyUSB0.

If the data source is not set to serial, this option has no effect.

--serial-baudrate <baudrate>

Specify the baudrate to use with the serial-based vehicle interface. Defaults to 115200.

If the data source is not set to serial, this option has no effect.