This post is how I manage to assemble the pieces to make a logger for my car.
I own a Subaru WRX 2002 (US) I wish to be able to see some ecu parameters in a screen in a portable solution.
At first (2006) I wish a Linux carputer with a touchscreen, but the HW was expensive and there were no good OS interface.
I could use a laptop but still too big.
Then I discover Nokia tablets.
I owned a N810 that I manage to connect to the car using an adapter and a Tactrix cable. I used this because I tune the car with RomRaider (http://www.romraider.com
The problem was that the open sourced program was made in java so it was slow and unresponsive.
Anyway, I fell in love with the tablet, so I sold my N810 to get
the N900 phone.
I almost shot myself when I learned that the N900 does not support USB OTG like the N810.
Then MohammadAG announce the USB host mode (H-E-N Thread
)I thought that maybe possible so I installed it ( I already have powerkernel).
So I connect my old adapter and yes it work, except for the drivers to the serial port.
I did some digging and found the drivers were compiled for me and come with the installation of the powerkernel46.
They are not loaded by default, but they are available in /lib/modules/184.108.40.206power46.
I needed usbserial.ko and ftdi_sio.ko ( the Tactrix cable use this chipset).
The modules where added to the kernel using the following commands:
The port was mapped successfully to /dev/ttyUSB0 after you enumerate in H-E-N.
Now the Java on the phone part:
I learned in this thread (Java Thread
that I could run java applications and installing an official java engine from Sun(Oracle).
With this, the application works, but the logger part failed, because of the lack of the librxtx-java library that connects it to the cable.
Here comes the black magic:
After several failed attempts with the libraries from the RXTX site compiled for arm, the libraries were old so they conflicts with the ones in the N900 like libpthread.so,
it occurs to me that the Debian libraries should work. So I download the librxtx-java deb package from the debian libraries for armel in here (Librxtx lib Debian package
) and force it in with:
dpkg --install --force-all librxtx-java_2.1.7r2-4_armel.deb
The reason I have to force it, is because the we do not the java-runtime installed. Perhaps we could install it from the Debian also instead to avoid the brute force.
For some reason, the package install the file in unexpected directories(/usr/share/lib), so I have to move the .so libraries to /lib.
I also copy the RXTXcomm.jar from the debian installation to the lib folder of the RomRaider program.
After I copy the files I unistall the package to avoid the invalid problems with the apt.
Now, I can connect the cable, enable the port using H-E-N and start the java logger program with:
java -jar RomRaider.jar -logger
I test it with two parameters(manifold relativ pressure and exhaust gas temperature) and get 7-8 refresh per second, in my phone!
More dicussion about it in: http://talk.maemo.org/showthread.php?p=91624