Android Usb Host Problem with Samsung Galaxy 10.1 Tablet

六眼飞鱼酱① 提交于 2019-11-29 10:48:24
hinklecw

SOO unfortunately it looks like the Samsung Galaxy Tablet just does not play nicely with the UsbManager and about half of the USB devices in the world. The kernel in Samsung seems to fire intents for storage devices and the like, but not for HID and other random devices (such as arduino, and my usb sensor, and HID devices as well.) It seems to be a bug in samsung kernel. Interestingly, the HID devices WORK on the tablet, but are not enumerated on the UsbManager. I have found several links of the same problem, and it seems like a kernel patch (or the acer tablet) are the only ways around this atm. hopefully samsung will fix in the future. Here is a link to a guy who did a kernel patch if rebuilding the kernel is your thing and you really need to get UsbManager working. I have not tested but plan to eventually, and will leave a comment on my thoughts. http://forum.xda-developers.com/showthread.php?t=1233072

I am facing same problem but you can use one method deviceName(), after enumerating device you can store device name in a string using device.getdeviceName() method.

you will get exact device name appart from full information of device.

Samsung has removed the USB API from the Android Kernal

i think you should define the device you want to recognize in resource/xml/device_filter.xml. you can referring the android api.

There may be another (nasty) reason why you can't see your HID device.

UsbHostManager.beginUsbDeviceAdded() "Called from JNI in monitorUsbHostBus() to report new USB devices". This method calls a private method isBlackListed() which will unconditionally filter out all HUB's, and HID's with subclass BOOT. This may be the reason why you don't see HID devices when you do a getDeviceList()

If anyone has a workaround to this, I think that there are a fair amount of users out there who would appreciate see this.

I have had succesfully attached my Arduino Uno to my samsung galaxy tab 10 P7500. If you have a problem connecting it, It is because the tablet deny permission for the usb devices that doesn't have external power. Try to power your device externally using 5 or 3.3 Volt AC/DC Adaptor, for the first time, if you find your device attached and fire the intent, unplug the power adaptor, and your device would operate without external power, the tablet itself would give the power through USB OTG

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!