usb

linux / libusb get usb device path

流过昼夜 提交于 2019-12-05 04:00:55
I use libusb to enumerate over a few usb-devices. Now i like to get the "device-path". I think it's not called usb device-path, because i was not successful with google. If i connect a usb-device with linux, i get a message in dmesg , here are a few examples for such a "device-path" with an usb temperature sensor (something like this ): Directly to a usb port: [68448.099682] generic-usb 0003:0C45:7401.0056: input,hidraw1: USB HID v1.10 Keyboard [RDing TEMPer1V1.2] on usb-0000:00:12.0-1/input0 => 12.0-1 Directly to another port: [68560.853108] generic-usb 0003:0C45:7401.0058: input,hidraw1: USB

Get access to USB device on Linux (libusb-1.0)?

拈花ヽ惹草 提交于 2019-12-05 03:54:49
I am writing a small program to communicate with a specific USB HID product (identified by vendor and product IDs), using libusb-1.0 on Linux. Right now, I have to run the program as root because "libusb requires write access to USB device nodes". Is there a way to change the permissions on the device I need so that I don't need to run my program as root? On modern Linux systems, udevd ( man 7 udev ) creates the device nodes for USB devices when they're plugged in. Add a udev rule that matches your device (eg. you could match by USB Vendor and Product IDs), and sets the OWNER / GROUP / MODE of

Pyusb on windows 8.1 - no backend available - how to install libusb?

℡╲_俬逩灬. 提交于 2019-12-05 03:49:39
问题 Working on pyinstaller 3.1, python 2.7.9, and tkinter. Try to use pyusb instead of pyserial, but no backend available. Looking into Pyusb on windows - no backend available, PyUSB ValueError: No backend available, USB interface in Python, and so on, it seems that I need to install libusb. But when I run "import usb" and "import usb.core" under python, no errors. I have no idea how to install it and how to use it in my project, how to tell my project where libusb is. what I did: (1) download

Can't receive broadcast Intent of UsbManager.ACTION_USB_DEVICE_ATTACHED/UsbManager.ACTION_USB_DEVICE_DETACHED

大城市里の小女人 提交于 2019-12-05 03:39:41
I am coding an USB host App recently, but it's stucked because I can't detect the device attached/detached event, I followed the coding note of http://developer.android.com/guide/topics/connectivity/usb/host.html and refer to other's coding in the network, After checking several times, I still can't find the problem. After my debugging, it seems that the UsbManager.ACTION_USB_DEVICE_ATTACHED/UsbManager.ACTION_USB_DEVICE_DETACHED intent is not happened, Because I try to use Context.sendBroadcast() to send a customized Intent, and my BroadcastReceiver can receive the intent. But when I attach

how to get Device id, vendor id and product id of a mounted usb device in Mac OS cocoa

人走茶凉 提交于 2019-12-05 02:29:29
问题 I am trying to write a Cocoa program which detects iPods connected to Mac OS. I am listening to NSWorkspaceDidMountNotification and NSWorkspaceDidUnmountNotification for the USB device mount and unmount notifications. I can get the device path of the mounted device using NSString *path = [[notif userInfo] objectForKey:@"NSDevicePath"]; but I also need t know the Device Id, Vendor Id, Product Id etc to check whether the mounted device is an iPod. I think the way forward is IOKit. But I have a

USB debugging - Issue with installing drivers for Epson Moverio

久未见 提交于 2019-12-05 01:43:27
问题 New to Android development, I've made a small app using Eclipse that works perfectly on a virtual Android device. Now, I want to run it on the real device: Moverio, a head-mounted display made by Epson, but my computer just does not recognize it as an Android device. Being on Windows 7, I understood I need a specific USB driver. Epson sent me instructions to install the driver, but it still doesn't work. How can I do it? Here are the steps I followed: Add following two lines in [Google.NTx86]

SWT: Getting notified of a system device change (USB device connection / disconnection)

别等时光非礼了梦想. 提交于 2019-12-05 01:31:29
问题 I'm writing an SWT application which needs to sit in the system tray and pop up automatically whenever the user connects some USB device (the application serves as its control panel). The way to do this in the native environment (win32 in this case, but I should be platform-independent ultimately) is to listen to the WM_DEVICECHANGE event, then checking if my device has been disconnected. Googling the subject, it seems like SWT does not in fact handle this type of event. Does anyone have any

How can I use COM and USB ports within Cygwin?

好久不见. 提交于 2019-12-05 01:23:58
I want to send/receive data from my Arduino board with a Python script. I would like to do it using Python and its pySerial module which seems to fit my needs. So I installed Python and pySerial within cygwin (windows XP behind). The Python script is rather straightforward: $ cat example.py #print "testing my COM26 port using python" import serial ser = serial.Serial() ser.baudrate = 9600 ser.port = 26 ser ser.open() ser.isOpen() However at runtime I get the following error. $ python example.py Traceback (most recent call last): File "example.py", line 9, in <module> ser.open() File "/usr/lib

How do I obtain USB_DEVICE_DESCRIPTOR given a device path

拟墨画扇 提交于 2019-12-05 01:13:20
问题 I have been able to enumerate USB devices using the SetupAPI, and I've looked at the usbview application from the WDK, but I still can't figure out how to get the USB_DEVICE_DESCRIPTOR. I would rather avoid using WMI. DeviceIoControl is what the sample app usbview uses, but that really only works if you're enumerating devices on a Hub. I suppose if I can get to the parent hub (and port) given a device path (or Id), this method may work but I haven't been able to determine how to do this

Proprietary USB device access via browser… possible? Silverlight maybe? (Java is excluded for now)

北战南征 提交于 2019-12-05 00:51:24
问题 Probably there are a lot of similar questions around, but since I know only few solutions to this which I am not sure will work for us, I am looking for something else, maybe new technologies... What we have is this USB device which is not so fancy (of course, it requires a driver to be loaded), and it has couple of C++ dlls to help getting certain output from it. On top, we made a C# desktop application which makes use of the device in a more attractive way (plenty of interop inside). So far