npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@emdzej/j2534-driver

v0.3.0

Published

J2534Device — full SAE J2534 PassThru API implementation for Tactrix OpenPort 2.0. Supports CAN (11/29-bit), ISO 15765 (ISO-TP / UDS), ISO 9141 (K-line slow init) and ISO 14230 (KWP2000 fast init). Transport-agnostic — pair with @emdzej/j2534-serial, @emd

Downloads

907

Readme

@emdzej/j2534-driver

The J2534Device class — full SAE J2534 PassThru API implementation for the Tactrix OpenPort 2.0. Supports CAN (11/29-bit), ISO 15765 (ISO-TP / UDS), ISO 9141 (K-line slow init), and ISO 14230 (KWP2000 fast init).

Transport-agnostic: pair with one of the @emdzej/j2534-*-transport packages depending on runtime (Node serial / Node USB / Web Serial / WebUSB).

Install

npm install @emdzej/j2534-driver @emdzej/j2534-serial

Use (Node.js, serial transport)

import { J2534Device } from '@emdzej/j2534-driver';
import { createSerialTransport } from '@emdzej/j2534-serial';
import { Protocol, ConnectFlag } from '@emdzej/j2534-types';

const transport = await createSerialTransport(); // auto-detect OpenPort
const dev = new J2534Device(transport);
await dev.open();

const channel = await dev.connect(Protocol.ISO15765, 0, 500_000);
await dev.writeMsgs(channel, [{ data: Uint8Array.of(0x22, 0xf1, 0x90) }]);
const responses = await dev.readMsgs(channel, 1, 1000);
console.log(responses);

await dev.disconnect(channel);
await dev.close();

Slow-ECU support

Older K-line ECUs (BMW instrument cluster, IKE, body modules) read from EEPROM, which can take 50–200 ms before they start responding. The OpenPort 2.0 firmware silently drops responses that arrive after an internal short timeout unless the att transmit command carries an explicit timeoutMicros field — which the Tactrix reference DLL always emits. As of 0.2.0, passThruWriteMsgs propagates the J2534 Timeout argument into the firmware command (ms → µs, default 1 s for K-line). If your first exchange works but the second times out empty, this is the fix.

For DS2-style sessions, also enforce the SGBD's ParRegenTime host-side — wait regenTimeMs - elapsed ms before issuing the next TX. The firmware's J2534 P3_MIN handling appears insufficient for slow ECUs; host-side gating mirrors the Ds2Session pattern in @emdzej/ediabasx-interface-serial.

Debugging

J2534_RAW_TRACE=1 dumps every raw-byte chunk received from the device transport to stderr — useful for telling "device sent nothing" apart from "device sent a frame our K-line assembler dropped".

See also

License

MIT