
It gives all the features of a commercial Android platform plus many tools that come very handy for embedded work. For myself when working with embedded android project I use the excellent CyanogenMod distribution. Rooting the phone and installing CyanogenModīecause the standard Droid phone come with the serial driver, the phone has to be rooted. Make sure you download both the kernel and the modules. You can download it from the links below. I have provided a pre-built kernel and modules for Motorolla Droid running Cyanogen 6.1. If you are not lucky to have the kernel on your device that supports the serial port you have to build one yourself. I used the Silicon Laboratories CP2103 evaluation kit which is available from DigiKey. More information about such dongles could be found here: Some devices such as Motorola Droid require a special dongle to switch the USB port to the host mode. Obviously, you'll need an Android device either with built-in serial port or USB port that could switch to a host mode. You have been warned, proceed with caution. Also if you are not very careful you might end up breaking your phone. Deviceįollowing the steps below will void your phone warranty. This library was tested in the following environment. Here is a picture of the test program running on the Motorola Droid connected via serial port to the embedded device running FreeNAS. The current port is based on the GNU.IO library version 2.1.7. Unfortunately the Android Java environment and the Linux environment are different enough from the standard Linux or Windows enironment that the library could not be used as is. The RXTX library started as an implementation of Sun's JavaCOMM API and now it grew into an independent project. I also use it to interface the Factor programming language with the same XBee module.This is an informational page for my port of the RXTX library to the android platform. This is what I chose to interface a Scala program with a XBee Pro module through a serial interface to interact with my students devices. However, there exist at least one other solution which does not require the use of any external library. It is simpler to setup than RXTX, is hosted on GitHub and is actively maintained. PureJavaComm is a drop-in replacement for those two libraries, written in Java and using JNA to interface with the system. The last stable version is 2.1.7 from 2006. It is hosted on a CVS server and it looks like the 2.2 release will never go out since it got stuck on version 2.2pre2 released in 2009. RXTX is a mix between Java code and C code accessed through the Java native interface. It is available for Solaris SPARC, Solaris x86, and Linux x86. The Java Communications 3.0 API looks awfully old and unmaintained. There exist several solutions to do this in Java: Every once in a while, I see people having a hard time accessing a RS232 or USB serial port from Java.
