Nascent Plasticine Materialist

    node-usb-cardreader

    1.0.2 • Public • Published

    node-usb-cardreader

    A NodeJS module to USB Card Reader

    Github

    Open source with a Github repository

    Quick-start

    $ npm i node-usb-cardreader
     
     
    const USBCardReader = require('node-usb-cardreader')
     
     
     
    //Default options
    const options = {
        onRead: console.log, //function to be called
        onError: console.log, //function to be called
        onConnection: console.log, //function to be called
        idVendor: 0, // Mandatory to connect 
        idProduct: 0, // Mandatory to connect
        lowerCase: true
    }
     
    let reader = new USBCardReader({ idVendor: 1204, idProduct: 4623 });
     
    console.log(reader.getDeviceList(true))
     

    Building

    Dependecy
    usb

    Features

    • getDeviceList - List all USB devices connecteds
    • findDeviceByIds - Get an especific device using idVendor and idProduct

    Information

    If you are on Windows you must install WinUSB driver Zadig This project use USB Library for Node USB

    Todos

    • Tests

    License

    MIT

    Install

    npm i node-usb-cardreader

    DownloadsWeekly Downloads

    3

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    4.5 kB

    Total Files

    4

    Last publish

    Collaborators

    • leandro_marques