usb

How do I detect a USB drive letter from a c# application?

為{幸葍}努か 提交于 2019-12-12 12:38:04
问题 How to detect the USB drive letter from c# program which is not residing in the USB? The program should reside in the system, if multiple USB's are connected then i should first able to get the manufacturer name also. 回答1: This will get all of the removable drives attached (including USB drives): foreach (DriveInfo drive in DriveInfo.GetDrives()) { if (drive.DriveType == DriveType.Removable) { // Code here } } Getting the USB drive manufacturer may be more difficult, and you may need to use

How might I receive notifications when a USB device is connected?

偶尔善良 提交于 2019-12-12 10:57:41
问题 I'm writing a program to monitor a specific device. This device may or may not always be connected, and when connected may be connected to any one of several different ports; I'd like my program to handle this gracefully. Is there a way to receive notifications when a specific USB device is connected, and from there to determine which port it is connected to? 回答1: To get an information if any hardware device has changed you can add the following code to your main form: /// <summary> ///

Hide Audio device using codeless kext

夙愿已清 提交于 2019-12-12 09:24:02
问题 I am developing a audio driver to do some custom audio processing using audio reflector driver sample code from Apple. Output from audio reflector driver is passed to real USB audio hardware device using core audio application. Now I want to hide USB audio hardware device from the system preferences so that user is not able to select the USB audio hardware output device as the default output device. Using the "SampleUSBAudioOverrideDriver" codeless kext I am able to change the name of output

Usb4java library, error while claiming an interface

喜夏-厌秋 提交于 2019-12-12 09:23:40
问题 Here I use the library usb4java to access to my usb device. The problem is I have an error while I try to claim an interface of my usb device. The error is on this line: int msg = LibUsb.claimInterface(deviceHandler, 1); error: USB error 3: Unable to claim interface: Access denied (insufficient permissions) Is there someone who know why I have this error or how fix it ? 回答1: I have the same issue you got, and my env is Mac OS X 10.9 After a long search with google, I finally found this just

Can I access USB HID device via a Chrome App?

陌路散爱 提交于 2019-12-12 08:54:53
问题 I have a simple little dongle I want to debug by sending/receiving basic USB messages. It enumerates as an HID device (like an additional mouse), but am worried that I won't have access to it. I forgot the hardware and can't test with it for a couple days. Is it a futile effort to continue building a chrome extension to test it? Chrome App, USB documentation: https://developer.chrome.com/apps/app_usb Getting-started example: https://github.com/GoogleChrome/chrome-app-samples/tree/master/usb

Win32Api USB SetupDiGetDeviceInterfaceDetail fail

为君一笑 提交于 2019-12-12 07:22:55
问题 I am attempting to connect to a USB GPS device. I can successfully connect to the device if I manually create a file via CreateFile WinApi (using the path specified in Device Manager). However, when I try to select the device through enumeration I fail @ the SetupDiGetDeviceInterfaceDetail call. I have C code that works correctly, but my C# translation does not appear to work correctly. I have tried many variations with essentially the same results. C Code that works // Get enumerator handle

How to get USB devices List from Browser

孤者浪人 提交于 2019-12-12 07:17:23
问题 What browser-based technology would allow me to query the client's currently connected USB devices - specifically name and device id of these. Of course, I'm ok with the client having to allow and confirm such an activity. I don't care if at low-level, it uses WMI, direct access or some other sort of access layer, all I want is to be able to use it from within a browser. I'd appreciate code samples and I'd be extra happy with a browser-independent solution. 回答1: You can't do that from a

Teensy USB in VirtualBox

こ雲淡風輕ζ 提交于 2019-12-12 06:59:33
问题 yesterday i had a problem with my teensy usb in virtualbox getting random keystroke changes, however i fixed it and it works perfectly fine now (i hope, tested it 10 times). Heres the post if u are interested :) VirtualBox Keystroke gets random changes However ive got a another little problem now -.- it only works if i manually bind my teensy as usb to the virtualbox. But atm i have to do that every time i connect my teensy to the pc or after reboot of the vm. i tried doing it with a filter

USB interface in Python

跟風遠走 提交于 2019-12-12 06:19:59
问题 I have this (http://www.gesytec.de/en/download/easylon/p/16/) USB device connected to my Win7. I am just trying to read the vendor ID and product ID. I have Python 2.7. Here is the code, import usb busses = usb.busses() for bus in busses: devices = bus.devices for dev in devices: print "Device:", dev.filename print " idVendor: %d (0x%04x)" % (dev.idVendor, dev.idVendor) print " idProduct: %d (0x%04x)" % (dev.idProduct, dev.idProduct) I am getting following error, "File "<stdin>", line 1, in

How to detect inserted USB

谁说我不能喝 提交于 2019-12-12 06:00:55
问题 In Qt Application I've developed to run on an embedded ARM-based system, I have to detect when USB pendrive has been inserted and what it contains, since I'd like to show contained files on a windows and allow the user to choice one of them. In order I have to: detect when USB is inserted; USB identification; USB file contained in. Try to explain: I have a file to save and restore in an external device. It contains some settings related to my app developed using Qt for an embedded system