New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

serialport-manager

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

serialport-manager

single process manager of transient serialport connections

latest
Source
npmnpm
Version
0.2.3
Version published
Weekly downloads
17
466.67%
Maintainers
1
Weekly downloads
 
Created
Source

serialport-manager

Manage transient serialport connections.

Install

npm install serialport-manager

Use


var spm = require('serialport-manager');

spm(function(err, connection, deviceList) {
  connection.write(deviceList[0].comName + '\n');
  connection.pipe(process.stdout);
});

How does it work

calling spm above performs the following actions:

  • attempt connection to the serialport manager daemon
  • if the connection fails, spawn the daemon
  • reconnect
  • on connection, wait for the device list
  • parse the json device list
  • call the function passed into spm
  • identify what device you want to use by sending back the commName
  • bind to data events or pipe somewhere

Why?

I want plug and play serial devices. I also want them to be accessible by more than one program.

License

MIT

Keywords

serialport

FAQs

Package last updated on 22 Feb 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts