usb

retrieving the serial number of a USB keyboard under Windows

左心房为你撑大大i 提交于 2019-12-23 16:07:24
问题 Many USB devices contain a unique serial number (which is actually a Unicode string) which the host can use in conjunction with the 16-bit vendor and product ID numbers to uniquely identify the device. I'm trying to figure out how to write a Windows application that would be able to display a list of all USB human interface devices attached to the system. The list would have one row for each HID, including system keyboards. There would be columns in the list for the vendor ID, product ID, and

Can't show android device in ubuntu 13.04

旧时模样 提交于 2019-12-23 13:05:18
问题 I have a Android tablet device that can't be showed by android devices on my laptop(T61), but it worked fine on DELL PC with the same OS: Ubuntu 13.04. I've update the adb to the latest platform-tools:18.0.1 and export ADB_TRACE=all After : $sudo adb kill-server $sudo adb start-server $ adb devices it shows: system/core/adb/adb.c::main():Handling commandline() system/core/adb/adb_client.c::adb_query():adb_query: host:devices system/core/adb/adb_client.c::_adb_connect():_adb_connect: host

USB host for android

帅比萌擦擦* 提交于 2019-12-23 12:17:16
问题 I am trying to communicate with my freeduino board which is similar to arduino uno via usb through android device 'nexus 7' which has 4.2 (jelly beans) in it. I used the developers guide to communicate with the device from a couple of months but with no result. I think i am missing something minute in it. I am trying to simply display the vendor id of my freeduino board. My manifest file look like this. <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com

Write something to linux hid device?

会有一股神秘感。 提交于 2019-12-23 11:43:05
问题 I am learning linux hid driver programming, i know how to read a message from hid device but, i am puzzled how to write something to the device ? such as usb hid keyboard, i can use xset or some other program to control the leds of the keyboard, how to archive that? Any tips please! thanks advance. 回答1: USB HID devices are mostly input devices, so they don't usually provide an OUT endpoint (they are allowed by the HID specification but I've never seen one). If an OUT endpoint is not provided,

Register application to launch when USB item is connected to PC

做~自己de王妃 提交于 2019-12-23 10:29:28
问题 I created an Android application I would like to automatically open when USB item running Android gets connected to the PC. Is it possible to register my application to handle USB connection? How do I do that? 回答1: You can listen for the Intent.ACTION_UMS_CONNECTED (usb mass storage mode started) or Intent.ACTION_POWER_CONNECTED (the phone is charging now) broadcasts with a BroadcastReceiver. Note that both do not exactly tell you that you are connected to a computer. The charge broadcast

Can't connect to Samsung Galaxy Tab S with Android Studio, Windows 7

≡放荡痞女 提交于 2019-12-23 10:26:16
问题 I have a nice, new Samsung Galaxy Tab S which I'm trying to connect with Android Studio. I've enabled usb debugging on the tablet, and downloaded and installed the driver by executing "SAMSUNG_USB_Driver_for_Mobile_Phones_v1.5.45.0.exe" from "http://www.samsung.com/us/support/owners/product/SM-T800NTSAXAR". The Google USB driver is installed per the Android SDK menu in Android studio. I also installed Samsung Kies and it can see the Samsung. Still Android Studio doesn't see it - nothing shows

Java Separate Input of Two Separate Keyboards

送分小仙女□ 提交于 2019-12-23 10:09:52
问题 I have two USB keyboards plugged into the same machine. I am developing a Java application. Is there anyway to allow the Java Application to separate out which USB keyboard it came from? (I.e. is there something like http://docs.oracle.com/javase/6/docs/api/java/awt/event/KeyEvent.html but with a USB parameter so I can know which USB device it came from?) Thanks! 回答1: This is not possible with Java alone. But there are 3rd party tools that can remap the keys of a keyboard. HID macros is one

Access denied when trying to execute a .exe in %AppData%

落爺英雄遲暮 提交于 2019-12-23 08:33:10
问题 I'm trying to use RemoveDrive.exe, found here, in my Java application. I have it in my JAR, and I'm extracting it to a temporary file using the following code, however when I try to run it I get an IOException which says CreateProcess error=5, Access is denied . The program doesn't normally need admin priviledges though. Any ideas on what could be causing the issue? File RDexe = File.createTempFile("rmvd", ".exe"); InputStream exesrc = (InputStream) GraphicUI.class.getResource("RemoveDrive

How to discover the virtual COM port name knowing the PID and VID in C#

左心房为你撑大大i 提交于 2019-12-23 05:16:09
问题 I am trying to find the correct way of finding the COM port name if I know the PID and VID. So far I wrote the workaround but i do not believe that there is no more elegant and correct way. BTW (I know that I can use REGEX). This was written only to test the workaround. I know that there is a lots of space for improvements and I am not asking for a code review Any ideas are more than welcome :) namespace ConsoleApplication1 { using System; using System.Globalization; using System.Collections

USB port current value

江枫思渺然 提交于 2019-12-23 05:13:31
问题 Is it possible to get the USB port current value when I plug the device in it? The value should be available programmatically using C#. The second parameter I need is 'USB save power mode'. The correct name of the property is "Allow the computer to turn off this device to save power". I managed to detect the device (if it is connected or disconnected) and read data from it correctly. Do these two properties belong to USB device or to USB port?! WinUSB Api did not give me clear answers to my