tessel / openwrt-tessel

OpenWrt build scripts and package feed for Tessel 2
Other
32 stars 14 forks source link

Need libudev to use Node `usb` module #36

Open johnnyman727 opened 8 years ago

johnnyman727 commented 8 years ago

In the case that a user would like to use the usb module to interact with USB devices, OpenWRT will need libudev installed. It currently does not.

This thread gives a hint of how to do that.

kevinmehall commented 8 years ago

You can compile libusb to not use udev, which disables libusb's support for hotplug events. I would assume the libusb packages in OpenWrt are compiled that way, so you need to compile node-usb with use_system_libusb = true so that it doesn't bring its own copy of libusb.

Or, install udev.

johnnyman727 commented 8 years ago

Thanks for the suggestion, @kevinmehall.

@tcr I think we may need to make a modification to t2-compiler for this one. After updating the use_system_libusb var as Kevin suggested, the install fails because it can't find pkg-config and libusb. Our OpenWRT build definitely has libusb installed so I think when we attempt to compile, it's actually searching the compiler VM for libusb instead of the OpenWRT toolchain.

reconbot commented 8 years ago

I'll add to this issue that node-serialport is experimenting with using libudev to detect connected serialports