1.0.1 • Published 5 months ago

rfid-stream v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

RFID-Stream

A simple parser of rfid from card readers that acts like a keyboard. Inspired from node-hid-stream and node-hid.

Install

Make sure node-hid can be installed before installing this.

npm i rfid-stream

How to use

const { RFIDStream } = require("rfid-stream");

const devices = RFIDStream.listDevices();

console.log(devices); // check the vendorId, productId, and path from here

const device = new RFIDStream({ vendorId: 6790, productId: 56577 });

device.on("data", (data) => {
  console.log("data", data); // outpus "data 3890523184"
});

device.on("error", (err) => {
  console.log("error", err);
});

Limitations

Refer to node-hid limitations to see what devices cannot be read. In general, It's easier to read from linux than other OS.

1.0.1

5 months ago

1.0.0

5 months ago