1

I am building a C library that interfaces the FTDI FT232H USB to SPI converter. It currently works on Windows/Linux with the D2XX drivers.

On Android (6), the library will be accessed through JNI on devices running armeabi-v7a and arm64-v8a architectures.

Problem: FTDI isn't explicitly supported by Android.

The D2XX Linux drivers are using hard-floats, but Android requires soft-floats. What are my alternatives?

Tim Hansson
  • 309
  • 2
  • 16

2 Answers2

0

I recently built an Android app that communicates through a similar chip (FT2232H).

I had to compile a kernel with the FTDI single-port serial driver to make the device natively support FTDI chips. This, of course, means rooting the device and finding the kernel source that the device manufacturer is legally required to release by the GPL.

For what it's worth, I used the chip in VCP mode using a Java wrapper library for the Linux syscalls

Kai
  • 2,529
  • 1
  • 15
  • 24
  • Even though we have a rooted phone, this must run on non-rooted devices. Is the driver for FT2232H and FT232H the same? Would any of these work for my use case https://www.intra2net.com/en/developer/libftdi/index.php? – Tim Hansson Mar 13 '19 at 08:09
  • The driver supports pretty much all FTDI chips: https://github.com/torvalds/linux/blob/master/drivers/usb/serial/ftdi_sio.c To read/write to the serial device, I don't think there's a way to get around root. LibFTDI appears to need the kernel driver as well because it accesses the chip as a TTY device. You might want to post to their mailing list and see if anyone is aware of a workaround, though – Kai Mar 13 '19 at 18:41
0

I'm facing in the exact same situation. I need a native solution to write to ftdi chip on android devices (armv7a,armv8,x86). A proper solution I've found is compiling libusb 1.x and libftdi. libusb can be compiled from the last release and as for libftdi you may take the diffs to catch up with v1.5. forked libftdi for android original libftdi

itorra
  • 1