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

@embedded32/can

v1.0.1

Published

CAN bus abstraction for Embedded32 with mock, virtual, and SocketCAN drivers

Readme

@embedded32/can

Driver-agnostic CAN frame I/O for Embedded32 - mock, virtual, and SocketCAN backends for labs and production prototyping on Linux.

Installation

npm install @embedded32/can

Minimum runnable example

Hardware-free (works on any OS):

import { CANInterface, MockCANDriver } from '@embedded32/can';

const can = new CANInterface(new MockCANDriver());

can.onMessage((frame) => {
  console.log('RX', frame.id.toString(16), frame.data);
  can.close();
});

can.send({ id: 0x123, data: [1, 2, 3], extended: false });

From monorepo root: npx tsx embedded32-can/examples/basic-mock.ts (after npm run build).

Public API overview

| Export | Role | | ------------------------ | ----------------------------------------- | | CANInterface | Send/receive wrapper around a driver | | MockCANDriver | In-memory driver for tests and examples | | SocketCANDriver | Linux SocketCAN (vcan0, can0) | | VirtualCANPort | Connect multiple peers on one virtual bus | | ICANDriver, CANFrame | Types for custom drivers |

J1939 parsing lives in @embedded32/j1939, not this package.

Runtime requirements

  • Node.js 18+
  • ESM (import) or bundler that resolves package exports

Hardware requirements

| Mode | Hardware | | -------------- | ---------------------------------------------------------------------------- | | Mock / virtual | None | | SocketCAN | Linux or WSL with vcan/can interface and optional socketcan npm module |

Browser compatibility

Node.js only. CAN hardware is not available in normal browser environments. Use simulation packages or the browser demo on the docs site.

Common errors

| Error | Fix | | -------------------------------------- | ------------------------------------------------------------ | | Cannot find module '@embedded32/can' | Run npm run build in monorepo or install published tarball | | SocketCAN open fails | Create vcan0 (sudo ip link add dev vcan0 type vcan) | | J1939 frames not decoded | Use extended: true and decode with @embedded32/j1939 |

Related packages

  • @embedded32/j1939 - parse and decode J1939 frames
  • @embedded32/sim - multi-ECU simulation on a virtual bus
  • @embedded32/tools - terminal monitor and simulate commands

Version compatibility

Align all @embedded32/* dependencies to 1.0.0 when installing from npm. Monorepo clones use workspace linking automatically.

License

MIT © Mukesh Mani Tripathi