UsbManager finds no devices

Forum to discuss the Dual Core Rikomagic MK802 III Mini PC

Moderators: KEgg, twjordo, tatubias

UsbManager finds no devices

Postby The Perch » Sat Feb 09, 2013 11:16 am

I am writing an app to control a USB device through my MK802III. On the USB Host port I have a USB hub with a keyboard, a mouse, and my USB device. The keyboard and mouse work fine. However, my app cannot see any USB devices. I use code like this
Code: Select all
UsbManager mgr = (UsbManager) context.getSystemService(Context.USB_SERVICE);
HashMap<String,UsbDevice> devices = mgr.getDeviceList();
and the manifest includes
Code: Select all
<uses-feature android:name="android.hardware.usb.host" android:required="true" />
but the device list I get from UsbManager is always empty.

I have tried some USB diagnostics apps, including "USB Device Info". They also find no USB devices in the normal way. However, "USB Device Info" reports that the underlying Linux system has seen ALL the devices, including the one I want to access, so I know the hardware and kernel works fine. I also know that it is not just my code that has a problem. It somehow seems to me to be a problem in the Android Java engine.

I have upgraded to the latest Android version for MK802III:
MK802III_ANDROID4.1.1-SDK.v1.00.1015 dated 20121129, and the Kernel is 3.0.8+, same date.
This has not fixed the problem.

Any ideas what I can do? Is there some configuration or security setting I have missed or is there a "shortcoming" in the Android software for MK802III?
The Perch
 
Posts: 2
Joined: Sat Feb 09, 2013 10:57 am

Re: UsbManager finds no devices

Postby The Perch » Thu Feb 28, 2013 8:26 pm

After much experimenting and searching the web I finally found the answer myself in this article
http://poke64738.iphpbb3.com/forum/26454250nx52440/faqs-usb-bt-joystick-center-f20/howto-add-usb-host-api-support-to-your-device-t103.html.

It turns out the MK802III is missing the file
Code: Select all
android.hardware.usb.host.xml
in the directory
Code: Select all
/system/etc/permission/

After remounting /system as rw, adding the file, chmod 644 and reboot, my app could now see my USB device.
The Perch
 
Posts: 2
Joined: Sat Feb 09, 2013 10:57 am

Re: UsbManager finds no devices

Postby Targaryen » Thu Aug 01, 2013 8:46 am

Your above suggestion is still not working. Do you any other firmware rather than the original stock. My device is MK808B and the USBManager keeps returning empty device list despite there are several items attached to it.
Targaryen
 
Posts: 1
Joined: Thu Aug 01, 2013 8:41 am


Return to Rikomagic MK802 III Forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron