libusb-1.0

CMake can't find “FindLibUSB.cmake” in CMAKE_MODULE_PATH despite it being there

风流意气都作罢 提交于 2020-01-24 20:15:49
问题 In my CMakelists.txt file, I specify: set (CMAKE_MODULE_PATH “${<ProjectName>_SOURCE_DIR}/cmake_modules”) And in my project root directory, there's a subdirectory called cmake_modules with a file called FindLibUSB.cmake , but when I run cmake , I get the following error: By not providing "FindLibUSB.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "LibUSB", but CMake did not find one. Why can't it find the file? It seems to me it's

libusb-1.0 - Where does the data go after a successful libusb_bulk_transfer() call?

烈酒焚心 提交于 2020-01-14 06:37:27
问题 I ran the following code sample obtained from a tutorial here: http://www.dreamincode.net/forums/topic/148707-introduction-to-using-libusb-10/ I ran it against a tablet running Android 4 attached via USB to a MacBook Pro running Mac OS X Mountain Lion. The output contained "Writing Successful!" so I assume libusb_bulk_transfer() worked correctly. My question is where did the 4 bytes of data got transferred to? Can I save it to a file on the Android tablet? Thanks for your help! #include

Package libusb was not found in the pkg-config search path

拜拜、爱过 提交于 2020-01-11 11:24:46
问题 I have installed pkg-config and libusb through brew Now if I do pkg-config --cflags --libs libusb I get below message Package libusb was not found in the pkg-config search path. Perhaps you should add the directory containing `libusb.pc' to the PKG_CONFIG_PATH environment variable No package 'libusb' found So I followed this post and did export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/Cellar/libusb/1.0.20/lib/pkgconfig" But I still have the problem. What am I missing? I am using MAC OSX

Package libusb was not found in the pkg-config search path

人盡茶涼 提交于 2020-01-11 11:24:14
问题 I have installed pkg-config and libusb through brew Now if I do pkg-config --cflags --libs libusb I get below message Package libusb was not found in the pkg-config search path. Perhaps you should add the directory containing `libusb.pc' to the PKG_CONFIG_PATH environment variable No package 'libusb' found So I followed this post and did export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/local/Cellar/libusb/1.0.20/lib/pkgconfig" But I still have the problem. What am I missing? I am using MAC OSX

How to set RTS/DTR using libusb?

坚强是说给别人听的谎言 提交于 2019-12-24 09:39:53
问题 I can't see any setter RTS/DTR functions in both libusb-0.1 and libusb-1.0. Should i send smth special using usb_control_msg() ? usb device is CDC-device (not FTDI) 回答1: libusb can't do that itself - you should send 'control state' for CDC-device or FTDI-specific commands for FTDI-device. For CDC: http://cscott.net/usb_dev/data/devclass/usbcdc11.pdf `6.2.14 SetControlLineState This request generates RS-232/V.24 style control signals. ... D1 Carrier control for half duplex modems. This signal

libusb_claim_interface fails on Mac OS X Mountain Lion

淺唱寂寞╮ 提交于 2019-12-22 05:10:32
问题 I've searched for hours with no avail. I've seen it everywhere that libusb_detach_kernel_driver isn't supported on Mac OS X, but I haven't been able to find a patch or alternative for it. libusb_claim_interface returns this: libusb: 0.863377 error [darwin_claim_interface] USBInterfaceOpen: another process has device opened for exclusive access How can I detach the USB device from the kernel? 回答1: Many devices automatically have a driver attached to the USB device they are recognised as by OSX

How to send data to USB device in node.js using libusb

。_饼干妹妹 提交于 2019-12-18 04:11:33
问题 I have try to get data from device (USB thermometer), following this docs https://www.npmjs.org/package/usb, but I have not any result. For getting themperature data from device, I should send the data like that 'd\n'. This is my code: var usb = require('usb'), term = usb.findByIds(65535, 2); term.open(); var endpoints = term.interfaces[0].endpoints, inEndpoint = endpoints[0], outEndpoint = endpoints[1]; inEndpoint.transferType = 2; inEndpoint.startStream(1, 64); inEndpoint.transfer(64,

How to send data to USB device in node.js using libusb

无人久伴 提交于 2019-12-18 04:10:03
问题 I have try to get data from device (USB thermometer), following this docs https://www.npmjs.org/package/usb, but I have not any result. For getting themperature data from device, I should send the data like that 'd\n'. This is my code: var usb = require('usb'), term = usb.findByIds(65535, 2); term.open(); var endpoints = term.interfaces[0].endpoints, inEndpoint = endpoints[0], outEndpoint = endpoints[1]; inEndpoint.transferType = 2; inEndpoint.startStream(1, 64); inEndpoint.transfer(64,

Pyusb on Windows 7 - NotImplemented Error :is_kernal_driver_active

放肆的年华 提交于 2019-12-13 09:14:34
问题 I am using escposprinter python library for printing my data in thermal printer. It depends on pyusb. the library is working fine in linux . While in windows 7 ,i get the it have some issues. Here are output i get. File "main.py", line 1, in <module> from app import app File "D:\freeth-in-erp-60ab8eb96fad\app\__init__.py", line 94, in <module> from .api_routes import * File "D:\freeth-in-erp-60ab8eb96fad\app\api_routes.py", line 44, in <module> from .printer import pos File "D:\freeth-in-erp

libusb and poll / select

南笙酒味 提交于 2019-12-12 15:44:28
问题 I'm using a linux OS and was wondering if there were any file descriptors I could poll/select which would trigger when data was waiting to be read from a usb device. I am also using the libusb library and have yet to find file descriptors which I can use. 回答1: Use libusb's polling functions to hook its file descriptors into your event loop. select will wake up whenever there's activity that libusb will need to handle, which includes but probably is not limited to data being available for