# J2534 Log Format v2

> **Library 2.0.0.213** · SAE J2534 v04.04 API

## Overview

The J2534 DLL writes logs in a compact, parseable format. Each line is a single operation, a data message, or a metadata event. Log files use the `.qlog` extension and are named `id<N>_YYYYMMDD_HHMMSS.qlog`.

## File structure

```text
# v2 2026-03-05 17:21:09
  0 I pt_lib open param: /dev/tty.usbserial-DP04XHM7, type:5
  4 I serial Opened /dev/tty.usbserial-DP04XHM7 at 3000000 baud
  0 I s0 open_serial /dev/tty.usbserial-DP04XHM7 > ok 0ms
# v2 2026-03-05 17:21:09
  7 I s0 rd_ver > ver:FW:81;HW:0000FF05;SN:49999 6ms
  0 # DiagStart N49999@scandoc.online "bmw" "/0/9/154/42" "..."
  0 I s0 status > tp:0 mem:173984 bat_v:14400 0ms
 36 I s0 qconn > 1 29ms
  1 I s0 io 1 SET_CONFIG 0x10000:600|0x10001:45 > ok 1ms
  1 I s0 flt+ 1 ISO15765 FLOW FFFFFFFFFF 00000612F1 000006F112 > 10 1ms
  1 I s0 wr 1 0 1 > 1 1ms
  [6F1:12]1A80 0.000 2 EXT_ADDR
  8 I s0 rd 1 900 2 > 2 8ms
  [6F1:12] 0.222 0 INT|TX_DONE|EXT_ADDR
  [612:F1] 0.222 0 RX_START|EXT_ADDR
...
```

- Header: `# v2 YYYY-MM-DD HH:MM:SS` (version, date, time of session start)
- A single file may contain multiple `# v2` headers (e.g., library initialization + device open)
- Data lines start with a tab character
- Metadata lines use the `#` marker instead of a log level

## Line types

### Operation line

```text
DELAY LEVEL DEVICE COMMAND PARAMS > RESULT DURATION
```

