Repository navigation
Releases
0.5.0
New
- Windows support:
openport-j2534-32.dllandopenport-j2534-64.dll, built with MinGW-w64. Each DLL is a single file. A release attaches both inopenport-j2534-<version>-windows.zip. - The DLLs export the 14
__stdcallfunctions under their plain names, with the ordinals Tactrix's DLL uses. regsvr32registers a DLL with the protocol entries Tactrix's installer writes.regsvr32 /uremoves it, and removes the sharedPassThruSupport.04.04key 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.exeshows 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_CONNECTEDwith the cable still attached. It now returnsERR_TIMEOUT, as Tactrix's DLL does. PassThruWriteMsgswith aTimeoutof 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,
PassThruClosenow releases the exclusive lock on a serial device that another process also holds open, such as a simulator's pty. Before, the nextPassThruOpenreturnedERR_DEVICE_IN_USE.
v0.4.2
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=usbselects 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 ofop_smokefailed this way; 0 of 40 fail now. -
PassThruReadVersioncould 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.dyliband the examples carry the checkout's rpath;make installgives the installed copy its own path, as before.
Source tarball SHA-256: c1b925d69cb2e2603b36c272a5d14197a7422513d04fbf1ee684fb1e1a487476
v0.4.1
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)".
PassThruOpennow returnsERR_DEVICE_NOT_CONNECTEDwith "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
Fixes
- A cable that disappears mid-session now fails every later call at once with
ERR_DEVICE_NOT_CONNECTEDinstead 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. PassThruCloseon 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_BUFFERemptied the receive queue. There is no transmit queue to clear; it now leaves received messages alone.- A five-baud init whose
arwreply carried no sequence number timed out. Both forms are accepted, and an init reply is matched to the command by kind: a latearyorarwcan no longer be taken as the answer to whatever command came next. - With
LOOPBACKon a K-line channel, the echo was preceded by an emptyTX_DONEindication. It is now aSTART_OF_MESSAGEindication, as Tactrix's driver delivers it, followed by the echoed message markedTX_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.
PassThruGetLastErrorhad no text after a failedREAD_VBATTorREAD_PROG_VOLTAGE, and lost the specific reason (a size range, a dead K-line) behind the entry point's generic one. The cable'sERR_OEM_VOLTAGE_*codes are named; a code with no name is reported by number.- A
PassThruConnectthat 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
ProtocolIDis not the channel's protocol is refused withERR_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'sProtocolIDis 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) returnsERR_CHANNEL_IN_USEwithout asking the cable, which answersare 3; a periodic message with an interval of 0, which the cable accepts and never sends, returnsERR_INVALID_TIME_INTERVAL;FIVE_BAUD_INITwithout an output array returnsERR_NULL_PARAMETERbefore anything reaches the bus. PassThruClosereturns the reset's failure code whenatzdid not reach the cable, since a pin may still carry voltage. The session is torn down either way.PassThruReadMsgswaits 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 bit0x04, 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 a0x10frame there is data; aTimeoutof 0 gives a raw CAN frame a 50 ms bus budget and a jack transmit none; a stale numberedaryorarwis discarded. A frame with status bit0x08, which the vendor driver would drop and whose meaning is unmeasured, is delivered and logged. PassThruOpenafter a lost cable closes the dead session itself, so an application need not callPassThruClosefirst;PassThruReadVersionreports the loss like every other call.- Protocol notes:
atxandatp 5 2are 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 byPassThruGetLastErrorinstead of "no OpenPort found".
Source tarball SHA-256: 8c810836df20c88726413dc546a2672ed71cd80097166271d2784cff247c5991
v0.3.2
The library is unchanged apart from its version number.
tools/car/car_capture.pychecks the cable's K-line before any wake-up by sending one request withLOOPBACKon and comparing the echo, adds aFIVE_BAUD_MOD3 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
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.mdlists every difference from Tactrix's driver in one place, grouped by kind.
Source tarball SHA-256: 9de809b21a5b95b52e4fc108e94742a485ea7600553b7512e9446e118fac8344
v0.3.0
Fixes
CLEAR_MSG_FILTERScould 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, andCLEAR_PERIODIC_MSGSdoes the same for periodic messages.- With
LOOPBACKon an ISO 15765 channel, the echoes of your own transmissions were dropped. They are now delivered, as Tactrix's driver delivers them. PassThruGetLastErrornamesERR_INIT_FAILEDinstead of calling itERR_UNKNOWN.
Changes, to match Tactrix's driver
GET_CONFIGandSET_CONFIGprocess 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
PassThruStartPeriodicMsgchecks the message size the wayPassThruWriteMsgsdoes. 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
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 usenanosleepnow. The library itself was unaffected. - The Makefile passed the Darwin-only
-archflag to the sanitizer and fuzz targets on every platform.diff-tools, whoseusbtapis aDYLD_INSERT_LIBRARIESinterposer, 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_acmdriver 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.shfinds/dev/ttyACM*, exportsLD_LIBRARY_PATH, buildsdiff-toolson 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
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 nextPassThruOpen, which resets the cable. - TxDone indications carry the CAN id of the message just sent:
DataSize4,ExtraDataIndex0 (J2534-1 DEC2004 §8.6), as the vendor DLL reports them. 0.1.x reportedDataSize0. SNIFF_MODEis passed through to the firmware instead of refused; Tactrix's owncanloggersample connects. The firmware still acknowledges frames (PROTOCOL.md§10).- The
OPENPORT_ENABLE_PROG_VOLTAGEgate is removed.PassThruSetProgrammingVoltageapplies what it is asked, as with the vendor driver. A voltage on a second pin while one holds a voltage is refused withERR_PIN_INVALID(wasERR_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
PassThruOpenor afterPassThruClosereturnsERR_INVALID_DEVICE_ID(J2534-1 §7.2.1); 0.1.x returnedERR_DEVICE_NOT_CONNECTED. - ISO15765 transmit size limits follow J2534-1 Figure 42 (minimum 4 bytes, 5 with extended addressing).
Fixed
PassThruCloseon one thread whilePassThruReadMsgswaits on another: the read returnsERR_INVALID_DEVICE_IDat once instead of spinning out its timeout over destroyed synchronisation objects.- A
WriteMsgsTimeout above 71 minutes wrapped the firmware's microsecond transmit budget; it saturates now. GET_CONFIG/SET_CONFIGerrors from the device set thePassThruGetLastErrortext.- Open sends the vendor's
\r\n\r\npreamble, which terminates a partial line left by a crashed session, and requiresatato answeraro. tests/differential/diff_runner.candexamples/op_smokesendVOLTAGE_OFFrather 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.mdrewritten: 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
atpsweep is removed (atpis 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
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 withERR_INVALID_PROTOCOL_IDand 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_VOLTAGEreads the pinpInputpoints to, as Tactrix's DLL does (8, 12, 16, or 17 for the adjustable supply); pin 12 whenpInputis NULL.
Added
- J2534-2 channels:
ISO9141_L/ISO14230_L(L line, firmware channels 7/8) andISO9141_INNO(RS-232 receive on the 2.5 mm jack, channel 9), plus the_CH1aliases 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_MODEis refused withERR_NOT_SUPPORTED. The firmware accepts it and still acknowledges: a sniffing channel alone with an ECU transmitted and was acknowledged, including with Tactrix's ownSNIFF_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_GROUNDis 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_OFFandSHORT_TO_GROUNDgo 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/atzswitch every voltage output off and stop firmware periodics.- The A/B harness rebuilds a stale Docker image and no longer hangs after a run.