Tuesday, February 13, 2007

CarMan



Now it is time to talk about that python project I've been working for some time. Carman is a system for accessing on-board diagnostics of any car compliant with the OBD-II standard.

The project is Open Source, LGPL licensed and almost 100% written in python. Basically, it consists in three elements:


  • OBDlib:

  • This is a low level library responsible for the communication between the Maemo device (770 or N800) and the car's OBD system, doesn't matter if it's done by bluetooth or serial port.

  • Gtk+/Hildon UI:

  • This user interface is meant for more precise diagnosis. With it we are able to acquire data from all sensors or just a reduced set, record and play the data, perform tests and read fault codes with detailed description.

  • SDL (PyGame) UI:

  • We call this user interface "Rich View". It is mostly used for Gauges visualization and it is highly customizable via XML.


I'm already working on a complete refactoring of the GTK UI. The code is not too bad for my first python project, but it really can be improved a lot. The project is hosted at maemo garage. So, join the mailing lists and report bugs at will. More information can be found in the project web page.

8 comments:

Unknown said...

Hi, Eduardo!
Sorry for disturb. I've downloaded Carman from CVS and tried to compile and run it under Scratchbox but it demand python2.5-dev installed and I failed to install it under Scratchbox because there is no python2.5-dev in standart repository (failed to do [sbox-SDK_X86: ~] > apt-dev install python2.5-dev) and manual installation by "[sbox-SDK_X86: ~] > run-standalone.sh ./python2.5-runtime.install" said "/usr/bin/run-standalone.sh: line 11: ./python2.5-runtime.install: Permission denied" or by "[sbox-SDK_X86: ~] > fakeroot run-standalone.sh ./python2.5-runtime.install" said "cat: /home/root/.osso/current-gtk-theme: No such file or directory
/usr/bin/run-standalone.sh: line 11: ./python2.5-runtime.install: Permission denied". Any ideas? What am I doing wrong?

etrunko said...

Hi Oleg,

You'll have to manually edit the /etc/apt/sources.list inside the scratchbox environment and then add the following lines:

deb http://repository.maemo.org bora free non-free
deb-src http://repository.maemo.org bora free non-free

deb http://repository.maemo.org/extras bora free non-free
deb-src http://repository.maemo.org/extras bora free non-free

Unknown said...

Okay. Thanks for fast answer!
It helps to install Python developer package but there is still problem with compilation.
I hope I was right in trying to start compilation in Scratchbox under X86 target to be able to test in Scratchbox environment. But doing something like "[sbox-SDK_X86: ~/carman/source/trunk] > ./buildtesting.sh" results in "Building architecture dependent packages... obdlib-i386./buildtesting.sh: line 45: /usr/bin/scratchbox: No such file or directory
Change scratchbox target failed! Exiting." What's wrong? Should I run it outside the Scratchbox? I tried but it said "[: 16: ==: unexpected operator
./buildtesting.sh: 43: Syntax error: "(" unexpected".
Sorry for stupid questions.

Unknown said...

Trying to resolve the problem by myself and diving into buildrelease.sh build file. And I can't understand something. There is a build_sb_package function which uses scratchbox_run function which starts /usr/bin/scratchbox. But /usr/bin/scratchbox exists only outside of scratchbox. And there is a build_host_package function which uses fakeroot dpkg-buildpackage. And as I understand the last one is should be running inside scratchbox. Could you please explain the build process?

Unknown said...

And sorry again for annoying behaviour.

etrunko said...

Hi Oleg,

I'm afraid I can't help you with this build scripts issue... You might probably want to build the packages manually. The build order is the following:

obdlib
carman-common
carman-gtk

You could also try asking in the carman-devel mailing list. Please follow the link to sign the list:

https://garage.maemo.org/mail/?group_id=189

Best Regards, Etrunko

Unknown said...

Thank you very much, Eduardo! I will try.

Anonymous said...

Oleg,

this problem is probably due to the fact that your /bin/sh is a symbolic link to /bin/dash. If that is true, run the command dpkg-reconfigure dash. Or try the new version in the trunk.