Skip to content

Prolific PL2303 user-space USB driver for Node.js

License

Notifications You must be signed in to change notification settings

tidepool-org/pl2303

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pl2303

Prolific PL2303 user-space USB to serial adapter driver for Node.js

Usage

const pl2303 = require('pl2303');
const { webusb } = require('usb');

const opts = {
    baudRate : 115200
};

(async () => {
    const device = await webusb.requestDevice({
        filters: [
        {
            vendorId: 1659,
            productId: 8963,
        },
        ],
    });

    let serial = new pl2303(device, opts);

    serial.on('data', data => console.log(data));
    serial.on('ready', () => serial.send(new Buffer('Hello!')));
})().catch((error) => {
    console.log('Error: ', error);
});

About

Prolific PL2303 user-space USB driver for Node.js

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Sponsor this project

Packages

 
 
 

Languages

  • JavaScript 100.0%