Socket
Socket
Sign inDemoInstall

node-hid

Package Overview
Dependencies
Maintainers
5
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-hid - npm Package Compare versions

Comparing version 0.4.0 to 0.4.1

src/test-ps3-tod.js

6

package.json
{
"name": "node-hid",
"description": "USB HID device access library",
"version": "0.4.0",
"version": "0.4.1",
"author": {

@@ -15,3 +15,3 @@ "name": "Hans Hübner",

"type": "git",
"url": "git://github.com/hanshuebner/node-hid.git"
"url": "git://github.com/node-hid/node-hid.git"
},

@@ -27,5 +27,5 @@ "scripts": {

"dependencies": {
"nan": "^1.2.0"
"nan": "^2.0.9"
},
"devDependencies": {}
}
# node-hid - Access USB HID devices from node.js #
## Installation
```
npm install node-hid
```
### Prerequisites:
* Mac OS (I use 10.6.8) or Linux (kernel 2.6+) or Windows XP+
* node.js v0.8
* Mac OS X 10.8, Linux (kernel 2.6+), and Windows XP+
* Node.js v4.x+ (use node-hid v0.4.0 for Node 0.12.7)
* libudev-dev (Linux only)

@@ -13,3 +16,3 @@ * libusb-1.0-0-dev (Ubuntu versions missing `libusb.h` only)

### Compile from source on Linux or OSX
### Compile from source for development

@@ -23,5 +26,6 @@ To develop locally you'll need the following commands:

### Compile from source on Windows
#### Compiling on Windows
Use node-gyp to compile the extension.
Be sure node-gyp is present to compile the extension.
You will need MSVC 2012 or equivalent.

@@ -35,4 +39,4 @@ Please note that Windows support is incomplete and needs some work

In the ```src/``` directory, various JavaScript programs can be found
that talk to specific devices in some way. The ```show-devices.js```
In the `src/` directory, various JavaScript programs can be found
that talk to specific devices in some way. The `show-devices.js`
program can be used to display all HID devices in the system.

@@ -54,6 +58,6 @@

devices will contain an array of objects, one for each HID device
available. Of particular interest are the ```vendorId``` and
```productId```, as they uniquely identify a device, and the
```path```, which is needed to open a particular device.
`devices` will contain an array of objects, one for each HID device
available. Of particular interest are the `vendorId` and
`productId`, as they uniquely identify a device, and the
`path`, which is needed to open a particular device.

@@ -90,3 +94,3 @@ Here is some sample output:

```device``` will contain a handle to the device. The ```path``` can
`device` will contain a handle to the device. The `path` can
be determined by a prior HID.devices() call. If an error occurs

@@ -121,8 +125,5 @@ opening the device, an exception will be thrown.

### Support
#### Sending Feature report
To send to a particular HID feature report, include report_id as first byte of array.
I can only provide limited support, in particular for operating
systems and devices that I don't know. Please use the
[node-hid Google Group](https://groups.google.com/d/forum/node-hid)
for general support inquiries (node-hid@googlegroups.com).

@@ -167,1 +168,14 @@ ## Complete API

`callback` is of the form `callback(err, data)`
### device.sendFeatureReport(data)
- `data` - data of HID feature report, with 0th byte being report_id (`[report_id,...]`)
### device.getFeatureReport(report_id, report_length)
- `report_id` - HID feature report id to get
- `report_length` - length of report
## Support
Please use the [node-hid github issues page](https://github.com/node-hid/node-hid/issues)
for support questions and issues.

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc