Skip to content

Releases

0.5.0

Choose a tag to compare

@bisak bisak released this 13 Nov 10:51

New

  • Windows support: openport-j2534-32.dll and openport-j2534-64.dll, built with MinGW-w64. Each DLL is a single file. A release attaches both in openport-j2534-<version>-windows.zip.
  • The DLLs export the 14 __stdcall functions under their plain names, with the ordinals Tactrix's DLL uses.
  • regsvr32 registers a DLL with the protocol entries Tactrix's installer writes. regsvr32 /u removes it, and removes the shared PassThruSupport.04.04 key when nothing else is left in it.
  • The DLL opens the cable through Tactrix's USB driver, which is the one tested with this release, or else through the USB serial driver Windows gives the cable. op_probe.exe shows which.
  • Against Tactrix's DLL on the same PC and bus, the DLL returns the same results except for the documented return codes, and gives the same ECU round trips. It keeps 256 USB reads posted, so it lost no frame with the program frozen 300 ms of every 500, where Tactrix's DLL lost about 2,500 in 30 s. docs/TESTING.md has the measurements.
  • CI builds and tests on Linux, macOS, and Windows. On Windows it runs the unit tests, the simulator over a named pipe, and regsvr32, for both widths. A release's Windows zip is built from the DLLs that CI tested on the release's commit.

Fixes

  • A command that the cable has started to take is sent in full, with up to 2 s past the caller's timeout. Before, a long ISO 15765 transmit could be cut off at the timeout, and the cable then read the next command as the rest of its payload. On macOS that transmit returned ERR_DEVICE_NOT_CONNECTED with the cable still attached. It now returns ERR_TIMEOUT, as Tactrix's DLL does.
  • PassThruWriteMsgs with a Timeout of 0 sends its transmits unnumbered, as Tactrix's DLL does. Numbered, the cable answered each one, which cost 0.4 ms per frame.
  • The log (OPENPORT_LOG) and the call recording (OPENPORT_RECORD) are flushed after every line, on every platform.
  • On Linux, PassThruClose now releases the exclusive lock on a serial device that another process also holds open, such as a simulator's pty. Before, the next PassThruOpen returned ERR_DEVICE_IN_USE.

v0.4.2

Choose a tag to compare

@bisak bisak released this 23 Oct 13:24

Fixes

  • On macOS the driver now talks to the cable through its serial device (/dev/cu.usbmodem…), found by the cable's USB id and opened exclusively, instead of libusb. The kernel's CDC-ACM driver keeps reading the cable while the application is stalled; a user-space reader cannot when the Mac pages, and frames were lost in clusters on a Mac short of memory. Freezing the reading process for 300 ms every 2 s failed every libusb read and none through the serial device, nor did 1 s freezes every 1.5 s (docs/PROTOCOL.md §1). OPENPORT_DEVICE=usb selects libusb, which Linux keeps, and macOS still uses for a cable with no serial device, to name its problem.

  • Received CAN frames could be lost without any error when the stream was dense. The cable holds only about 1.1 KB for a host that is not reading and then discards new frames silently, and the driver had one USB read posted at a time, so the cable waited out each read's round trip and any pause of the reader thread. Measured on 2026-10-23 at about 3,000 frames a second: 9 of 18 long reads with the byte log on lost frames, every lost frame absent from the USB stream (docs/PROTOCOL.md §1). The driver now keeps 256 reads posted, resubmitted by a thread of their own at the highest scheduling class into a 1 MB ring the reader thread drains; the same 18 reads lost nothing.

  • A command and its binary payload (a transmit, a filter, a periodic message) went out as two USB writes. The cable rejects a payload that arrives late with ERR_INVALID_MSG, then reads it as the start of the next command, which then times out. They now go out as one write, as Tactrix's driver sends them. With the reads above, the gap between the two writes sometimes reached 15 ms, and 4 of 30 runs of op_smoke failed this way; 0 of 40 fail now.

  • PassThruReadVersion could report the version a checkout was first built at: a version bump in the Makefile did not rebuild the objects. They now rebuild when the Makefile changes.

  • A program built against a source checkout ran whatever copy was installed, because the library named itself by its installed path. The build tree's library is now @rpath/libj2534.dylib and the examples carry the checkout's rpath; make install gives the installed copy its own path, as before.

