USB device - UsbManager won't enumerate
<p>I am connecting a USB device I built (dsPIC33E powered) to a generic 7" A13-MID android.</p>

<p>I am using ADB over TCPIP with LogCat running.</p>

<p>When I plug in my device I get this in LogCat:</p>

<pre><code>I/USB3G (90): event { 'add', '/devices/platform/sw_hcd_host0/usb1/1-1', 'usb', '', 189, 7 }
I/USB3G (90): path : '/sys/devices/platform/sw_hcd_host0/usb1/1-1'
I/USB3G (90): VID :size 5,vid_path '/sys/devices/platform/sw_hcd_host0/usb1/1-   1/idVendor',VID  '04d8'.
I/USB3G (90): PID :size 5,Pid_path '/sys/devices/platform/sw_hcd_host0/usb1/1-1/idProduct',PID  '003f'.
I/USB3G (90): cmd=/system/etc/usb_modeswitch.sh /system/etc/usb_modeswitch.d/04d8_003f &amp;,
I/USB3G (90): excute ret : 0,err:No such file or directory
</code></pre>

<p>I have MissileLauncher Demo running in debug mode ADT.</p>

<p>I can set a breakpoint in Fire and when I press Fire button, the code breaks there (so debugging IS working).</p>

<p>I have set Product-ID and Vendor-ID to the correct values in device_filter.xml.</p>

<p>I then set a breakpoint here:</p>

<pre><code>UsbDevice device = (UsbDevice)intent.getParcelableExtra(UsbManager.EXTRA_DEVICE);
if (UsbManager.ACTION_USB_DEVICE_ATTACHED.equals(action)) {
    setDevice(device);
} else if (UsbManager.ACTION_USB_DEVICE_DETACHED.equals(action)) {
    if (mDevice != null &amp;&amp; mDevice.equals(device)) {
        setDevice(null);
    }
}
</code></pre>

<p>When I step through the code after the break, the intent. line is executed but the following if statement is not entered and <code>setDevice(device)</code> is never called (neither is <code>setDevice(null)</code>).</p>

<p>I did expect setDevice(device) to be called.  After all, I have the device plugged in, the android saw that I plugged it in (see LogCat above) and I have the device_filter.xml set correctly.</p>

<p>What am I missing?</p>

<p>Other info, an app I installed 'USB Device' sees the device but lists it under the Linux tab.  I hope that is not bad news for me!</p>

<p>Thanks,
Dale</p>

<p>I tried to enumerate the devices individually but no 'Yeah' (in fact there were no devices returned in HashMap):</p>

<pre><code>HashMap&lt;String, UsbDevice&gt; deviceList = mUsbManager.getDeviceList();
Iterator&lt;UsbDevice&gt; deviceIterator = deviceList.values().iterator();
while(deviceIterator.hasNext()){
    UsbDevice device1 = deviceIterator.next();
    //your code
    if (device1.getVendorId()==1240) {
        savetofile("Yeah!");
    }
} 
</code></pre>

<p>Not sure if this is relevant or not but the android is rooted and it came that way.</p>
