virtual serialport implementation using web usb as its transport
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
example Upgrade constructor for WebUSB and flush WebUSB output every loop Mar 4, 2018
.gitignore handle write errors Oct 5, 2016 dont check for stored devices, and use newer serialport pattern Nov 21, 2018
index.js fix return Nov 26, 2018
package.json fix return Nov 26, 2018


A virtual node-serialport implementation that uses webusb as the transport.


Use webusb to send/receive data to a USB connected physical device:

var WebusbSerialPort = require('webusb-serial');
var firmata = require('firmata');

//create the webusb serialport and optionally specify a USB filter
var serialPort = new WebusbSerialPort({
  filters: [
    { 'vendorId': 0x2341, 'productId': 0x8036 }, // Arduino Leonardo
    { 'vendorId': 0x2341, 'productId': 0x8037 }, // Arduino Micro
    { 'vendorId': 0x239a, 'productId': 0x8011 } // Adafruit Circuit Playground

//use the virtual serial port to send a command to a firmata device
var board = new firmata.Board(serialPort, function (err, ok) {
  if (err){ throw err; }
  //light up a pin
  board.digitalWrite(13, 1);