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

esp-idf-provisioning-web

v0.0.5

Published

ESP-IDF WiFi Provisioning SDK for web browsers

Downloads

230

Readme

ESP-IDF Provisioning Web SDK

A TypeScript SDK for provisioning ESP32 devices from web browsers using the ESP-IDF provisioning protocol. Supports both BLE (Web Bluetooth) and SoftAP (HTTP) transport modes.

Features

  • [ ] Multiple Security Modes
    • [ ] Security1 (not implemented)
    • [ ] Security2 (not implemented)
  • [x] BLE Transport: Uses Web Bluetooth API for wireless provisioning
  • [x] SoftAP Transport: HTTP-based provisioning for devices in AP mode
  • [x] Provisioning Protocol: Supports ESP-IDF provisioning protocol for WiFi credentials
    • [x] Scan APs
    • [x] Provision device status monitoring
    • [ ] Reset and re-provisioning
    • [x] Custom endpoints

Browser Compatibility

  • BLE Mode: Requires browsers with Web Bluetooth API support (Chrome, Edge, Opera)
  • SoftAP Mode: Works in all modern browsers (user must manually connect to WiFi)

Installation

npm install esp-idf-provisioning-web

Usage

BLE Provisioning

import { ESPProvisionManager } from 'esp-idf-provisioning-web';

// Search for devices with BLE
const device = await ESPProvisionManager.searchBLEDevice();

// Connect with proof of possession
await device.connect();

// Scan for WiFi networks
const wifiList = await device.scanWifiList();

// Provision the device
await device.provision('MyWiFiSSID', 'MyWiFiPassword');

// Wait for STA connected
let result;
do {
  result = await device.fetchWifiStatus();
  await new Promise((resolve) => setTimeout(resolve, 2000));
} while (result.staState !== ESPWifiStaState.connecting);

if (result.staState === ESPWifiStaState.connected) {
  console.log('Provisioning successful!');
} else {
  console.log('Provisioning failed:', result);
}

// Disconnect
device.disconnect();

SoftAP Provisioning

Important: The browser cannot automatically connect to WiFi networks. Users must manually connect to the ESP device's access point before running this code.

import { ESPProvisionManager } from 'esp-idf-provisioning-web';

// Create device instance for SoftAP
// User should already be connected to the device's WiFi network
const device = ESPProvisionManager.createSoftAPDevice(new URL('http://192.168.4.1'));

// Connect and provision
await device.connect();
await device.provision('MyWiFiSSID', 'MyWiFiPassword');

Check Bluetooth Support

// Check if Web Bluetooth is available
if (ESPProvisionManager.isBluetoothSupported()) {
  const isAvailable = await ESPProvisionManager.getBluetoothAvailability();
  console.log('Bluetooth available:', isAvailable);
}

Browser Limitations

BLE Mode

  • Requires user interaction (button click) to initiate device scanning
  • User must manually select device from browser's device picker
  • HTTPS or localhost required for Web Bluetooth API
  • Service UUID must be filled in optionalServiceUUIDs for some browsers

SoftAP Mode

  • Browser cannot connect to WiFi networks programmatically
  • User must manually connect to ESP device's access point
  • CORS may need to be configured on the ESP device
  • May not work on all networks due to browser security restrictions

Development

# Install dependencies
npm install

# Build
npm run build

# Lint
npm run lint

# Format
npm run format

License

MIT

References