[Xperia Arc General] Bylos:
Hello everyone,

I left my old galaxy spica few weeks ago for an Arc S, especially for the USB Host ability, and I was looking forward to get a phone for interfacing many devices I'm using at work.

Most of these devices use a FTDI chip enabling virtual serial COM port on USB, and now FTDI gives support to applications on Android OS :

[see FTDI website]

So I've been able to go through adding drivers to the kernel and start communication on a ZigBee network with Terminal Emulator.

Only a rooted phone is needed, no bootloader unlocked (you don't have to flash anything to add the drivers)

For anyone interested in using virtual COM port on their Arc / Arc S, these are the few steps to add support for FTDI chip (I did this with Ubuntu 11.10 on VMware Player, with almost no issue compared to building kernels for Galaxy Spica) :

1. Download Android NDK rev. 5c (newer give some issues when compiling kernel) to have a prebuilt toolchain, unzip in Home directory and add path to your environement var :

export PATH={HOME}/android-ndk-r5c/toolchains/arm-eabi-4.4.0/prebuilt/linux-x86/bin/:$PATH

2. Clone kernel repository depending on your ROM (4.0.2.A.0.42 for me) :

http://xdaforums.com/showthread.php?t=1312692

Many thx to DooMLoRD for this repo !

git clone -b 4.0.2.A.0.42 https://github.com/DooMLoRD/Xperia-2011-Official-Kernel-Sources.git

3. In kernel folder, add the default config file for your phone (Arc = anzu, Arc S = ayame)

cp arch/arm/configs/semc_ayame_defconfig .config

4. Edit config file to add USB serial drivers compilation as modules

ARCH=arm CROSS_COMPILE=arm-eabi- make menuconfig

Go to -> Device Drivers -> USB Support, highlight 'USB serial converter support' and press 'M' to include it as kernel module.

Go into the new submenu, highlight 'USB FTDI Single Port Serial Driver' and press 'M' to include it as kernel module too.

You can also choose any other USB serial converter depending on the manufacturer of your device

Leave menuconfig and save your config file

5. Build modules :

ARCH=arm CROSS_COMPILE=arm-eabi- make modules

6. Copy the drivers 'usbserial.ko' and 'ftdi_sio.ko' located in kernel/drive/usb/serial on your SD Card (don't forget usbserial.ko, this file is omitted in FTDI technical note)

7. On your phone, in Terminal Emulator, install the two drivers in this order :

$ su
# insmod usbserial.ko
# insmod ftdi_sio.ko

8. add this line to the file /ueventd.rc to give permissions :

/dev/ttyUSB* 0666 root root

9. plug your device, and even if it's not recognized by the phone, you should see 'ttyUSB0' in /dev !!!

Now you can play with Terminal Emulator using 'stty' to configure serial port and 'echo blablabla > ttyUSB0' to send some text ;)

I've attached to this post a .zip file containing the two kernel modules for my config : Arc S (rooted, not unlocked) - 4.0.2.A.0.42

So you just have to follow this tutorial from step 6 (steps 1-5 can take some time)

Acknowledgement : DooMLoRD for the very useful repo, FTDI for the technical note and SE for the config files, avoiding hours of kernel config

Regards

PS : It's my first post so I've not been able to add this in dev section, especially in this thread : http://xdaforums.com/showthread.php?t=1224676&highlight=usb and to give external links to DooMLoRD github repo and FTDI technical note, sorry for that (moderators can feel free to move this thread in the right section)

PPS : I'm not a very skilled developper, but I will try to do my best to give some support for this

PPPS : Well, sorry for my poor english