.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3. .TH CAN_VIEWER "1" "December 2023" "can_viewer 4.3.1" "User Commands" .SH NAME can_viewer \- CAN data viewer .SH SYNOPSIS .B python3 \fI\,-m can.viewer \/\fR[\fI\,-c CHANNEL\/\fR] .SH DESCRIPTION .TP [\-i {canalystii,cantact,etas,gs_usb,iscan,ixxat,kvaser,neousys,neovi,nican,nixnet,pcan,robotell,seeedstudio,serial,slcan,socketcan,socketcand,systec,udp_multicast,usb2can,vector,virtual}] [\-b BITRATE] [\-\-fd] [\-\-data_bitrate DATA_BITRATE] [\-h] [\-\-version] [\-d ('{:,:::...:,file.txt}',)] [\-f ('{:,~}',)] [\-v] ('extra_args',) .PP A simple CAN viewer terminal application written in Python .SS "positional arguments:" .TP extra_args The remaining arguments will be used for the interface and logger/player initialisation. For example, `\-i vector \fB\-c\fR 1 \fB\-\-app\-name\fR=\fI\,MyCanApp\/\fR` is the equivalent to opening the bus with `Bus('vector', channel=1, app_name='MyCanApp') .SS "options:" .TP \fB\-c\fR, \fB\-\-channel\fR CHANNEL Most backend interfaces require some sort of channel. For example with the serial interface the channel might be a rfcomm device: "/dev/rfcomm0". With the socketcan interface valid channel examples include: "can0", "vcan0". .TP \fB\-i\fR, \fB\-\-interface\fR {canalystii,cantact,etas,gs_usb,iscan,ixxat,kvaser,neousys,neovi,nican,nixnet,pcan,robotell,seeedstudio,serial,slcan,socketcan,socketcand,systec,udp_multicast,usb2can,vector,virtual} Specify the backend CAN interface to use. If left blank, fall back to reading from configuration files. .TP \fB\-b\fR, \fB\-\-bitrate\fR BITRATE Bitrate to use for the CAN bus. .TP \fB\-\-fd\fR Activate CAN\-FD support .TP \fB\-\-data_bitrate\fR DATA_BITRATE Bitrate to use for the data phase in case of CAN\-FD. .SS "Optional arguments:" .TP \fB\-h\fR, \fB\-\-help\fR Show this help message and exit .TP \fB\-\-version\fR Show program's version number and exit .TP \fB\-d\fR, \fB\-\-decode\fR ('{:,:::...:,file.txt}',) Specify how to convert the raw bytes into real values. The ID of the frame is given as the first argument and the format as the second. The Python struct package is used to unpack the received data where the format characters have the following meaning: .TP < = little\-endian, > = big\-endian x = pad byte c = char ? = bool b = int8_t, B = uint8_t h = int16, H = uint16 l = int32_t, L = uint32_t q = int64_t, Q = uint64_t f = float (32\-bits), d = double (64\-bits) .TP Fx to convert six bytes with ID 0x100 into uint8_t, uint16 and uint32_t: $ python3 \fB\-m\fR can.viewer \fB\-d\fR "100::,~}',) Space separated CAN filters for the given CAN interface: .TP : (matches when & mask == can_id & mask) ~ (matches when & mask != can_id & mask) .TP Fx to show only frames with ID 0x100 to 0x103 and 0x200 to 0x20F: python3 \fB\-m\fR can.viewer \fB\-f\fR 100:7FC 200:7F0 .IP Note that the ID and mask are always interpreted as hex values .TP \fB\-v\fR How much information do you want to see at the command line? You can add several of these e.g., \fB\-vv\fR is DEBUG .SS "Shortcuts:" .HP +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ .TP | Key | Description | .HP +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+ .TP | ESQ/q | Exit the viewer | .TP | c | Clear the stored frames | .TP | s | Sort the stored frames | .TP | h | Toggle highlight byte changes | .TP | SPACE | Pause the viewer | .TP | UP/DOWN | Scroll the viewer | .HP +\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+