LibUsb for Linux
Download Source Code: sourceforge
$ apt-get install libudev-dev
$ ./configure
$ make
Download Example
https://github.com/libusb/libusb/tree/master/examples
Download Hot-Plug Example
CD /libusb-1.0.20/examples/
# make
# listdevs
get usb vendor_id and product_id
update hotplugtest.c
line 75, 78 Update vendor_id and product_id
# ./hotplugtest
http://libusb.sourceforge.net/api-1.0/hotplug.html
CD /libusb-1.0.20/examples/
# make
# listdevs
get usb vendor_id and product_id
update hotplugtest.c
line 75, 78 Update vendor_id and product_id
# ./hotplugtest
http://libusb.sourceforge.net/api-1.0/hotplug.html
但是那個 LIBUSB_HOTPLUG_PRODUCTID_ANY 怎測試都失敗
沒有留言:
張貼留言