
Product
Introducing Pull Request Stories to Help Security Teams Track Supply Chain Risks
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
bluetooth-obd
Advanced tools
This node module lets you communicate over a bluetooth serial port with OBD-II ELM327 Connectors using Node.js.
$ sudo apt-get install libbluetooth-dev
npm install bluetooth-obd
var OBDReader = require('bluetooth-obd');
var btOBDReader = new OBDReader();
var dataReceivedMarker = {};
btOBDReader.on('connected', function () {
//this.requestValueByName("vss"); //vss = vehicle speed sensor
this.addPoller("vss");
this.addPoller("rpm");
this.addPoller("temp");
this.addPoller("load_pct");
this.addPoller("map");
this.addPoller("frp");
this.startPolling(1000); //Request all values each second.
});
btOBDReader.on('dataReceived', function (data) {
console.log(data);
dataReceivedMarker = data;
});
// Use first device with 'obd' in the name
btOBDReader.autoconnect('obd');
Emitted when data is read from the OBD-II connector.
Emitted when the connection is set up (port is open).
Emitted when an error is encountered.
Emitted with debugging information.
Creates an instance of OBDReader.
Find a PID-value by name.
Parses a hexadecimal string to a reply object. Uses PIDS. (obdInfo.js)
Attempt discovery of the device based on a query string, and call connect() on the first match.
Connect/Open the serial port and add events to serialport. Also starts the intervalWriter that is used to write the queue.
Disconnects/closes the port.
Writes a message to the port. (Queued!) All write functions call this function.
Writes a PID value by entering a pid supported name.
Adds a poller to the poller-array.
Removes an poller.
Removes all pollers.
Writes all active pollers.
Starts polling. Lower interval than activePollers * 50 will probably give buffer overflows.
Stops polling.
This module is available under a Apache 2.0 license, see also the LICENSE file for details.
FAQs
Package for communicating with a bluetooth OBD-II reader
The npm package bluetooth-obd receives a total of 8 weekly downloads. As such, bluetooth-obd popularity was classified as not popular.
We found that bluetooth-obd demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket’s new Pull Request Stories give security teams clear visibility into dependency risks and outcomes across scanned pull requests.
Research
/Security News
npm author Qix’s account was compromised, with malicious versions of popular packages like chalk-template, color-convert, and strip-ansi published.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.