usb

What USB devices (friendly name) are currently connected to PC?

落花浮王杯 提交于 2019-12-21 19:42:08
问题 Can I get a list of what devices are currently connected to the computer? I checked this and this thread, but I can't seem to find the actual names (i.e. iPod Touch 4 etc.) is there a way to find the name of the device in human language, so I can display this list (of matching devices) to the user? Any PI that gets this info? Update: I notice that the computer's device management is able to show this info, meaning it does exist somewhere, I just don't know the right place to access it. I did

Disable USB charging

别说谁变了你拦得住时间么 提交于 2019-12-21 18:33:25
问题 For some reasons not related to the battery life, I need to disable the battery charging when a USB host is connected to my phone (a rooted Nexus 4). Taking a look around on the internet (link1, link2), it looks like I should modify a system file. I have found a series of interesting files located in /sys/class/power_supply/battery and /sys/class/power_supply/usb , that could be the right ones to be modified in order to achieve the usb charging disabling (e.g. /sys/class/power_supply/usb

Do USB Control Transfers guarantee delivery?

我们两清 提交于 2019-12-21 17:45:15
问题 USB 2.0 specifies 4 types of transfers (in section 5.4 Transfer Types): Control Transfers Isochronous Transfers Interrupt Transfers Bulk Transfers Section 5.8 says that Bulk Transfers provide: Access to the USB on a bandwidth-available basis Retry of transfers, in the case of occasional delivery failure due to errors on the bus Guaranteed delivery of data but no guarantee of bandwidth or latency (Emphasis mine.) I don't see a similar statement for Control Transfers. Do they also guarantee

OSX USB Monitoring

若如初见. 提交于 2019-12-21 12:38:43
问题 How can I monitor all USB traffic on OSX? I downloaded the USB monitoring extensions from the Apple Dev website and ran USB Prober. Nothing shows up when I start the monitoring, and there is data being sent to and from the USB device while monitoring. I found 2 similar topics on this site, but neither gave an answer aside from using libusb. I was hoping I wouldn't have to write my own monitor from scratch using libusb. Seeing as the questions were asked in 2010, I'm hoping tools have been

USB interface barcode scanners

徘徊边缘 提交于 2019-12-21 11:40:12
问题 Not exactly a programming question, but close. I'll try my luck anyway. The keyboard wedge barcode scanner inserts the translation device between the reader and the keyboard. Data sent through a wedge appears as if it was typed into the computer, while the keyboard itself remains fully functional . Because a computer using a keyboard wedge can't tell the difference between data that is entered by a scanning device, or data that is entered by keyboard typing, a wedge can be used to easily add

Access iOS filesystem without jailbreak?

为君一笑 提交于 2019-12-21 11:26:07
问题 I would like to write/use an open source script that can access iOS filesystem (non-jailbroken). On a Jailbroken device, i use ssh / scp to access, transfer data from the device. Intent is to copy some part of the iOS filesystem (say /var/mobile/Applications/xxx-xxxx/Documents ) to a Mac, from a non-Jailbroken device , using some script . I see that tools like iFunBox is able to do it. Would like to know it manages to do so. I came across mobiledevice.h but could not really understand how to

pyusb: cannot set configuration

a 夏天 提交于 2019-12-21 11:25:12
问题 I am trying to make a script (on linux) that can turn a light in my mouse on or off. This is the code I have so far: import usb.core import usb.util import sys interface = 0 dev = usb.core.find(idVendor=0x1532, idProduct=0x0017) def main(): if dev is None: print "device not found" else: print "device found" if dev.is_kernel_driver_active(interface) is True: print "but we need to detach kernel driver" dev.detach_kernel_driver(interface) print "claiming device" usb.util.claim_interface(dev,

How to control removable usb devices with VMware vmrun

早过忘川 提交于 2019-12-21 08:26:10
问题 I have VMware workstation 9 and 10, and I am wanting to use that to run some integration tests. Using the vmrun utility, I can copy scripts to and run them on the virtual machine guests. However, some of the integration tests will require interfacing with USB devices. Is there any way using vmrun, or any of the vmware API's to programmatically control the "Removable Devices" to connect and disconnect USB devices to virtual machines? I have tried looking at the readVariable and writeVariable

Remove USB Accessory permission dialog

泪湿孤枕 提交于 2019-12-21 06:16:36
问题 I am working on an application which uses USB accessory.When I attach device to arduino it asks for usb permission and it has checkbox in dialog "use by default".When I checked and press ok then it should save permission and do not ask me again but it is asking for permission every time I attach USB.I want to save permission is there any way to save this? My Code loooks like @Override public void onResume() { super.onResume(); if (mInputStream != null && mOutputStream != null) { // streams

OSX: How to get a volume name (or bsd name) from a IOUSBDeviceInterface or location id

ⅰ亾dé卋堺 提交于 2019-12-21 05:34:11
问题 I'm trying to write an app that associates a particular USB string descriptor (of a USB mass storage device) with its volume or bsd name. So the code goes through all the connected USB devices, gets the string descriptors and extracts information from one of them. I would like to get the volume name of those USB devices. I can't find the right API to do that. I have tried to do that: DASessionRef session = DASessionCreate(kCFAllocatorDefault); DADiskRef disk_ref = DADiskCreateFromIOMedia