Source tarball SHA-256: c1b925d69cb2e2603b36c272a5d14197a7422513d04fbf1ee684fb1e1a487476

v0.4.1

Choose a tag to compare

@bisak bisak released this 12 Oct 14:03

Fixes

  • A cable whose firmware stops taking USB data (every bulk OUT write times out with nothing sent) was reported as "not answering the protocol correctly (stream may be corrupt)". PassThruOpen now returns ERR_DEVICE_NOT_CONNECTED with "The OpenPort takes no USB data; its firmware has stopped. Replug its USB." and stops after the first refused write instead of retrying the reset three times. Seen on 2026-10-12: the IN queue was empty and a USB port reset did not clear it; a replug did. What puts the firmware in that state is not known.

Source tarball SHA-256: b963578dc545c94bd2d1a6876a7f9b6243aef7a7a9d8391c45706dd588cff68e

v0.4.0

Choose a tag to compare

@bisak bisak released this 07 Oct 19:54

Fixes

  • A cable that disappears mid-session now fails every later call at once with ERR_DEVICE_NOT_CONNECTED instead of running each one to its timeout. A transport that fails every read for half a second counts as a lost cable, and the reader thread no longer spins on it.
  • PassThruClose on one thread while a command was queued behind it on another could free the transport under that command. The teardown now waits for the command, which returns a closed-device code.
  • CLEAR_TX_BUFFER emptied the receive queue. There is no transmit queue to clear; it now leaves received messages alone.
  • A five-baud init whose arw reply carried no sequence number timed out. Both forms are accepted, and an init reply is matched to the command by kind: a late ary or arw can no longer be taken as the answer to whatever command came next.
  • With LOOPBACK on a K-line channel, the echo was preceded by an empty TX_DONE indication. It is now a START_OF_MESSAGE indication, as Tactrix's driver delivers it, followed by the echoed message marked TX_MSG_TYPE.
  • Frames on the L-line and jack channels (7-9) were laid out as CAN frames. They follow the K-line layout, as channels 3 and 4 do.
  • A reply with more than three trailing numbers read past the parser's token array.
  • PassThruGetLastError had no text after a failed READ_VBATT or READ_PROG_VOLTAGE, and lost the specific reason (a size range, a dead K-line) behind the entry point's generic one. The cable's ERR_OEM_VOLTAGE_* codes are named; a code with no name is reported by number.
  • A PassThruConnect that ran out of memory after the cable had opened the channel left it open on the cable.
  • The serial transport could wait forever on a timeout above 2^31 ms, and a zero-length USB packet was reported as data.

Changes

  • Return codes the standard names: a message whose ProtocolID is not the channel's protocol is refused with ERR_MSG_PROTOCOL_ID, for transmits, periodic messages and a filter's flow-control message, as the vendor driver checks them, while a mask or pattern's ProtocolID is ignored, as it ignores it (Tactrix's driver reroutes a mismatched transmit by protocol); connecting a protocol whose line another open channel holds (ISO 9141 and ISO 14230 on K, their twins on L) returns ERR_CHANNEL_IN_USE without asking the cable, which answers are 3; a periodic message with an interval of 0, which the cable accepts and never sends, returns ERR_INVALID_TIME_INTERVAL; FIVE_BAUD_INIT without an output array returns ERR_NULL_PARAMETER before anything reaches the bus.
  • PassThruClose returns the reset's failure code when atz did not reach the cable, since a pin may still carry voltage. The session is torn down either way.
  • PassThruReadMsgs waits once per message for the time that is left instead of in 20 ms slices.
  • Read from Tactrix's driver code and applied here: ISO 15765 extended addressing is marked (ISO15765_ADDR_TYPE, status bit 0x04, a 5-byte header on every chunk); on the K-line channels only a START or END frame of exactly four bytes carries a timestamp, and a 0x10 frame there is data; a Timeout of 0 gives a raw CAN frame a 50 ms bus budget and a jack transmit none; a stale numbered ary or arw is discarded. A frame with status bit 0x08, which the vendor driver would drop and whose meaning is unmeasured, is delivered and logged.
  • PassThruOpen after a lost cable closes the dead session itself, so an application need not call PassThruClose first; PassThruReadVersion reports the loss like every other call.
  • Protocol notes: atx and atp 5 2 are the vendor driver's firmware-update entry; neither is ever sent by this driver. A cable in its bootloader (0403:cc4b) or enumerated as storage with a microSD card in (0403:cc4c) is named as such by PassThruGetLastError instead of "no OpenPort found".