| Position | Field | Description |
| -------- | ----- | ----------- |
| 0 | DELAY | Delta from the previous log line in milliseconds (integer, right-aligned to 3 characters for 0-999) |
| 1 | LEVEL | Level: `I` (Info), `W` (Warning), `E` (Error), `D` (Debug) |
| 2 | DEVICE | Device tag (see [Device tags](#device-tags)) |
| 3 | COMMAND | Command name |
| 4+ | PARAMS | Input parameters (see below) |
| - | `>` | Separator |
| -2 | RESULT | Result/output values |
| -1 | DURATION | Operation duration (Nms) |

### Metadata line

Written by the calling application via the exported `LogMsg()` function.

```text
DELAY # EVENT_TYPE params...
```

| Position | Field | Description |
| -------- | ----- | ----------- |
| 0 | DELAY | Delta from the previous log line in milliseconds |
| 1 | `#` | Metadata marker (instead of LEVEL) |
| 2 | EVENT_TYPE | Event name |
| 3+ | params | Event-specific parameters |

**Event types:**

| Event | Description | Example |
| ----- | ----------- | ------- |
| `DiagStart` | Start of a diagnostic session | `DiagStart N49999@scandoc.online "bmw" "/0/9/154/42" "..."` |
| `DiagEcuID` | ECU identification | `DiagEcuID "D_MOTOR"` |
| `DiagTabOpen` | Tab opened | `DiagTabOpen diag.html 6633 "Fehlercode"` |
| `DiagTabClose` | Tab closed | `DiagTabClose diag.html 6633 "Fehlercode"` |
| `DiagTabSelect` | Tab selected | `DiagTabSelect diag.html "-" true` |
| `DiagStopScan` | Scan stopped | `DiagStopScan user "stop" Q:true T:false` |
| `DiagDTCFound` | Diagnostic trouble codes found | `DiagDTCFound "2CF9" 110784; "2CFA" 110899` |
| `DiagDTCNotFound` | Trouble code not found | `DiagDTCNotFound "CD87"` |
| `DiagDlgOpen` | Dialog opened | `DiagDlgOpen Dlg ErrorOk` |
| `DiagDlgClose` | Dialog closed | `DiagDlgClose Dlg ErrorOk` |
| `DiagBtnClick` | Button clicked | `DiagBtnClick -11 "Ok"` |
| `SrvMsg` | Server message | `SrvMsg INFO WS open: I9pFhFz...` |
| `INFO` | Informational message | `INFO ECUID: 12.0010.TP` |
| `SupTicket` | Support ticket (with optional base64 image) | `SupTicket S6106 "/0/75/0/7" "..." "<p>text</p>" data:image/png;base64,...` |

**Continuation lines** (stack traces after `DiagStopScan`, `PANIC`, etc.):

```text
191 # DiagStopScan user "wseStopConnection" Q:true T:false 1: Stop scan
 /path/to/file.go:404
 /path/to/file.go:1702
```

Continuation lines start with a space + path (the first non-whitespace character is `/`, not a digit).

### Data line

```text
  [CAN_ID]DATA TIMESTAMP LEN FLAGS
```

| Position | Field | Description |
| -------- | ----- | ----------- |
| - | `\t` | Tab indent |
| 0 | [CAN_ID] | CAN identifier in brackets |
| 1 | DATA | Data bytes (hex, no spaces). Empty if LEN=0 |
| 2 | TIMESTAMP | Device timestamp in seconds.milliseconds (SSSS.mmm) |
| 3 | LEN | Data length in bytes |
| 4 | FLAGS | Pipe-separated flags (optional) |

If the message protocol differs from the channel protocol, it is appended to FLAGS.

Examples:

```text
  [688]61B05646375244 2240.300 8
  [688]61B05646375244 2240.300 8 RX_START
  [6A8] 2240.281 0 INT|TX_DONE
  [612:F1]037F2212 2240.300 4 CAN
  [612:F1]037F2212 2240.300 4 INT|CAN
```

## Device tags

The DEVICE field identifies the source component:

| Tag | Description |
| --- | ----------- |
| `j0`..`j15` | Device over LAN or BLE (j + device_id) |
| `s0`..`s15` | Device over USB-UART serial (s + device_id) |
| `pt_lib` | PassThru library (j2534_dev.cpp, before a device is connected) |
| `serial` | Serial port driver |
| `ota_tcp` | OTA update |

## Command parameters

| Command | Pos 3 | Pos 4 | Pos 5 | Pos 6 | Pos 7 | Result |
| ------- | ----- | ----- | ----- | ----- | ----- | ------ |
| `open` | address | - | - | - | - | ok/ERR |
| `open_serial` | port_path | - | - | - | - | ok/ERR |
| `open_ble` | mac/name | - | - | - | - | ok/ERR |
| `close` | - | - | - | - | - | ok |
| `close_serial` | - | - | - | - | - | ok |
| `close_ble` | - | - | - | - | - | ok |
| `conn` | protocol | baud | [conn_flags] | - | - | channel |
| `qconn` | - | - | - | - | - | channel |
| `disconn` | channel | - | - | - | - | ok/ERR |
| `rd` | channel | timeout | num | - | - | num/ERR |
| `wr` | channel | timeout | num | - | - | num/ERR |
| `flt+` | channel | protocol | type | mask | pattern [flow] | filter_id |
| `flt-` | channel | filter_id | - | - | - | ok/ERR |
| `per+` | channel | interval | - | - | - | msg_id |
| `per-` | channel | msg_id | - | - | - | ok/ERR |
| `rd_ver` | - | - | - | - | - | ver:FW:..;HW:..;SN:.. |
| `status` | - | - | - | - | - | tp:N mem:N bat_v:N |
| `io` | channel | ioctl_id | ... | - | - | ... |
| `ioctl` | - | - | - | - | - | ok/ERR (standalone, for init operations) |
| `err` | - | - | - | - | - | error_text |
| `set_volt` | pin | voltage | - | - | - | ok/ERR |

### Connection commands

```text
  0 I pt_lib open param: /dev/tty.usbserial-DP04XHM7, type:5
  0 I s0 open_serial /dev/tty.usbserial-DP04XHM7 > ok 0ms
  7 I s0 rd_ver > ver:FW:81;HW:0000FF05;SN:49999 6ms
 36 I s0 qconn > 1 29ms
  1 I s0 conn ISO15765 500000 > 1 6ms
  1 I s0 conn ISO15765 500000 CAN_29BIT_ID > 1 6ms
120 I s0 disconn 1 > ok 120ms
534 I s0 close_serial > ok 0ms
```

**Connection types (address in the `open` command):**

- LAN: `192.168.1.100` (IP address, device tag `jN`)
- BLE: via the `open_ble` command (device tag `jN`)
- Serial: via the `open_serial` command (device tag `sN`)

**`pt_lib open`** — library initialization, logged before the transport-specific open. The `type` field indicates the transport: 1=LAN, 3=BLE, 5=Serial.

**`qconn`** — internal Quantex connect command; appears in logs produced by Quantex applications, not available to third-party callers.

**`rd_ver`** — reads the device version. Result format: `ver:FW:<firmware>;HW:<hardware>;SN:<serial>`.

**`status`** — periodic status poll. Result: `tp:<transport> mem:<free_bytes> bat_v:<millivolts>`.

### Reading/Writing messages

| Command | Parameters | Result | Description |
| ------- | ---------- | ------ | ----------- |
| `rd` | channel timeout num | num or ERR | Read messages |
| `wr` | channel timeout num | num or ERR | Write messages |

**Parameters:**

- `channel` — channel ID from `conn`/`qconn`
- `timeout` — timeout in milliseconds
- `num` — number of messages (requested for rd, sent for wr)

**Result:**

- Number = messages actually read/written
  - 0 = buffer empty (ERR_BUFFER_EMPTY)
  - Fewer than requested = timeout expired (ERR_TIMEOUT)
- Text = error code (ERR_INVALID_CHANNEL_ID, etc.)

**Examples:**

```text
  1 I s0 wr 1 0 1 > 1 1ms
  [6F1:12]1A80 0.000 2 EXT_ADDR
  8 I s0 rd 1 900 2 > 2 8ms
  [6F1:12] 0.222 0 INT|TX_DONE|EXT_ADDR
  [612:F1] 0.222 0 RX_START|EXT_ADDR
  5 I s0 rd 1 900 1 > 1 5ms
  [612:F1]5A80000007621178... 0.222 31 EXT_ADDR
2000 W s0 rd 1 2000 2 > 0 2000ms
  0 E s0 rd 1 2000 10 > ERR_INVALID_CHANNEL_ID 0ms
```

### Filters

| Command | Parameters | Result | Description |
| ------- | ---------- | ------ | ----------- |
| `flt+` | channel protocol type mask pattern [flow] | filter_id | Set a filter |
| `flt-` | channel filter_id | - | Remove a filter |

**Filter types:**

- `PASS` — pass filter (allow matching messages)
- `BLOCK` — block filter (reject matching messages)
- `FLOW` — flow control filter (ISO15765)

**Examples:**

```text
  1 I s0 flt+ 1 ISO15765 FLOW FFFFFFFFFF 00000612F1 000006F112 > 10 1ms
  1 I s0 flt+ 1 CAN PASS FFFFFFFF 688 > 0 3ms
  1 I s0 flt- 1 0 > ok 3ms
```

### Periodic messages

| Command | Parameters | Result | Description |
| ------- | ---------- | ------ | ----------- |
| `per+` | channel interval | msg_id | Start a periodic message |
| `per-` | channel msg_id | - | Stop a periodic message |

**Examples:**

```text
  1 I s0 per+ 1 100 > 0 5ms
  [6A8]3E00 0.000 2
  1 I s0 per- 1 0 > ok 3ms
```

The data line after `per+` shows the periodic message payload (same format as `wr`).

### Error query

| Command | Parameters | Result | Description |
| ------- | ---------- | ------ | ----------- |
| `err` | - | error_text | Get the description of the last error |

**Example:**

```text
  0 I s0 err > "Channel not connected" 0ms
```

### IOCTL

| Command | Parameters | Result | Description |
| ------- | ---------- | ------ | ----------- |
| `io` | channel ioctl_id [params] | [result] | IOCTL operation |
| `ioctl` | - | ok/ERR | Standalone IOCTL (init operations such as FIVE_BAUD_INIT, FAST_INIT) |

For detailed formats see [Detailed IOCTL formats](#detailed-ioctl-formats).

**Examples:**

```text
  1 I s0 io 1 SET_CONFIG 0x10000:600|0x10001:45 > ok 1ms
  1 I s0 io 1 GET_CONFIG > ISO15765_BS:8|ISO15765_STMIN:20 8ms
  1 I s0 io 0 READ_VBATT > ver:12.3 5ms
  1 I s0 io 1 FAST_INIT 8121F181 > 83F11061 85ms
  1 I s0 io 1 CLEAR_RX_BUFFER > ok 2ms
1363 E s0 ioctl > ERR_TIME_OUT 1362ms
```

**Additional IOCTL names** may appear in logs for DoIP (ISO 13400) and BMW HSFZ channels:

| IOCTL name | Description |
| ---------- | ----------- |
| `ISO13400_DISCOVER` | DoIP vehicle discovery |
| `ISO13400_GET_INFO` | DoIP vehicle identification info |
| `ISO13400_TCP` | DoIP TCP connection control |
| `ISO13400_ROUTING` | DoIP routing activation |
| `HSFZ_DISCOVER` | BMW HSFZ vehicle discovery |
| `HSFZ_GET_INFO` | BMW HSFZ identification info |
| `HSFZ_TCP` | BMW HSFZ TCP connection control |
| `GET_NDIS` | USB network interface (NDIS) status |
| `READ_PIN_V` | Read J1962 pin voltage (see below) |

**Example:**

```text
  5 I s0 io 1 ISO13400_DISCOVER > ok 2150ms
```

### Detailed IOCTL formats

#### GET_CONFIG

Reads protocol configuration parameters.

```text
DELAY LEVEL DEVICE io channel GET_CONFIG > PARAM:value|PARAM:value|... Nms
```

**Example:**

```text
  8 I s0 io 1 GET_CONFIG > ISO15765_BS:8|ISO15765_STMIN:20 8ms
```

#### SET_CONFIG

Sets protocol configuration parameters.

```text
DELAY LEVEL DEVICE io channel SET_CONFIG PARAM:value|PARAM:value|... > ok Nms
```

**Example:**

```text
  1 I s0 io 1 SET_CONFIG 0x10000:600|0x10001:45 > ok 1ms
```

Parameters are shown by symbolic name when known (e.g. `ISO15765_BS`, `P3_MIN`), or as hex identifiers (`0x10000`) for vendor-specific or unknown parameters.

**Common parameters:** DATA_RATE, LOOPBACK, P1_MAX, P3_MIN, P4_MIN, W0-W5, TIDLE, TWUP, PARITY, ISO15765_BS, ISO15765_STMIN, BS_TX, STMIN_TX, ISO15765_WFT_MAX, ISO15765_PAD_VALUE, J1962_PINS, CAN_MIXED_FORMAT, FD_CAN_DATA_PHASE_RATE, HS_CAN_TERMINATION, N_CR_MAX, P2_CAN, P3_CAN, ISO13400_SOURCE_ADDR, ISO13400_ECU_IP_ADDR, ISO13400_ECU_TCP_PORT, ISO13400_T_TCP_INITIAL, ISO13400_T_TCP_GENERAL, ISO13400_ACTIVATION_TYPE, ISO13400_P3_DOIP, and others.

#### READ_VBATT

Reads battery voltage (pin 16).

```text
DELAY LEVEL DEVICE io 0 READ_VBATT > ver:X.X Nms
```

**Result:** Voltage in `ver:X.X` format (volts with one decimal place).

**Example:**

```text
  1 I s0 io 0 READ_VBATT > ver:12.3 5ms
```

#### READ_PIN_V (READ_J1962PIN_VOLTAGE)

Reads the voltage on a specific pin of the J1962 connector.

```text
DELAY LEVEL DEVICE io 0 READ_PIN_V pin > ver:X.X Nms
```

**Parameters:**

- `pin` — pin number (1-16, except 4 and 5, which are ground)

**Examples:**

```text
  1 I s0 io 0 READ_PIN_V 1 > ver:12.3 (ignition:ON) 3ms
  1 I s0 io 0 READ_PIN_V 1 > ver:0.0 (ignition:OFF) 0ms
```

#### FIVE_BAUD_INIT

5-baud initialization for ISO9141/ISO14230.

```text
DELAY LEVEL DEVICE io channel FIVE_BAUD_INIT in_addr > out_keybytes Nms
```

**Parameters:**

- `in_addr` — input address byte(s) (hex)
- `out_keybytes` — output key bytes (hex, typically 2 bytes)

**Example:**

```text
  1 I s0 io 1 FIVE_BAUD_INIT 33 > 8F6F 2850ms
```

#### FAST_INIT

Fast initialization for ISO14230 (KWP2000).

```text
DELAY LEVEL DEVICE io channel FAST_INIT [tx_msg] > [rx_msg] Nms
```

**Parameters (optional):**

- `tx_msg` — transmitted wake-up message (hex)
- `rx_msg` — received response (hex)

**Examples:**

```text
  1 I s0 io 1 FAST_INIT 8121F181 > 83F11061 85ms
  1 I s0 io 1 FAST_INIT > ok 75ms
```

#### Clear commands (CLEAR)

Clear various buffers and tables.

```text
DELAY LEVEL DEVICE io channel IOCTL_NAME > ok Nms
```

| IOCTL_NAME | Description |
| ---------- | ----------- |
| `CLEAR_TX_BUFFER` | Clear the transmit buffer |
| `CLEAR_RX_BUFFER` | Clear the receive buffer |
| `CLEAR_PERIODIC_MSGS` | Clear periodic messages |
| `CLEAR_MSG_FILTERS` | Clear message filters |
| `CLEAR_FUNCT_MSG_LOOKUP_TABLE` | Clear the functional address lookup table |

**Example:**

```text
  1 I s0 io 1 CLEAR_RX_BUFFER > ok 2ms
  1 I s0 io 1 CLEAR_MSG_FILTERS > ok 3ms
```

#### REQ_CONN (REQUEST_CONNECTION)

TP2.0 connection request.

```text
DELAY LEVEL DEVICE io channel REQ_CONN addr > ok Nms
```

**Parameters:** `addr` — logical address (hex)

**Example:**

```text
  1 I s0 io 1 REQ_CONN 01 > ok 150ms
```

## CAN ID format

| Type | Format | Example |
| ---- | ------ | ------- |
| 11-bit standard | `[XXX]` | `[612]` |
| 29-bit extended | `[XXXXXXXX]` | `[18DA00F1]` |
| 11-bit + ext addr | `[XXX:XX]` | `[612:F1]` |
| 29-bit + ext addr | `[XXXXXXXX:XX]` | `[18DA00F1:F1]` |

The extended address is shown when the `EXT_ADDR` flag is present.

## Flag reference

### RX Status flags (in received messages)

| Flag | Bit | Description |
| ---- | --- | ----------- |
| `INT` | 0 | Internal/loopback (TX_MSG_TYPE). 1=echo from the adapter, 0=from the bus |
| `RX_START` | 1 | Start of a segmented message (START_OF_MESSAGE) |
| `RX_BREAK` | 2 | Communication break detected (RX_BREAK) |
| `TX_DONE` | 3 | Transmission completed successfully (TX_SUCCESS) |
| `TX_FAIL` | 9 | Transmission failed (TX_FAILED) |
| `PAD_ERR` | 4 | ISO15765 padding error (ISO15765_PADDING_ERROR) |
| `EXT_ADDR` | 7 | Extended addressing mode (ISO15765_ADDR_TYPE) |
| `EXT29` | 8 | 29-bit CAN ID (CAN_29BIT_ID_RF) |
| `BUF_OVF` | 10 | Device dropped messages: the application drained the queue too slowly (BUFFER_OVERFLOW) |

**Protocol-specific RX flags:**

The standard assigns bits 16–21 differently per protocol, so decoding depends on the
channel's ProtocolID: the J1708 priority occupies the same 16–19 as SW-CAN HV/NS/HS
and CAN FD BRS. Outside the protocols listed below these bits are not printed.

| Flag | Context | Description |
| ---- | ------- | ----------- |
| `HV` | SW-CAN | Received at high voltage (SW_CAN_HV_RX) |
| `NS` | SW-CAN | Received at normal speed (SW_CAN_NS_RX) |
| `HS` | SW-CAN | Received at high speed (SW_CAN_HS_RX) |
| `CONN_OK` | TP2.0/TP1.6 | Connection established |
| `CONN_LOST` | TP2.0/TP1.6 | Connection lost |
| `ADDR_LOST` | J1939 | Address lost |
| `ADDR_OK` | J1939 | Address claimed |
| `PRIO=<n>` | J1708 | Priority 1–8 from echo bits 16–19 (MSG_PRIORITY_VALUE). The device sends it in `RxStatus`, but the DLL hands it to the client in `TxFlags` — the wire header carries no TxFlags field, and Table 68 requires the priority back in the echo |
| `FD` | CAN/ISO15765 | CAN FD frame, bit 20 (FD_CAN_FORMAT_RF) |
| `BRS` | CAN/ISO15765 | CAN FD bit rate switch, bit 19 (FD_CAN_BRS_RF) |
| `ESI` | CAN/ISO15765 | CAN FD error state indicator, bit 21 (FD_CAN_ESI) |
| `LINK_FAULT` | CAN/ISO15765 | Transceiver reports a fault-tolerant line fault; the frame itself is valid (LINK_FAULT) |
| `OVERFLOW` | ANALOG_IN_1…32 | Reading clipped the input range, bit 16 (ANALOG_IN_OVERFLOW) |

### TX flags (in transmitted messages)

| Flag | Bit | Description |
| ---- | --- | ----------- |
| `NO_DONE` | 0 | Do not wait for TX confirmation (ISO15765_NO_TXDONE) |
| `NO_RESP` | 1 | Do not wait for a response (ISO15765_NO_RESP) |
| `7F78_IGN` | - | Ignore 7F 78 negative responses (ISO15765_7F78_IGNORE) |
| `PAD` | 6 | Use ISO15765 padding (ISO15765_FRAME_PAD_TF) |
| `PAD_ERR` | - | ISO15765 padding error |
| `EXT_ADDR` | 7 | Extended addressing mode (ISO15765_ADDR_TYPE_TF) |
| `EXT29` | 8 | 29-bit CAN ID (CAN_29BIT_ID_TF) |
| `P3_ONLY` | 9 | Wait for P3 min only (WAIT_P3_MIN_ONLY) |
| `HV` | 10 | SW-CAN high-voltage transmission (SW_CAN_HV_TX) |
| `SCI` | - | SCI mode |
| `SCI_V` | - | SCI TX voltage |

**Protocol-specific TX flags** (bits 16–20, decoded by the channel's ProtocolID just
like RX Status; outside the protocols listed below they are not printed):

| Flag | Context | Description |
| ---- | ------- | ----------- |
| `BCAST` | TP2.0/TP1.6 | Broadcast message, bit 16 (TP2_0_BROADCAST_MSG) |
| `PRIO=<n>` | J1708 | Priority 1–8, bits 16–19 (MSG_PRIORITY_VALUE) |
| `FD` | CAN/ISO15765 | CAN FD frame, bit 20 (FD_CAN_FORMAT_TF) |
| `BRS` | CAN/ISO15765 | CAN FD bit rate switch, bit 19 (FD_CAN_BRS_TF) |

### Connection flags (in the `conn` command)

| Flag | Description |
| ---- | ----------- |
| `FULL_DUPLEX` | Full-duplex communication |
| `CAN_29BIT_ID` | 29-bit CAN ID (CAN_29BIT_ID_CF) |
| `NO_CS` | ISO9141 without checksum |
| `CAN_ID_BOTH` | Accept both 11-bit and 29-bit CAN IDs |
| `K_ONLY` | ISO9141 K-line only |
| `SNIFF` | Listen-only (sniffing) mode |
| `NDIS1` | NDIS pinout option 1 (NDIS_PINS_OPTION1) |
| `NDIS2` | NDIS pinout option 2 (NDIS_PINS_OPTION2) |

## Result codes

| Result | Description |
| ------ | ----------- |
| `ok` | Success (STATUS_NOERROR) |
| `N` | Number of messages actually read/written: 0 = buffer empty (ERR_BUFFER_EMPTY, not an error), fewer than requested = timeout expired (ERR_TIMEOUT, not an error) |
| `ERR_XXX` | Error code = operation failed (ERR_INVALID_CHANNEL_ID, ERR_DEVICE_NOT_CONNECTED, ERR_TIME_OUT, etc.) |
| `"text"` | Quoted text string (e.g. the last error description from PassThruGetLastError) |

## Protocol names

| Name | Protocol ID | Description |
| ---- | ----------- | ----------- |
| `CAN` | 5 | Raw CAN |
| `ISO15765` | 6 | ISO 15765-2 (CAN transport) |
| `ISO9141` | 3 | ISO 9141-2 (K-Line) |
| `ISO14230` | 4 | ISO 14230 (KWP2000) |
| `J1850VPW` | 1 | J1850 VPW |
| `J1850PWM` | 2 | J1850 PWM |
| `FD_CAN_PS` | - | CAN FD |
| `FD_ISO15765_PS` | - | ISO 15765 over CAN FD |
| `TP20_PS` | - | TP 2.0 |
| `TP16_PS` | - | TP 1.6 |
| `SW_CAN_PS` | - | Single-Wire CAN |
| `J1939_PS` | - | SAE J1939 |
| `ISO13400_PS` | - | ISO 13400 (DoIP, Diagnostics over IP) |
| `HSFZ_PS` | - | BMW HSFZ (High-Speed Fahrzeug-Zugang) |

> For the full protocol list, see the SAE J2534-1 and J2534-2 specifications.

## Complete example

```text
# v2 2026-03-05 17:21:09
  0 I pt_lib open param: /dev/tty.usbserial-DP04XHM7, type:5
  4 I serial Opened /dev/tty.usbserial-DP04XHM7 at 3000000 baud
  0 I s0 open_serial /dev/tty.usbserial-DP04XHM7 > ok 0ms
# v2 2026-03-05 17:21:09
  7 I s0 rd_ver > ver:FW:81;HW:0000FF05;SN:49999 6ms
  0 # DiagStart N49999@scandoc.online "bmw" "/0/9/154/42" "/PKW/BMW/1 (E87)/M47 - Digital diesel electronics (DDE)"
  0 I s0 status > tp:0 mem:173984 bat_v:14400 0ms
 36 I s0 qconn > 1 29ms
  1 I s0 io 1 SET_CONFIG 0x10000:600|0x10001:45 > ok 1ms
  1 I s0 flt+ 1 ISO15765 FLOW FFFFFFFFFF 00000612F1 000006F112 > 10 1ms
  1 I s0 wr 1 0 1 > 1 1ms
  [6F1:12]1A80 0.000 2 EXT_ADDR
  8 I s0 rd 1 900 2 > 2 8ms
  [6F1:12] 0.222 0 INT|TX_DONE|EXT_ADDR
  [612:F1] 0.222 0 RX_START|EXT_ADDR
  5 I s0 rd 1 900 1 > 1 5ms
  [612:F1]5A80000007621178001A001054502009042104FFFFFF000000000000FFFFFF 0.222 31 EXT_ADDR
  0 # DiagEcuID "D_MOTOR"
  0 # DiagTabOpen diag.html 6633 "Fehlercode"
  1 I s0 wr 1 0 1 > 1 1ms
  [6F1:12]1802FFFF 0.000 4 EXT_ADDR
 43 I s0 rd 1 900 2 > 2 43ms
  [6F1:12] 0.222 0 INT|TX_DONE|EXT_ADDR
  [612:F1] 0.222 0 RX_START|EXT_ADDR
  6 I s0 rd 1 900 1 > 1 6ms
  [612:F1]580F2CF9C12CFAC22D09C4... 0.222 47 EXT_ADDR
  0 # DiagDTCFound "2CF9" 110784; "2CFA" 110899
  0 # DiagTabClose diag.html 6633 "Fehlercode"
1768 I s0 status > tp:0 mem:157612 bat_v:14400 1ms
302 # DiagStopScan user "stop" Q:true T:false
120 I s0 disconn 1 > ok 120ms
534 I s0 close_serial > ok 0ms
```

### Reading the log

1. `pt_lib open param: ...` — library initialization, serial transport (type:5)
2. `s0 open_serial ...` — opening the serial port to the device
3. `s0 rd_ver > ver:FW:81;...` — reading the firmware version, hardware ID, serial number
4. `# DiagStart ...` — the calling application logs the start of a diagnostic session
5. `s0 status > tp:0 mem:173984 bat_v:14400` — device status: 173 KB free, 14.4 V battery
6. `s0 qconn > 1` — internal Quantex connect command, channel_id=1 returned
7. `s0 io 1 SET_CONFIG ...` — setting protocol parameters
8. `s0 flt+ 1 ISO15765 FLOW ...` — setting up a flow control filter for ISO15765 with extended addressing
9. `s0 wr 1 0 1` — writing 1 message to channel 1, timeout 0 ms
   - `[6F1:12]1A80` — CAN ID 6F1, ext addr 12, data 1A80 (ReadDataByLocalId)
10. `s0 rd 1 900 2 > 2` — reading up to 2 messages, 2 received (900 ms timeout)
    - `[6F1:12] ... INT|TX_DONE|EXT_ADDR` — internal echo, TX complete
    - `[612:F1] ... RX_START|EXT_ADDR` — start of a segmented response
11. `s0 rd ... > 1` — read, 1 message received
    - `[612:F1]5A80...` — response data (31 bytes)
12. `# DiagStopScan` — the calling application logs the scan stop
13. `s0 disconn 1 > ok` — disconnecting channel 1
14. `s0 close_serial > ok` — closing the serial port
