ANDROID_ACM vs ANDROID_SERIAL

269 views
Skip to first unread message

Geary

unread,
Dec 14, 2010, 1:30:45 PM12/14/10
to Android Linux Kernel Development
I'm trying to configure an Android kernel to support connecting the
phone as a USB gadget using the CDC ACM protocol. I'm making progress
in understanding how to configure the kernel for this, but it seems
something new pops up every day. One thing I don't understand about
the Android Gadget configuration is the difference between
CONFIG_USB_ANDROID_ACM and CONFIG_USB_ANDROID_SERIAL. Can anyone
explain the difference? I see that ANDROID_ACM compiles f_acm.c and
u_serial.c, while ANDROID_SERIAL compiles serial.c and u_serial.c.
(All of these files are in drivers/usb/gadget.) But I don't understand
the difference. The comments in f_acm.c and serial.c both mention CDC-
ACM. Does anyone have any guidance on these two options?

Mike Lockwood

unread,
Dec 14, 2010, 1:59:52 PM12/14/10
to android...@googlegroups.com
I don't see any sign of CONFIG_USB_ANDROID_SERIAL in my kernel
sources. Which kernel branch are you working from?

I know some people are using the gadget ACM serial support in our
2.6.36 tree in the common repository on kernel.org, so that should be
working. But it sounds like you might be using someone else's kernel,
in which case you would need to check with the maintainers of that
kernel.

Mike

> --
> unsubscribe: android-kerne...@googlegroups.com
> website: http://groups.google.com/group/android-kernel
>

--
Mike Lockwood
Google android team

Geary

unread,
Dec 14, 2010, 2:25:40 PM12/14/10
to Android Linux Kernel Development
You're right, Mike. I didn't think of that. I'm using the kernel
source for the Evo from the HTC developer site. They must have added
CONFIG_USB_ANDROID_SERIAL. I didn't check it against the AOSP source.

Sounds like, unless they've introduced some dependency, that I could
get by with only CONFIG_USB_ANDROID_ACM. I'm going to try that and see
if it works.

Thanks for the reply.

Geary

Hamilton Vera

unread,
Dec 14, 2010, 2:56:56 PM12/14/10
to android...@googlegroups.com
You will only need to compile your kernel using CONFIG_USB_ACM=y .

Then you must modify your reference-ril.c, init.rc and
system/etc/init.gprs-pppd .

- reference-ril.c respecting your modem capabilities
- init.rc service ril-daemon /system/bin/rild -l
/system/lib/libreference-ril.so -- -d /dev/ttyACM0
- system/etc/init.gprs-pppd adjust the device to your serial device port


[]'s

Hamilton Vera

--
Hamilton Vera
int Administrator (char Network[],char ComputationalSystems[])
http://hvera.wordpress.com

Geary

unread,
Dec 14, 2010, 4:14:32 PM12/14/10
to Android Linux Kernel Development
I might have a problem with changing reference-ril.c. It's not in my
Supersonic source tree.

Those sound like radio-related changes. Do I need those if I'm only
going to use CDC ACM through the USB port? And the phone will be the
gadget or device. The other end is the host USB side. Actually, the
other end is a military box, and wants to use CDC ACM, but it's
actually not considering it a modem per se. In other words, I can't
use programs like Hyperterminal and minicom to test. I hope that makes
sense.

Geary
Reply all
Reply to author
Forward
0 new messages