Source tarball SHA-256: 8c810836df20c88726413dc546a2672ed71cd80097166271d2784cff247c5991

v0.3.2

Choose a tag to compare

@bisak bisak released this 02 Oct 21:28

The library is unchanged apart from its version number.

  • tools/car/car_capture.py checks the cable's K-line before any wake-up by sending one request with LOOPBACK on and comparing the echo, adds a FIVE_BAUD_MOD 3 wake-up, a fast init by hand that listens a full second for a slow ECU, and reads at the EDC16's own address 0x10, and can record pin 7 passively with --kline-listen.
  • Protocol notes: the K-line echo layout and the checksum on the wire, measured on the bench; the Audi K-line notes corrected.
  • The test simulator's serve loop no longer spins at 100% CPU while idle; a scenario now guards it.

Source tarball SHA-256: c2d8f9f56356f762823e6b92a72386ce2bc09b43e944a59ecce538f14d096f6b

v0.3.1

Choose a tag to compare

@bisak bisak released this 24 Sep 12:56

Documentation only. The library is unchanged apart from its version number.

  • The README is now one page: install, check that it works, use it, troubleshooting.
  • New docs/API.md: what each J2534 call does with this driver and cable, and every difference from Tactrix's driver.
  • The protocol, testing and comparison notes are reorganised with a summary and the commands first, then the detail. No measurements changed.
  • docs/AB-OFFICIAL.md lists every difference from Tactrix's driver in one place, grouped by kind.

Source tarball SHA-256: 9de809b21a5b95b52e4fc108e94742a485ea7600553b7512e9446e118fac8344

v0.3.0

Choose a tag to compare

@bisak bisak released this 24 Sep 12:24

Fixes

  • CLEAR_MSG_FILTERS could leave a filter active and still report success once more than 32 filters had been set in one session. It now clears every filter on the channel with one command, as Tactrix's driver does, and CLEAR_PERIODIC_MSGS does the same for periodic messages.
  • With LOOPBACK on an ISO 15765 channel, the echoes of your own transmissions were dropped. They are now delivered, as Tactrix's driver delivers them.
  • PassThruGetLastError names ERR_INIT_FAILED instead of calling it ERR_UNKNOWN.

Changes, to match Tactrix's driver

  • GET_CONFIG and SET_CONFIG process the whole parameter list even when one parameter is unsupported, and return the status of the last one. Previously the list stopped at the first unsupported parameter and the rest were never set.
  • Periodic messages accept any interval the cable can run, not only J2534's 5–65535 ms.
  • A flow-control message passed with a PASS or BLOCK filter is ignored instead of rejected.

Other changes

  • PassThruStartPeriodicMsg checks the message size the way PassThruWriteMsgs does. The cable would otherwise repeat a malformed frame.
  • Objects are rebuilt when a header they include changes.
  • Documentation reconciled with the code, and the release notes kept in the tree as NEWS.md. The protocol notes now describe how long replies are chunked and how ISO 15765 loopback echoes arrive, both measured against a live ECU.
  • The A/B test harness can sweep every J2534 parameter through Tactrix's driver and this one and compare what each sends, command by command.

Verified

