We are getting started with ArduPilot and a R/C car to slowly warm up to the autonomous stuff and getting acquainted with ArduPilot. So to keep costs low, we will use my rooted T-Mobile G1 to provide GPS coordinates, accelerometer data, to make a movie, transmit over WiFi or GPRS/UMTS etc. Because I'm lazy I'll just cross-post from xda-developers
. The beauty of it is that the serial output from the G1 is 2,8V TTL, so it should very likely work with the ArduPilot, which is 3.3V TTL (I actually haven't tested it yet, just got it working yesterday night). Please see the original post for links and the kernel config.
Okay, I got it working! Instructions are for Ubuntu only, sorry. I believe you need a rooted phone with engineering (or hardspl or comparable fastboot-enabled) bootloader and macpods serial to usb cable (or something comparable).
1) Compile Android source with Dream-specifics as described by this. You probably only need prebuilt and kernel, but I'm not very familiar with git and just got everything.
2) cd into the kernel directory, copy macpods serial9600config from above as .config there
3) "make ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi- oldconfig" I don't remember if this asks for anything at all, if it does, go with the suggested answers
4) "make ARCH=arm CROSS_COMPILE=../prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin/arm-eabi-" - You now have a kernel image for Android 1.0 (I think), but for me it works with JFv1.51 as well
5) You can now compile fastboot in $ANDROIDSOURCE/system/core/fastboot or grab the precompiled binary from http://android-dls.com/files/linux/fastboot
6) Hook up your phone, power off, start with camera+power. Press back when the skating androids appear to switch to fastboot mode.
6) Do ./fastboot boot $ANDROIDSOURCE/kernel/arch/arm/boot/zImage and wait. This takes a moment, then it should start.
You know should have /dev/ttyMSM2 which you can echo into (echo "hello world" > /dev/ttyMSM2) or listen to (cat /dev/ttyMSM2). For instance, I'm building an Android app that passes GPS coordinates over the console to an ArduPilot board and will provide telemetry to a ground station. Testing it with "Serial port terminal" from the Ubuntu repository works as well (remember to choose 9600 bauds and the right port).
Thanks to to macpod for his excellent work, kernel config and help with building the cable, Google for providing such a kick-ass (somewhat) open phone and all the kernel hackers and rooters for their work.
I just wrote this from the top of my head, just post if you have trouble getting this to work.