libusb

Read/write on a pen drive using libusb: libusb_bulk_transfer()

♀尐吖头ヾ 提交于 2019-12-18 05:18:10
问题 I am trying to perform read and write operations on a pen drive. Details: Vendor ID: 8564 and Product ID: 1000. It is a Transcend JetFlash mass storage device. I am keen to know that whether it is possible to achieve a read/write on a pen drive. If it is, then is it going to happen the way I have tried in the code provided below. I have learnt the methods to get the device id, product id and endpoint addresses. This is what I have implemented. Here the device is getting acknowledged and

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,

Simple way to query connected USB devices info in Python?

隐身守侯 提交于 2019-12-17 06:26:18
问题 How can we query connected USB devices info in Python? I want to get UID Device Name (ex: SonyEricsson W660), path to device (ex: /dev/ttyACM0) And also what would be the best Parameter out of above info to be used as identifying the device whenever it's connected again? (UID?) I am working on Ubuntu 11.04. ATM I have this code (using pyUSB) busses = usb.busses() for bus in busses: devices = bus.devices for dev in devices: print repr(dev) print "Device:", dev.filename print " idVendor: %d (0x

Linking libusb to my project

我是研究僧i 提交于 2019-12-14 03:25:49
问题 I am having problem figure out how to use libusb, I put "libusb-1.0.18-rc1\libusb" in include directories (using Visua Studio), but it doesn't work. Can anyone enlighten me. Thanks a lot! error message: 1>test.obj : error LNK2019: unresolved external symbol _libusb_exit@4 referenced in function _main 1>test.obj : error LNK2019: unresolved external symbol _libusb_close@4 referenced in function _main 1>test.obj : error LNK2019: unresolved external symbol _libusb_release_interface@8 referenced

LibUSB driver issues: timeout

て烟熏妆下的殇ゞ 提交于 2019-12-13 17:06:34
问题 I am attempting to write a linux driver for a printer. I have run USBSnoop on windows XP and obtained the log. In this log it sets wMaxPacketSize to 1026. After i set the interface i get the response of 75 bytes. If i set it to 64 (in the lsusb output) i obviously only get 64 bytes back. My issue is on a bulk transfer to/from the device i get timeouts. I think i have the same problem as here: http://libusb.6.n5.nabble.com/libusb-bulk-transfer-return-timeout-error-and-transferred-set-to-0

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

Need to find and open a USB serial device on linux

折月煮酒 提交于 2019-12-13 07:37:45
问题 I'm writing a small C application to run on my (Linux) QNAP NAS that will talk to an Arduino (I have no difficulty with any of the USB code for the arduino). (The arduino has a trusted application on it that accepts text commands via USB serial.) My wish was to find it using the USB vendor/product IDs (only half implemented at the moment). What I have so far (see below) works quite nicely in that it does find the device. // runs on NAS #include <stdio.h> #include <usb.h> main () { struct usb

Use libusb with Delphi on Windows 64-bit?

穿精又带淫゛_ 提交于 2019-12-12 21:51:04
问题 After reading a little, I am concerned that my 32-bit Delphi application will not be able to use libusb 64-bit driver on Windows 7 and other 64-bit Windows systems, and that it will not be able to talk to my custom hardware device on those systems. Is this true? If yes, is there some workaround? Am I missing something in this picture? 回答1: On libusb 1.0 with the WinUSB backend (Microsoft driver included with windows) we have no problem to communicate with it from an x86 app (Managed c++

C# read USB Descriptor

不问归期 提交于 2019-12-12 18:29:06
问题 How can I read the USB Descriptor by C#? I found LibUSB.NET but I can't get USB devices like in examples: UsbRegDeviceList allDevices = UsbDevice.AllDevices; it returns count = 0 回答1: It appears this question was asked and answered quite a while ago now. Here's the link: get-list-of-connected-usb-devices 来源: https://stackoverflow.com/questions/14518778/c-sharp-read-usb-descriptor