Tested on macOS (Apple Silicon) against the simulator, the cable, Tactrix's DLL and a live ECU, and on Linux (Ubuntu 24.04, GCC 13.3) with -Werror, sanitizers and fuzzing.

Source tarball SHA-256: a8b94bf378a3007798b5a68f8883cf0f4a8426dbb3e76e3fdc4d50605cffdf08

v0.2.1

Choose a tag to compare

@bisak bisak released this 22 Sep 15:13

Builds and runs on Linux. The README promised it since 0.1.0; this is the first release where it was exercised end to end.

Fixed

  • The tests and mock slept with usleep, which the POSIX.1-2008 profile the build selects does not declare, so GCC refused them. They use nanosleep now. The library itself was unaffected.
  • The Makefile passed the Darwin-only -arch flag to the sanitizer and fuzz targets on every platform. diff-tools, whose usbtap is a DYLD_INSERT_LIBRARIES interposer, now refuses to build off macOS with a message instead of a compiler error.
  • Closing the USB transport on Linux left the cable without its cdc_acm driver until it was replugged: detaching the data interface to claim it tears the whole ACM device down, /dev/ttyACM* included. Close now reattaches every interface the kernel had at open, comm interface first, which brings the tty back. No change on macOS, where nothing is detached.
  • tools/car/car-session.sh finds /dev/ttyACM*, exports LD_LIBRARY_PATH, builds diff-tools on macOS only, and waits for the ACM node to come back after the USB step.

Verified in an Ubuntu 24.04 container (GCC 13.3, aarch64): -Werror build, 517 unit checks plain and under ASAN/UBSAN and TSAN, 67 simulator checks, 300k fuzz iterations, examples and install. The macOS suite is unchanged.

Reported by Michał Słomkowski.

v0.2.0

Choose a tag to compare

@bisak bisak released this 22 Sep 15:00

Measured against Tactrix's own op20pt32.dll (1.02.0.4868) driven through the same scripted sequence as this driver: the periodic commands are now wire-identical, and every return code agrees except three deliberate cases where the standard's text is followed instead. docs/PROTOCOL.md is rewritten as a current-truth reference; its §13 lists every reading the cable refuted.

Changed

  • Periodic messages are scheduled by the firmware (atm/atn), the commands Tactrix's DLL sends; the host scheduler thread is gone. Timing is the firmware's (100.0 ms at 100 ms), message ids are the firmware's, and no transmit-done indication is produced for them. As with the vendor driver, a periodic outlives a crashed application until the next PassThruOpen, which resets the cable.
  • TxDone indications carry the CAN id of the message just sent: DataSize 4, ExtraDataIndex 0 (J2534-1 DEC2004 §8.6), as the vendor DLL reports them. 0.1.x reported DataSize 0.
  • SNIFF_MODE is passed through to the firmware instead of refused; Tactrix's own canlogger sample connects. The firmware still acknowledges frames (PROTOCOL.md §10).
  • The OPENPORT_ENABLE_PROG_VOLTAGE gate is removed. PassThruSetProgrammingVoltage applies what it is asked, as with the vendor driver. A voltage on a second pin while one holds a voltage is refused with ERR_PIN_INVALID (was ERR_EXCEEDED_LIMIT), the code J2534-1 Figure 22 names; grounding K or L under a channel that uses it is still refused.
  • Any call before PassThruOpen or after PassThruClose returns ERR_INVALID_DEVICE_ID (J2534-1 §7.2.1); 0.1.x returned ERR_DEVICE_NOT_CONNECTED.
  • ISO15765 transmit size limits follow J2534-1 Figure 42 (minimum 4 bytes, 5 with extended addressing).

Fixed

  • PassThruClose on one thread while PassThruReadMsgs waits on another: the read returns ERR_INVALID_DEVICE_ID at once instead of spinning out its timeout over destroyed synchronisation objects.
  • A WriteMsgs Timeout above 71 minutes wrapped the firmware's microsecond transmit budget; it saturates now.
  • GET_CONFIG/SET_CONFIG errors from the device set the PassThruGetLastError text.
  • Open sends the vendor's \r\n\r\n preamble, which terminates a partial line left by a crashed session, and requires ata to answer aro.
  • tests/differential/diff_runner.c and examples/op_smoke send VOLTAGE_OFF rather than 17 V, which the gate had been refusing on their behalf.

