2

I have been trying to get the FTDI D2xx driver working with my Android 2.3.4 tablet for a while now. After solving a number issues relating to actually loading the driver I am now in a situation where the FTDI device is just not seen by the sample application FTDI provides.

There are no errors reported in either LogCat or Java (debug) the device is just simply not found.

Java_com_ftdi_D2xx_getDeviceInfoList() returns zero.

The tablet is rooted, and the permissions for the ueventd.rc file are set to:

/dev/bus/usb/* 0666 root usb

The USB port I have connected my TTL-232R to does work (in that I can read a USB memory stick with it at least...)

Has anyone else experimented with this and/or got it working? If so some pointers would be greatly appreciated!

Many thanks

Dan Dyer
  • 53,737
  • 19
  • 129
  • 165
FiniteRed
  • 810
  • 3
  • 10
  • 20
  • Hi. I am also working on an FTDI D2xx driver. Can you give me some help on how to try the D2XX sample? Thanks. – SleepNot Aug 31 '12 at 03:10
  • Hi jeraldov How far have you got with this? Also what android device / OS are you using? - you may hit the same issue as me unfortunately... – FiniteRed Sep 04 '12 at 10:18
  • I have actually been able to ran the sample on my phone. but may i ask you if you are using any device to get a list of device or device info? – SleepNot Sep 04 '12 at 10:32
  • Sadly that the bit I cant get to work, it just never gets any devices to populate the list with - for the reasons outlined below. Sorry that not much help :( – FiniteRed Sep 17 '12 at 15:51
  • It is likely that either the raw USB device listed in your question, or whatever device node your driver exports (if it even has been created) does not have permissions for access by an Android application process. Although you say your device is rooted, this **does not apply to applications** - they always run as unprivileged user ids. Various tricks may let an app run a helper process as root, but it would be better to change the permissions of the node in question. In a fully custom build, create a matching unix group and android permission, similar to how external storage was handled. – Chris Stratton Oct 09 '14 at 15:10

2 Answers2

1

Does 2.3.4 support USB Host?

http://developer.android.com/sdk/android-2.3.4.html

No USB host support — Android 2.3.4 and the Open Accessory Library do not support USB host mode (for example, through UsbDevice), although USB host mode is supported in Android 3.1. An Android-powered device running Android 2.3.4 can not function as a USB host. The library enables the Android-powered device to function as a peripheral only, with the connected accessory functioning as USB host (through UsbAccessory).

I've got the sample working with ICS.

spatial
  • 26
  • 1
  • ah - that's interesting - ill give it a go in ICS - thanks :) – FiniteRed Aug 07 '12 at 11:27
  • In actuality, this is not relevant as the poster is not using an Android USB-API type of method, but rather the older "traditional linux" method where a custom kernel driver is loaded. It's entirely possible that their hardware does not support USB host (or supports host operations but is unable to supply VBUS), however for this method android-level support is not required. – Chris Stratton Oct 09 '14 at 15:04
0

Well, I must manually switch from USB peripherals to USB host and vice versa in terminal emulator, since stock kernel does not support otg, custom kernel support otg, but not turn it on automaticly.

cmd1="echo host > /d/otg/mode"; // usb otg host on
cmd2="cat /d/otg/info</";    // check usb status, must be usb a_host and otg=1
cmd3="echo peripheral > /d/otg/mode"; // usb oth host off
Adeii
  • 11
  • 1