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/inpax-ediabasx-provider

v0.11.1

Published

EdiabasX provider for INPA interpreter — uses @emdzej/ediabasx-ediabas for real ECU communication.

Readme

@emdzej/inpax-ediabasx-provider

EdiabasX provider for the INPA interpreter. Binds the 13 INPAapi* system functions to @emdzej/ediabasx-ediabas so INPA scripts run against real BMW ECUs (or its simulation transport).

Installation

npm install @emdzej/inpax-ediabasx-provider

@emdzej/ediabasx-ediabas is a runtime dependency and gets pulled in automatically.

Usage

import { EdiabasXProvider } from '@emdzej/inpax-ediabasx-provider';

// Load from an `ediabas.config.json` (interface + ecu path + timeouts).
const provider = new EdiabasXProvider({
  configFile: './ediabas.config.json',
});

// Or pass an EdiabasX config directly.
const provider = new EdiabasXProvider({
  config: {
    ecuPath: './ecu',
    simulation: false,
  },
});

await provider.init();              // connects according to the config

await provider.job('D_MOTOR', 'IDENT', '', '');
const sets = provider.resultSets();
const ecu  = provider.resultText('ECU', 1, '');
const ok   = provider.checkJobStatus('OKAY');

await provider.end();

INPA → EdiabasX bindings

The provider implements every method @emdzej/inpax-interfaces's IEdiabasProvider requires, mapped to the EdiabasX Ediabas class as follows:

| INPA system function | EdiabasX call | |---|---| | INPAapiInit | new Ediabas(...) / createFromConfigFile(...) + connect() | | INPAapiEnd | disconnect() | | INPAapiJob(ecu, job, arg1, arg2) | loadSgbd(<ecu>.prg) (cached) + executeJob(job, { params: [arg1, arg2] }) | | INPAapiResultSets | length of the last executeJob set array | | INPAapiResultText(name, set, format) | result by name from the 1-based set; format honoured for numeric values via a printf-compatible subset (%d %i %u %o %x %X %f %e %g) | | INPAapiResultInt(name, set) | C-style truncation toward zero | | INPAapiResultAnalog(name, set) | float; parses strings via parseFloat | | INPAapiResultBinary(name, set) | passes Uint8Array through; strings encoded as UTF-8 bytes | | INPAapiResultDigital(name, set) | true for 1, "true", "1", "OKAY", "JA", "YES" | | INPAapiCheckJobStatus(ref) | compares against the captured JOB_STATUS system result from the most recent job | | INPAapiFsLesen(ecu, fileName) | runs the configured fault-storage job (default FS_LESEN), emits fs:complete with the multi-set count | | INPAapiFsLesen2(ecu, fileName) | alias for FsLesen | | INPAapiFsMode(mode, fileMode, preInfo, postInfo, jobName) | overrides the configured fault-storage job name |

Multi-set results (e.g. FS_LESEN with N fault records emitted via the BEST2 enewset opcode, one set per record) are preserved — resultSets() returns N and result*(name, k) reads from the k-th record (1-based).

Configuration

From ediabas.config.json

{
  "version": 1,
  "interface": {
    "type": "kdcan",
    "kdcan": {
      "port": "/dev/cu.usbserial-A50285BI",
      "baudRate": 9600,
      "protocol": "isotp"
    }
  },
  "paths": { "sgbd": "./ecu" }
}

Loaded via @emdzej/ediabasx-ediabas/node's createFromConfigFile().

Direct configuration

const provider = new EdiabasXProvider({
  config: {
    ecuPath: './ecu',     // directory containing .prg / .grp files
    simulation: false,    // pass true for in-memory canned responses
    timeout: 5000,        // ms
    logging: false,
  },
  autoConnect: true,      // false to defer connect() until first job
});

Events

Mirrors the EdiabasEvents map from @emdzej/inpax-interfaces:

  • job:complete{ ecu, job, sets }
  • job:error{ code, message }
  • fs:complete{ ecu, fileName, faultCount }
  • connection:lost / connection:restored
  • busy:changed{ busy, inFlight } — fired every time the in-flight async-call counter (init / end / job / fsLesen / fsLesen2) transitions. busy === inFlight > 0. Pair with isBusy() for the current snapshot. Used by @emdzej/inpax-web-provider's <EdiabasBusyIndicator /> to drive a background-processing UI signal.

Requirements

  • Node.js 18+
  • SGBD/GRP files for the target ECUs in ecuPath
  • Hardware interface (K-line / K+DCAN / ENET) or simulation mode

License

MIT