Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
m3w2
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 2
Join Date: Nov 2011
Default USB API (host mode)

Hi,

During the last two weeks I've been trying to do some simple USB communication using my Xoom (MZ601) as USB host. This have proven to be harder than I expected and my latest theory is that the USB API not activated on my tablet.

My simplest test app just tries to enumerate USB devices and is as follows:

I added this to my AndroidManifest.xml:
Code:
...
<uses-sdk android:minSdkVersion="12" />
<uses-feature android:name="android.hardware.usb.host" />
...
My activity looks like:
Code:
public class USBFinderActivity extends Activity
{
   private static final String TAG = "USB Finder";
   private UsbManager mManager;

   @Override
   public void onCreate(Bundle savedInstanceState)
   {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);

      mManager = (UsbManager)getSystemService(Context.USB_SERVICE);
      Log.i(TAG, "Manager is: " + mManager.toString());
      Log.i(TAG, "Device are: " + mManager.getDeviceList().toString());	
      for (UsbDevice device :  mManager.getDeviceList().values())
      {
         Log.i(TAG, "Device: " + device.toString());	
      }
   }
}
But all I get is:

Code:
D/USB Finder( 3157): Manager is: android.hardware.usb.UsbManager@407646e0
D/USB Finder( 3157): Device are: {}
I have tried this together with my mouse, USB-memory headset and HTC Desire in combination with the following ROMs: Stock 3.1, Stock + Rooted 3.2.2, Tiamat 2.1-Hammerhead and Tiamat 2.2.2-Moray, but the result is the same.

Some other tests I've done are:
  • USB-mouse works out of the box for all the different ROM:s.
  • USB-memorys work good with Tiamat ROM:s.
  • USB-headset shows up in logcat, dmesg and lsusb at least.
  • Connecting the Xoom to my HTC Desire and run AdbTest without success
  • Testing the market app USB Device Info. Devices show up under the Linux tab, but the Android Tab say "No devices detected".

I've spent a lot of time searching information. I'm not alone with this problem. There are more people who has the same problem, while others get it to work directly. I can not see any connection to why it works for some and others not. It's spread over different makes, models and versions.

So if anyone out there got some experience or information about this, feel free to post. I'm starting to run out of debugging ideas.
 
m3w2
Old
#2  
Junior Member - OP
Thanks Meter 0
Posts: 2
Join Date: Nov 2011
Default Solution

Apparently the US-Wifi (MZ604) is a GDE (Google Device Experience) tablet. This means that it is Google that handles the updates for the device, without any involving from Motorola. For all other devices, Motorola customize the software before shipping it to the users.

For some reason, Motorola's software does not support the USB-host API. So if you want to enable USB-host you on your MZ601 will have to change the device software to US-Wifi (MZ604).

My Xoom is a WiFi/3G MZ601 bought in Sweden. I think the original image was “Build H.6.1-38-1”. I changed the image to “HWI69 for US Retail” (MZ604), installed the over-the-air updates and now USB-host is work as it is supposed to.
 
Post Reply+
Tags
host, usb, xoom
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...