carpc
carpc

I finally replaced the stock headunit of my car with a linux carpc that I built. It was several years I was planning it... But after one year of using a fmradio transmitter that was picking up all sort of interference, and due the lack of any mp3 or aux-in capability of my cd player I decided it was time to stop with the hacks and to finally build the real thing with linux.

Hardware list: Carnetix P1900 with macpack, linitx 7" transflective touchscreen lcd, mac mini, BU353 sirf star IIII usb, nova-t usb2 dvb-t and amplified dvb-t car antenna, r100 usb radio, bluetooth usb dongle, THA-275 amplifier (sounds great). (in the pic you'll see the THA-475 but one week later I later I replaced with a THA-275 in 2-ohm configuration for various reasons not relevant to mention here)

If I would do it again surely I wouldn't bother to add the dvb-t and fm radio receivers, this is only wasted money and wasted time: dvb-t reception is bad while driving, a few buildings are enough to temporarily lose signal. Fm radio is too low quality and I don't like its content in Italy, if compared to all radios available with 3G streaming (through my cellphone). elisa supports natively both an huge list of great southcast radios and youtube. So if 60G of space aren't really enough to fit all you need on the road, 3G streaming is surely preferable any dvb-t or fm radio. wifi streaming of course works too (wpa_supplicant with madwifi driver) but obviously not while driving.

I also had to make a few changes to wine sources for focus and alsa and another very important hack to suspend.c so that it waits 5 seconds after it switched to console before it freezes, and so that it waits 5 seconds also after resume before it switches back from console to graphics mode. Without such an hack resume can't work reliably and touchscreen calibration is always screwed up after resume. The usb gps also isn't resuming as /dev/ttyUSB0 but it changes from USB0 to USB1 after every suspend/resume cycle, so in the script that runs s2disk I simply rename ttyUSB1 to ttyUSB0 after s2disk returns and that's enough to make resume work flawlessy for the gps apps.

As GUI I'm running KDE3.5 on it (suspend/resume make it play in less than than 30seconds after turning on the car, shutdown time is irrelevant as it happens after I'm already out of the car but it also doesn't take more than 30-40 sec) and I switch between gps apps and elisa with a vertical panel with only a taskbar in it, that grows in size when more apps are run. I've also configured a couple of mouse gestures to simulate alt-tab, and to iconize apps, or move them above the edge of the screen (screen resolution is native 1:1 at 800x480 so screen it's not very tall and not all control windows fit).

In practice I only use the elisa media player and the gps apps and I switch between them with the tiny panel-taskbar. They all runs fullscreen without kde borders, and I set them with properties of 'keep below others' so the tiny taskbar remains visible in the foreground in the bottom right corner (and growsup, growsleft not).

I had to leave 20G to osx practically only as bootloader and to be able to upgrade the bios if I ever want to. The bootloader could be moved to the efi partition but I heard of boot time delays if one does that, so I didn't bother to lose 20G to avoid risking to boot in more than 20-30sec, 60G are more than enough to fit all my data. Still better to lose 20G because of osx than because of other proprietary OS ;-).

On the touchscreen side the major trouble was calibration, swap_xy has to be set in the kernel driver and still swapy of evtouch has to be set in the X config file (or you can invert maxy and miny values). The taptimer has to be set to 150 and the longtouchtimer to 250, or there's no chance you'll ever be able to right click with the halftap trick. After that even right click is fully reliable.

I also added a gotemp USB termometer in the back of the lcd (where the p1900 is also located) to monitor temp with a cron job that launch an xmessage if temperature exceedes some limit. Another script monitor the core 2 duo internal temp sensors to be sure the macmini doesn't overheat. After driving two hours with heating on in the car, the back of the touchscreen (inside the dash) didn't exceed 55 degrees which is fine, the mac mini core 2 duo CPUS stayed around 60 degrees so ambient around the cpu was suppsedly lower than 60 degrees. elisa and the gps tracking my position at all times don't take more than 50% of the cpu in average which leaves the cpu always at the lowest freq available with the ondemand cpufreq controller.

When I need to upgrade software or upload data I only need to unplug usb, carnetix and vga cables to get the macmini out of the passenger tray and boot it with the power supply near my access point so I connect to it with ssh, rsync and vnc.

Overall it's working perfectly and it largely exceeded my best expectations, both in terms of sound quality, usability and safety.

I can't touch the touchscreen while driving but setting a long enough playlist is enough to avoid needing that.

carpc in my home waiting car mounting carpc mounted in my car but before the final close of the dash
Sun 2008-12-28 18:32:46 +0100 technologies