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

bare-bluetooth-linux

v0.7.0

Published

BlueZ D-Bus bindings for Bare

Readme

bare-bluetooth-linux

Linux bluetooth bindings for Bare

Testing

npm test

Runs the suite against the machine's own controller. Bluetooth must be on: the suite stops immediately with a message rather than failing test by test. Tests needing real hardware skip themselves under CI.

L2CAP over virtual controllers

test/l2cap-vhci.js exercises both ends of an L2CAP channel without radio hardware, using two btvirt controllers wired together. It needs root, so it runs through a helper:

sh test/vhci-run.sh test/l2cap-vhci.js

btvirt comes from the BlueZ sources and most distributions do not ship it. Debian and Ubuntu have it in bluez-test-tools; on Arch you have to build it yourself. Set BTVIRT if it lands somewhere unusual.

If a run is interrupted, btvirt can survive and leave its controllers behind. They pile up across runs and confuse BlueZ, so check with bluetoothctl list and kill any leftover process before blaming the tests.

The GATT server needs a real central

For the GATT server, the pairing agent and the request options are checked by hand, against a phone:

bare test/manual-gatt.js

The script walks you through it. It first lists the bonds this machine still holds and offers to forget one, then publishes a Heart Rate service and prints the five steps to follow on the phone. Each step ticks off what it observes - the agent answering a pairing, the subscription, the read, the write, the device path carried in the request options - and it prints its own summary once all seven are seen:

  [ok] central connected  -- 6F:15:84:82:41:E7   (1/7)
  [ok] agent answered a pairing request  -- authorization   (2/7)
  ...
all 7 checks observed, the gatt server works end to end

You need a BLE explorer on the phone: nRF Connect or LightBlue, both free.

Clear the bond on both sides before a run. A bond forgotten on one side only leaves the other holding keys the peer no longer has, and every later pairing fails with no useful error. Use the script to remove the bond on Linux side. Do it manually on the phone side. Phones also cache the GATT service list per peripheral and never re-read it, so a stale bond will have you staring at a service tree from a previous session, wondering why your changes do nothing.