usb

getDeviceList() always empty

风格不统一 提交于 2019-12-09 00:44:16
问题 I'm trying to use an Arduino Board along with my Odys Neo x8 tablet but it seems, that the UsbManager doesn't recognize the device alright. I connected the arduino to the tablet via an OTG-adapter so that the tablet will work in host mode, the Arduino is successfully receiving power from the device. I'm fetching the list of available USB-devices on the tablet as follows: sUsbController = new UsbController(this, mConnectionHandler, 0, 0); HashMap<String, UsbDevice> devlist = sUsbController

bank-switch usb devices in Windows8

回眸只為那壹抹淺笑 提交于 2019-12-08 19:43:55
问题 The USB 2.0 standard supports the disabling of individual hub ports. I am looking for an API to call from user code under Windows 8, specifically to disable hub ports, either in C# or in C++, using existing Windows user-mode drivers. It looks like the IOCTL to disable a hub port has been deprecated in the WDF. I've built and used DevCon - it will disable devices through the DDK, but will not disable hub ports. WinUSB is a powerful interface, which requires specifying WinUSB.sys as your driver

Programmatically find the IP address of the desktop over USB tethering

限于喜欢 提交于 2019-12-08 18:49:27
Is there a way to find the IP address of the desktop machine connected the android phone after USB tethering is turned on? Does android assign a fixed IP address to the desktop? Or does it assign a dynamic address (dhcp)? Is there a PPP connection created between the phone and machine? With USB tethering it seems that all android devices use the same static addresses, the android device using tcpdump is 192.168.42.129 The attached device will get a DHCP provided address in the same address range. I listen to a port on my android app and have a udev rule to push the dhclient address back to

Android USB_DEVICE_ATTACHED persistent permission

岁酱吖の 提交于 2019-12-08 17:28:05
问题 How can I make Android not request for permission each time I reconnect a USB device? I want to make it to remember "Use by default" checkmark for the USB devices so that I don't have to give permission every time to the same device. I programatically detect when USB devices (android phones) are attached to my host device (android phone) so that I can switch them to AOA mode and use them as accessories. Basically I have two android phones and an OTG cable and I want them to communicate

Smartcard reader naming: when removing any reader, the name of the rest changes

我只是一个虾纸丫 提交于 2019-12-08 14:37:42
问题 I am writting a smartcard application. This application connects card in reader and sometimes works with it. I need to watch when reader is no longer available (either card is ejected or reader is removed from USB). Readers are watched using SCardStatusChange. This function requires reader name to watch. I insert two readers with cards into USB slots. They are recognized as "USB Smart Card Reader 0" and "USB Smart Card Reader 1". I remove one reader. Windows says, "USB Smart Card Reader 1" is

How to start process on Linux OS in C, C++

风流意气都作罢 提交于 2019-12-08 14:03:26
问题 I have wireless USB Adapter and I use "pstree" command to monitor all processes. When I plug the USB adapter into my Linux OS I see new process "wpa_supplicant" with "pstree" command. I use in C/C++ language . I know Linux OS will use "NetworkManager" daemon to monitor network (eth, bluetooth, wifi. etc) but i don't know How to we can start "wpa_supplicant" ? Can i use dbus or systemd? Thanks Thong LT 回答1: Use fork() system call and it will create a child process or if you want to run the

Folder added in Android external storage, but was not showed correctly on computer via USB connection

一笑奈何 提交于 2019-12-08 13:52:16
问题 I've created a folder in my program and use MediaScannerConnection to get it visible on Computer. I did just the same as the answer to this question: add a folder in android program Now the problem is that, on the computer, the folder doesn't show as a folder, but as a blank file. Does anyone knows why this happens and how to get the folder show in correct way? Thanks. 来源: https://stackoverflow.com/questions/39047905/folder-added-in-android-external-storage-but-was-not-showed-correctly-on

is the USB Instance ID on Windows unique for a device?

混江龙づ霸主 提交于 2019-12-08 13:27:15
问题 I'm trying to identify a USB device uniquely on a Windows system. Since serial number is optional (and empty on most devices), I'm looking at the Instance ID. The field that is like USB\VID_03F0&PID_094A\6&24b73976&0&2 . I already know that this ID changes if I plug the same device into different ports, but that is ok with me. The question is: If I take an identical device (mouse in my example) and plug it in, will it get the same or a different Instance ID ? I've done some research and

What is the process for getting a HID compliant USB device removed from ChromeOS blacklist?

寵の児 提交于 2019-12-08 12:07:23
问题 Attempting to use the chrome.hid API for a Chrome Packaged App we ran into an issue where our USB devices are in the ignore/blacklist. What is the process for ChromeOS to get all of our devices removed from the blacklist? See this post for reference: HID compliant device will not enumerate using chrome.hid API on ChromeOS 回答1: This isn't a Chrome OS specific problem. This device is in the Linux kernel's hid_ignore_list because it doesn't implement the HID protocol correctly. Given that the

disable specific usb disk in windows service

你。 提交于 2019-12-08 11:20:58
问题 Does anyone know how can I prevent a specific USB disk/flash from installing in a Windows Service? I don't want to disable all usb ports, I just prevent a specific usb disk from installing. I'm using windows 7. 回答1: Yes, is possible disable USB disk, using Kernel-Mode Filter Driver . http://msdn.microsoft.com/en-us/library/windows/hardware/ff545890%28v=vs.85%29.aspx Few years ago, I wrote project, that accept only USB disks with specified VID\PID . Unfortunately, I can not find this project.