Comparing version 0.4.0 to 0.4.1
{ | ||
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
392754
89
283
175
1
2
+ Addednan@2.20.0(transitive)
- Removednan@1.9.0(transitive)
Updatednan@^2.0.9