usb

java: No Endpoint found, but python works

给你一囗甜甜゛ 提交于 2019-12-11 18:36:57
问题 I want to try out the java libusb from http://libusbjava.sourceforge.net and cant even connect to my device... I had this python code before: def discover(): my_device = None for bus in usb.busses(): for dev in bus.devices: if dev.idVendor == 0x16c0 and dev.idProduct == 0x05dc: handle = dev.open() which worked really great. now i wanted to build the same in java and made this: Device dev = USB.getDevice((short) 0x16c0, (short) 0x05dc); try { dev.open(1, 0, -1); } catch (USBException e) { }

USB device detection - Windows & Linux (FT232R)

前提是你 提交于 2019-12-11 18:06:56
问题 How can I enumerate and identify (get pid, vid and serial) FT232R chips in windows and linux. I need to: 1. at start of program enumerate already plugged devices 2. detect plugging of usb device 3. get PID, VID, Serial And I need to do that in windows and linux. I know there is libusb for windows as well as for linux, but I don't have that much experience with USB. Code example would be best. 回答1: You should use SetupAPIs in Windows for getting device information like hardware id(contains vid

About USB boot from usb

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-11 17:45:52
问题 I want to make ipl and boot os from my usb. I just want to read 360 sectors(512 bytes per sector).I checked code for several times and cannot find some mistakes.I have already debug it on qemu but it always returns "load error"(as in this code, it jumps to error section).It seems lba search did not work and always get carry flag 1 when I do it. my qemu program is like this qemu-system-i386 -usb ipl.bin and ipl.bin is compiled binary file made from assembler code below. ; haribote-ipl ; TAB=4

List UART -> COM converter in Windows Device Portal

我怕爱的太早我们不能终老 提交于 2019-12-11 17:13:48
问题 I have Raspberry Pi 3 plate with connected USB to UART (COM) converter. The power led on the USB stick is ON. I can not find the converter in Windows Device Portal . In both: connected and disconnected states I see just two UART related records in Device Manager: (ID:ACPI\BCM2835\0, Class:System, Manufacturer:Microsoft, StatusCode:25165834) >BCM283x Mini UART Serial Device (ID:ACPI\BCM2836\0, Class:Ports, Manufacturer:Microsoft, StatusCode:25182218) >ARM PL011 UART Device Driver (ID:ACPI

c# Eject USB - code for LockVolume, DismountVolume, and PrepareRemovalOfVolume

僤鯓⒐⒋嵵緔 提交于 2019-12-11 16:56:43
问题 I am struggling trying to create an application capable to eject any USB mass storage device. After many tries, I am finally using some code found in codeproject https://www.codeproject.com/Articles/375916/How-to-Prepare-a-USB-Drive-for-Safe-Removal BUT with some USB devices I get an error "This device is currently in use. Close any programs or windows that might be using the device, and then try again.". I dont really understand why it happens for some devices and not for others... The error

Is there a way to change USB device descriptor on computer side?

依然范特西╮ 提交于 2019-12-11 16:55:55
问题 I am designing a peripheral that draws power from USB port while communicating with a program on Windows. I am planning to use a cheap IC for it (CH340G), however it's configured to open the port in low power mode by default, by setting the MaxPower parameter to 0x30 (96 mA) and it cannot be configured from the IC side. I would save a lot of money if I could change this parameter from computer side. Can this be done, or should I look for another chip? 回答1: No, USB descriptors are read from

pyUSB read() always returns the same value

自作多情 提交于 2019-12-11 16:44:48
问题 I am using USB library in python. I can see the device, i can configure it. but when I read out of it I always get the same stuff array('B', [17, 96]). Note, even if I don't write into the endpoint output I still get the same result when I read; I can also read as many times as I want and still get the same result (see full code below) the lsusb command shows it is a FTDI USB device Bus 009 Device 008: ID 0403:faf0 Future Technology Devices International, Ltd in past, i was able to

Memory Leak - Not Sure How/Where to CFRelease() CFSet

五迷三道 提交于 2019-12-11 16:44:44
问题 I'm yet again struggling with a memory leak, and need some help figuring this one out. I know (or am pretty sure) the CFSet(s) are the problem here. I assume I need to CFRelease() them, but am not sure how to accomplish this since I also need to return a CFSet in USBDeviceCount(). Any help would be appreciated! Thank you! Here's the code (which seemingly works great! except for the leaks): // New USB device has been added (callback function) static void Handle_DeviceMatchingCallback(void

booting ubuntu from usb using virtualbox [closed]

偶尔善良 提交于 2019-12-11 16:31:32
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I'm trying to install ubuntu on an usb, the problem is, I don't want to dual boot once done, I want to keep my windows but boot ubuntu using virtualbox and use the usb as my harddrive for ubuntu, but how? Virtualbox will not recognize the usb as a harddrive when installing the iso 回答1: In Virtualbox you have to

Data from USB ~ Serial Port

限于喜欢 提交于 2019-12-11 16:09:48
问题 I would like to transfer data from a USB Host (of my Laptop or Android Device) to Serial COM port (of a Desktop PC) through a USB - Serial port(DB-9) adapter. Is there any library existed to do this task?? i have already studied and tried http://developer.android.com/guide/topics/connectivity/usb/host.html but failed. Can i send data by a using a java program or Android App from my Laptop or Android Device ?? Can i receive data by an app in Desktop PC and show us???? If so please guide me how