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/ediabasx-ediabas

v0.2.1

Published

Main EdiabasX library: load BMW PRG/GRP files, run BEST2 jobs against a configured transport, get back grouped result sets.

Readme

@emdzej/ediabasx-ediabas

Main library for the EdiabasX project. Load a BMW PRG/GRP file, run BEST2 jobs against a configured transport, get back grouped result sets — the high-level entry point that most consumers want.

Install

pnpm add @emdzej/ediabasx-ediabas

For real hardware, pair it with one of:

pnpm add @emdzej/ediabasx-interfaces           # factory for all transports
# or pick directly:
pnpm add @emdzej/ediabasx-interface-serial
pnpm add @emdzej/ediabasx-interface-enet

Usage

import { Ediabas } from "@emdzej/ediabasx-ediabas";
import { createInterface } from "@emdzej/ediabasx-interfaces";

const transport = createInterface("kdcan", {
  port: "/dev/cu.usbserial-A50285BI",
  baudRate: 9600,
  protocol: "isotp",
});

const ediabas = new Ediabas({ ecuPath: "./ecu", transport });

await ediabas.loadSgbd("MS430DS0.prg");
await ediabas.connect();
const sets = await ediabas.executeJob("FS_LESEN");
await ediabas.disconnect();

// `sets` is EdiabasJobResult[][] — one entry per result set emitted by
// the bytecode. Multi-record jobs like FS_LESEN return one set per fault
// record, plus a trailing JOB_STATUS set.
for (const [i, set] of sets.entries()) {
  console.log(`Set ${i + 1}/${sets.length}`);
  for (const r of set) console.log(`  ${r.name} (${r.type}) = ${r.value}`);
}

Simulation (no hardware)

const ediabas = new Ediabas({ ecuPath: "./ecu", simulation: true });
await ediabas.loadSgbd("D_MOTOR.prg");
const sets = await ediabas.executeJob("IDENT");

Config file

createFromConfigFile() accepts the same schema the CLI uses (~/.config/ediabasx/config.json):

{
  "version": 1,
  "interface": {
    "type": "kdcan",
    "kdcan": {
      "port": "/dev/cu.usbserial-A50285BI",
      "baudRate": 9600,
      "protocol": "isotp"
    }
  },
  "paths": { "sgbd": "./ecu" },
  "timeouts": { "connect": 5000, "response": 2000 }
}
import { createFromConfigFile } from "@emdzej/ediabasx-ediabas";
const ediabas = await createFromConfigFile("./ediabas.config.json");

What you get

  • loadSgbd(filename) — parse a PRG/GRP file from ecuPath
  • executeJob(name, { params }) — run a BEST2 job, get all emitted result sets
  • connect() / disconnect() — transport lifecycle
  • getJobs() / getJob(name) — job introspection
  • Auto-runs the SGBD's INITIALISIERUNG bootstrap on the first job (mirrors EDIABAS host behaviour)

License

PolyForm Noncommercial 1.0.0.