Android devices do not recognize connected equipment with FTDI chip

I made an Android app that communicates with custom hardware through the FTDI 230X chip. The application works great and interacts with the connected device. But on some phones / tablets, this does not work in the sense that the Android device does not recognize the connected device through OTG, even the phone / tablet supports OTG. The app has been tested on at least 12 different devices with Android version 4.0 to a later version. Perhaps in half of them, the application works fine and recognizes attached equipment, and the other half does not see the connected device.

I can’t understand what is the cause of this problem because the application uses the USB host API. In addition, I conducted a test with root and unexpanded devices, so it does not depend on this.

Does anyone have any ideas what else should I try or check? Or is this problem dependent on the manufacturer of the Android devices in such a way that they did not include driver support for FTDI chips when creating the OS?

+6
source share
1 answer

Does the application verify that the USB host is supported or not on the phone / tablet? This check should be added even after the manifest is declared. The verification method is to use the package manager:

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

isUSBhost will be TRUE if the host functionality is supported by the FALSE phone / tablet. This code can be placed at application startup (for example, in action), and the result can be used to direct the subsequent stream.

+2
source

Source: https://habr.com/ru/post/970102/


All Articles