somebuddy87 / node-red-contrib-usbhid

A node-hid (USB HID device access library) wrapper for nodered
Apache License 2.0
4 stars 19 forks source link

Installation issue on Raspberry Pi 2B #1

Open anwarbashir opened 7 years ago

anwarbashir commented 7 years ago

Hi, I have installed on Raspberry Pi 2B using instructions including node-hid. I have the nodes available in node-red. The GETHIDDevices seems to be working fine. I receive the vendorid and productid. But when I use these details to configure HIDDevice I get TypeError: Cannot read property 'on' of undefined. Any idea why?

somebuddy87 commented 7 years ago

i will try the node with a new node-red and nodejs version in a few days. Maybe a version conflict

jewendt commented 6 years ago

Tried on Raspberry PI 3B but I get the following error when trying to install. Any thoughts?

ntering directory '/home/pi/.node-red/node_modules/node-red-contrib-usbhid/node_modules/node-hid/build' CC(target) Release/obj.target/hidapi/hidapi/libusb/hid.o ../hidapi/libusb/hid.c:47:20: fatal error: libusb.h: No such file or directory

include

                ^

compilation terminated. hidapi.target.mk:95: recipe for target 'Release/obj.target/hidapi/hidapi/libusb/hid.o' failed make: *** [Release/obj.target/hidapi/hidapi/libusb/hid.o] Error 1 make: Leaving directory '/home/pi/.node-red/node_modules/node-red-contrib-usbhid/node_modules/node-hid/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/share/node-gyp/lib/build.js:276:23) gyp ERR! stack at emitTwo (events.js:126:13) gyp ERR! stack at ChildProcess.emit (events.js:214:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) gyp ERR! System Linux 4.14.34-v7+ gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild" gyp ERR! cwd /home/pi/.node-red/node_modules/node-red-contrib-usbhid/node_modules/node-hid gyp ERR! node -v v8.11.1 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok npm WARN This failure might be due to the use of legacy binary "node" npm WARN For further explanations, please read /usr/share/doc/nodejs/README.Debian

npm ERR! node-hid@0.5.7 install: prebuild-install || node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-hid@0.5.7 install script. npm ERR! This is most likely a problem with the node-hid package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! prebuild-install || node-gyp rebuild npm ERR! You can get their info via: npm ERR! npm owner ls node-hid npm ERR! There is likely additional logging output above.

npm ERR! System Linux 4.14.34-v7+ npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "node-red-contrib-usbhid" npm ERR! cwd /home/pi/.node-red npm ERR! node -v v8.11.1 npm ERR! npm -v 1.4.21 npm ERR! code ELIFECYCLE npm ERR! npm ERR! Additional logging details can be found in: npm ERR! /home/pi/.node-red/npm-debug.log npm ERR! not ok code 0

pkgithub83 commented 5 years ago

Hi, I have installed on Raspberry Pi 2B using instructions including node-hid. I have the nodes available in node-red. The GETHIDDevices seems to be working fine. I receive the vendorid and productid. But when I use these details to configure HIDDevice I get TypeError: Cannot read property 'on' of undefined. Any idea why?

Same here, does anyone managed to find out what was the issue? I am using Nore-RED v1.0.2 and Node.js v10.17.0 and I am using RPI4B. getHIDdevice node is working without a problem but configured HIDdevice with the PID and VID does not work. Remain disconnected. What I noticed was logged error each time I rebooted the RPI, [2.295221] usbhid 1-1.3:1.1: couldn't find an input interrupt endpoint

Below are the list of the versions that work perfectly for my RPI3B NodeJS v8.12.0 Node-RED v0.19.4 node-hid v0.5.1

Below are the list of the versions that the HIDdevice does not work for my RPI4B NodeJS v10.17.0 Node-RED v1.0.2 node-hid v0.8.0

pkgithub83 commented 5 years ago

Hi, I have installed on Raspberry Pi 2B using instructions including node-hid. I have the nodes available in node-red. The GETHIDDevices seems to be working fine. I receive the vendorid and productid. But when I use these details to configure HIDDevice I get TypeError: Cannot read property 'on' of undefined. Any idea why?

Same here, does anyone managed to find out what was the issue? I am using Nore-RED v1.0.2 and Node.js v10.17.0 and I am using RPI4B. getHIDdevice node is working without a problem but configured HIDdevice with the PID and VID does not work. Remain disconnected. What I noticed was logged error each time I rebooted the RPI, [2.295221] usbhid 1-1.3:1.1: couldn't find an input interrupt endpoint

Below are the list of the versions that work perfectly for my RPI3B NodeJS v8.12.0 Node-RED v0.19.4 node-hid v0.5.1

Below are the list of the versions that the HIDdevice does not work for my RPI4B NodeJS v10.17.0 Node-RED v1.0.2 node-hid v0.8.0

I think I have found the solution. The problem should be the nodehid.js in the node-hid module. I copied the nodehid.js from my RPI3B and replaced the nodehid.js in RPI4B and now it worked! Thank you.