Detect USB tethering on android

you can also use reflection to access the hidden function for setting usb tethering. Here is my code. ConnectivityManager cm = (ConnectivityManager)getSystemService(Context.CONNECTIVITY_SERVICE); Log.d(TAG,”test enable usb tethering”); String[] available = null; int code=-1; Method[] wmMethods = cm.getClass().getDeclaredMethods(); for(Method method: wmMethods){ if(method.getName().equals(“getTetherableIfaces”)){ try { available = (String[]) method.invoke(cm); break; } catch (IllegalArgumentException e) { // TODO Auto-generated … Read more

macbook adb cannot open interface

I ran into this error as well, and it turned out that the problem for me was that a Stetho tab was open in Chrome (i.e. a tab at URL chrome://inspect/#devices ), which I guess was causing the device to be in use. Closing that tab, then running adb kill-server, made adb devices work again.

USB HID Devices

The library you mention is now hosted on google see http://code.google.com/p/csharp-usb-hid-driver/ Perhaps these are helpful too: https://github.com/mikeobrien/HidLibrary http://www.usbhidnetclass.com/ (commercial) (usbhidnetclass.org previously) http://www.codeproject.com/KB/cs/USB_HID.aspx http://janaxelson.com/hidpage.htm http://www.codeproject.com/KB/system/HIDAche.aspx?q=C%23+and+USB+HID+Devices http://www.codeproject.com/Tips/530836/Csharp-USB-HID-Interface

Get the drive letter of USB drive in PowerShell

Try: gwmi win32_diskdrive | ?{$_.interfacetype -eq “USB”} | %{gwmi -Query “ASSOCIATORS OF {Win32_DiskDrive.DeviceID=`”$($_.DeviceID.replace(‘\’,’\\’))`”} WHERE AssocClass = Win32_DiskDriveToDiskPartition”} | %{gwmi -Query “ASSOCIATORS OF {Win32_DiskPartition.DeviceID=`”$($_.DeviceID)`”} WHERE AssocClass = Win32_LogicalDiskToPartition”} | %{$_.deviceid} Tested with one and more than one USB device plugged-in.

Controlling a USB power supply (on/off) with Linux

According to the docs, there were several changes to the USB power management from kernels 2.6.32, which seem to settle in 2.6.38. Now you’ll need to wait for the device to become idle, which is governed by the particular device driver. The driver needs to support it, otherwise the device will never reach this state. … Read more

Details on USB- no luck so far

Identification Every device has a (unique) Vendor and Product ID. These are provided (sold) by usb.org to identify a device. You can use a library like libusbx to enumerate all connected devices and select the one with the Vendor and Product ID you are looking for. HID Descriptors The point of HID descriptors is actually … Read more