Android devices doesn't recognize attached hardware with FTDI chip
Asked Answered
A

1

6

I've made an Android application that communicates with custom made hardware over FTDI 230X chip. The application works fine and communicate with attached device. But on some phones/tablets it doesn't work in sense that Android device does not recognize attached device over OTG even phone/tablet have support for OTG. The application is tested on at least 12 different devices with Android version 4.0 to newer. Maybe on half of them application works fine and recognize attached hardware and other half doesn't see attached device.

I'm not able to understand what cause this problem because applicaton is using USB host API. Also I made test with rooted and unrooted devices so it doesn't depend about that.

Does anybody have idea what else I should try or check? Or this problem is something that depends about android device manufacturer in a way that they didn't include driver support for FTDI chips while building OS?

Aflutter answered 30/5, 2014 at 18:49 Comment(0)
W
2

Does the application verify that USB Host is supported or not on the phone/tablet? This verification is to be added even after manifesto declaration. The way to verify is through using package manager:

PackageManager pm = getActivity().getPackageManager();
boolean isUSBhost = pm.hasSystemFeature(PackageManager.FEATURE_USB_HOST);

The isUSBhost will be TRUE if the host functionality is supported by the phone/tablet else FALSE. This code can be placed at application startup (i.e activity) and the result can be used to direct the subsequent flow.

Worthington answered 31/5, 2014 at 19:37 Comment(2)
I've tried this on my phone that does not recognize custom hardware. It shows TRUE. My phone is HTC Desire 500. My second device is tablet Prestigio PMP7280C and this device also have USB host support and recognize my custom hardware with FTDI chip without and problems. That's strange...Aflutter
Same problem here with Samsung Galaxy Tab 3 Lite and Samsung Galaxy S4 Mini.Gleiwitz

© 2022 - 2024 — McMap. All rights reserved.