Embedded32 API
    Preparing search index...

    Module @embedded32/sdk-js

    @embedded32/sdk-js

    Stable JavaScript/TypeScript J1939 client SDK for applications that subscribe to PGNs, request data, and send commands over configurable transports.

    npm install @embedded32/sdk-js @embedded32/j1939
    
    import { J1939Client, PGN, SA } from '@embedded32/sdk-js';

    const client = new J1939Client({
    interface: 'virtual',
    sourceAddress: SA.DIAG_TOOL_2,
    transport: 'virtual',
    });

    await client.connect();

    client.onPGN(PGN.EEC1, (msg) => {
    console.log('EEC1', msg.pgnName, msg.spns);
    });

    await client.disconnect();

    See embedded32-sdk-js/examples/basic-j1939.ts in the monorepo.

    Export Role
    J1939Client connect, disconnect, onPGN, requestPGN, sendPGN
    PGN, SA Common parameter group and source-address constants
    J1939ClientConfig, J1939Message Public types

    Not public: @embedded32/sdk-js/internal - may change without notice.

    • Node.js 18+
    • ESM
    • Transport backend (virtual, socketcan, etc.) per config

    virtual transport needs no hardware. socketcan requires Linux CAN interface.

    Virtual transport and decode-only paths are bundled in the site demo (apps/demo, route /demo). SocketCAN is not browser-available.

    Error Fix
    connect() fails on socketcan Check interface name and permissions
    Empty spns object PGN decoder may not cover all fields
    Deep import from /internal Use documented public exports only
    • @embedded32/j1939 - protocol decoding layer
    • @embedded32/can - CAN drivers for socketcan transport
    • @embedded32/bridge - network-fed virtual transports (advanced)

    Public SDK API marked stable at v1.0.0. Pin @embedded32/sdk-js@1.0.0 with @embedded32/j1939@1.0.0.

    MIT © Mukesh Mani Tripathi

    @embedded32/sdk-js
    @embedded32/sdk-js/internal