Protocol

  • Continuation chunks of a reply longer than one wire frame strip the repeated CAN id unconditionally, as the vendor DLL does; it reassembles only that layout intact. No change under the measured layout; the heuristic is gone.
  • docs/PROTOCOL.md rewritten: current truth per section with confidence markers, the vendor DLL's command set, §12 open questions and what closes each, §13 refuted readings.
  • The simulator models firmware periodics; the capture tool's atp sweep is removed (atp is a pin verb, not the periodic command).

Verified: 517 unit checks under plain, ASAN/UBSAN and TSAN builds, 300k fuzz iterations, 67 simulator scenario checks, and the vendor-DLL A/B against the simulator.

v0.1.2

Choose a tag to compare

@bisak bisak released this 16 Sep 18:57

Measured on firmware 1.17.4877: on a bench supply, through Tactrix's own DLL replayed against the cable, and against a production CAN ECU on a bench harness. docs/PROTOCOL.md §5, §8 and §11 carry the evidence.

Fixed

  • Receive queue lost data under sustained traffic. A raw CAN channel left unread for 30 s at 50 frames/s kept 64 messages and dropped 1,438 (reported as ERR_BUFFER_OVERFLOW); Tactrix's DLL kept them all. The queue is now a 1 MiB ring per channel storing each message at its own size (~35,000 CAN frames). Re-measured: 1,503 frames over 30 s, no gap. Request/response diagnostics were never affected.
  • PassThruConnect(SCI_A_ENGINE) opened ISO9141 on the L line and reported success. Firmware channels 7–9 are not SCI. SCI, J1850 and unknown protocol ids are now refused with ERR_INVALID_PROTOCOL_ID and nothing sent, as Tactrix's DLL refuses them.
  • Periodic messages: 10 per channel (J2534-1's minimum and the firmware's limit); was 8 in total.
  • READ_PROG_VOLTAGE reads the pin pInput points to, as Tactrix's DLL does (8, 12, 16, or 17 for the adjustable supply); pin 12 when pInput is NULL.

Added

  • J2534-2 channels: ISO9141_L / ISO14230_L (L line, firmware channels 7/8) and ISO9141_INNO (RS-232 receive on the 2.5 mm jack, channel 9), plus the _CH1 aliases of the J2534-1 protocols. Opened exactly as Tactrix's DLL opens them; no L-line or Innovate data measured yet.
  • TX_PARAM_STOP_BITS (0x9000) defined; the firmware honours it on channels 3 and 9.

Changed

  • SNIFF_MODE is refused with ERR_NOT_SUPPORTED. The firmware accepts it and still acknowledges: a sniffing channel alone with an ECU transmitted and was acknowledged, including with Tactrix's own SNIFF_MODE | CAN_ID_BOTH.
  • Programming voltage rules, from measurement:
    • the cable accepts 5000–20000 mV (not 5–25 V);
    • all voltage pins share one supply, so a voltage on a second pin while another holds one returns ERR_EXCEEDED_LIMIT;
    • SHORT_TO_GROUND is refused on K (pin 7) under an open K-line channel and on L (pin 15) under an L-line channel, and such a channel will not open on a pin this session grounded;
    • VOLTAGE_OFF and SHORT_TO_GROUND go on the wire signed (-1/-2), as Tactrix sends them.
  • Periodic messages stay host-scheduled: a firmware periodic kept transmitting after the application was killed.

Protocol documentation

  • Pin table corrected: pin 12 is an ADC input and the 2.5 mm jack's tip (a plug disconnects it from the vehicle), pin 17 is the adjustable supply. Pin 0 drives pin 12 while no plug is inserted.
  • ata/atz switch every voltage output off and stop firmware periodics.
  • The A/B harness rebuilds a stale Docker image and no longer hangs after a run.