Experiences with Linux on a CarPC
As I love Linux it was a natural choice to use it in my carPC. I have a pretty slow computer (miniITX with Transmeta Crusoe 533MHz, 64 Mb ram) so the software have to be gentle with the resources.
I began to test various storage hardware, but I never succeded booting a CF-card with an IDE-CF adapter. Now I use a 2,5" harddrive, it's small and quiet and it's muck easier to work with.
What distribution to use? I considered Slackware and Gentoo as those are my usual distros of choice, but then I read about Arch Linux (http://archlinux.org) which has really short boot times. It is not userfriendly though, so it's not for the beginner. I managed to install it and it supports my hardware without problems. I use Fluxbox as windows manager which is pretty light, with Fluxbox started the computer still has 2/3 of it's memory free. When I got this far it was time to see if I can get the gps and Wifi going. I also wants to tweak the installation to get rid of the login and so.
My GPS device is a BU-303 which talks NMEA. Neat and cheap, bought the device for about 45¬. The first software I tested was GpsDrive (http://gpsdrive.kraftvoll.at) which works really well. Check that the pl2303 module is enabled in the system kernel, install GpsDrive and launch. Set GpsDrive to use NMEA and set the port to /dev/tts/USB0, and we are ready to go. Maps are easy to get if you are connected the the net. Click download map, choose resolution and download. Done!
I wanted to use a usb-connected card from Philips, not that it is the easiest card to use but I had it laying unused in a drawer. There's no native Linux support, so I have to use Ndiswrapper and Windowsdrivers:
pacman -S ndiswrapper
Go to http://ndiswrapper.sourceforge.net/m...index.php/List and find your card. Mine was a Philips CPWUA054 usb 11g:
Card: [Philips] CPWUA054 usb 11g
* Chipset: Accton Technology Corp
* usbid: 083a:5501
* Driver: provided in CD : ccucpwua.exe cpwua2d.inf cpwua2d.sys
* Other: 2.6.9-gentoo-r4, Ndiswrapper 0,11 , works fine but got once a kernel oops, I'll be back if I get it again
I copied the drivers from the cd and run the following commands:
ndiswrapper -i CPWUA2D.inf
Installed drivers: cpwua2d driver installed, hardware present
ndiswrapper version 1.15 loaded (preempt=yes,smp=yes) ndiswrapper: driver cpwua2d (Royal Philips Electronics N.V.,05/27/2004, 184.108.40.206) loaded wlan0: vendor: 'Wireless USB Adapter 11g' wlan0: ndiswrapper ethernet device 00:30:f1:dc:e2:16 using driver cpwua2d, 083A:5501.F.conf wlan0: encryption modes supported: WEP; TKIP with WPA; AES/CCMP with WPA usbcore: registered new driver ndiswrapper
The hardware seems to be ok, time to configure the network:
iwconfig wlan0 mode Managed
iwconfig wlan0 key restricted XXXXXXXX
iwconfig wlan0 essid ESSID
Test that values are set:
wlan0 IEEE 802.11g ESSID:"MyEssid" Mode:Managed Frequency:2.447 GHz Access Point: 00:13:10:3F:4B:5C Bit Rate:36 Mb/s Tx-Power:32 dBm RTS thr:2347 B Fragment thr:2346 B Encryption key:XXXX-XXXX-XX Security mode:restricted
wlan0 Link encap:Ethernet HWaddr 00:30:F1:DC:E2:16 inet addr:192.168.0.165 Bcast:192.168.0.255 Mask:255.255.255.0
All ok! I wanted the card to be configured after reboot, so I edited rc.conf:
wlan0="wlan0 192.168.0.34 netmask 255.255.255.0 broadcast 192.168.0.255"
INTERFACES=(lo eth0 wlan0)
wlan_wlan0="wlan0 essid MyEssid key s:wirelesspassword"
I haven't got the settings in rc.conf to work fully, have to try that some more.
Edit: Working now with above settings!
First tests with music is done with the small command line based player mpg321.
Sound is handled by ALSA which has to be installed:
pacman -Sy alsa-lib alsa-utils
Next, find out which soundcard we're dealing with:
00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT82C686 AC97 Audio Controller (rev 40)
Check which module to use on http://www.alsa-project.org/alsa-doc/, this in my case gives snd-via82xx. Load module:
Start volume control (alsamixer) and unmute channels Master and PCM (In my case I had to unmute Headphone too, but that's unusual). Press M to unmute, arrow up to raise volume, Esc to quit.
Add snd-NAME-OF-MODULE to the list of MODULES in /etc/rc.conf (MODULES=(snd-via82xx)) to have sound after next reboot. Install mpg321 and try to play a track:
pacman -S mpg321
High Performance MPEG 1.0/2.0/2.5 Audio Player for Layer 1, 2, and 3.
Version 0.59q (2002/03/23). Written and copyrights by Joe Drew.
Uses code from various people. See 'README' for more!
THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK!
Title : Lieslieslies Artist: Ministry
Album : Rio Grande Blood Year : 2006
Comment: Lb:13th Planets C:Promo Genre : Industrial
Playing MPEG stream from ministry.mp3 ...
MPEG 1.0 layer III, 128 kbit/s, 44100 Hz joint-stereo
...and Al is screaming LiesLiesLies!
To use soundcard as a regular user you have to be in the audio group. Open /etc/group as root and add user:
I don't think I will use DVB in the car, but I try to install it for an article I'm writing. It doesn't hurt to share the experience, and this is a good notepad for me when I have forgotten how I done it...
The hardware is a usb-connected Twinhan USB Ter (http://www.twinhan.com.tw/product_terrestrial_3.asp). The device is plugged in and dmesg is run:
dvb-usb: did not find the firmware file. (dvb-usb-dibusb-220.127.116.11.fw)
I download the missing firmware from http://www.linuxtv.org/download/dvb/firmware/ into /lib/firmware which I first create:
I unplug the device and plug it in again:
dvb-usb: found a 'TwinhanDTV USB-Ter USB1.1
DVB: registering frontend 0 (DiBcom 3000M-B DVB-T)
To tune and scan channels we need dvb-apps, which is best to download via CVS. Lets install CVS:
pacman -S cvs
Then we download and install dvb-apps:
cvs -d :pserver:[email protected]:/cvs/linuxtv checkout dvb-apps
Scan for channels. Look in folder dvb-t, dvb-s or dvb-c for a sender near your location:
./dvbscan dvb-t/se-Trollhattan > channels.conf
I try to watch DVB with MPlayer, let's install it:
pacman -S mplayer
Start MPlayer so it creates it's config-dir, stop it and copy the channel list we made above:
cp channels.conf /home/user/.mplayer
Start MPlayer again:
If everything worked out ok MPlayer will now show the first channel in the channel list. I haven't figured out exactly how to switch channel yet, but if you use KDE the player Kaffeine is recommended for DVB use.
This works good, a bit amazing though as Twinhan recommends a PC with a 2GHz CPU, 256 MB ram and Windows for this unit... Here we are at a 533MHz with 64 MB ram and Linux :)
Well I tried some frontends now. Some good, some is a pain to install.
MythTV - Easy to install, good to use but slow.
Mpeg Menu System V2 (http://mms.sunsite.dk) - Good! But unmature and hard to launch external commands.
Freevo - it's nice on my workstation, but a real dependency hell to install on Arch... Got it installed now, but it's too slow on my system.
Guess I'll stay with MMSV2, has been working on a solution for the external GPS-software that works (see below).
I've added a Bluetooth-usb-dongel to the setup to connect to the internet with my mobile phone. Nothing fancy really but it works. Tip: Use Wvdial instead of all those creepy configurationscripts. My /etc/wvdial.conf looks like this:
Modem = /dev/rfcomm0
Phone = *99#
At first I did some experiments with a usb-connected gamepad but didn't find it useful. Then I bought a usb-connected numpad which seems to be usable. The first thing I did was to use Fluxbox's configurationtool Fluxkeys to set some keyboard shortcuts up (KP = keypad = numpad):
KP_Add = Next window
KP_Subtract = Close (? not working good)
KP_Divide = MMS
KP_Multiply = Gpsdrive
This way I can press * on the numerical pad to launch Gpsdrive, / to launch MMS and + to switch between windows. I also had to alter $HOME/.Xmodmap to be able to use the arrowkeys on the numpad in MMS:
keysym KP_Up = Up
keysym KP_Down = Down
keysym KP_Enter = Return
I also added 'xmodmap $HOME/.Xmodmap' to $HOME/.xinitrc.
Now I can launch MMS and browse the menus with the numpad, Gpsdrive works ok to. I then switch between these two with the + key.
To dialout to the internet I used Fluxkeys like this:
KP_Delete ExecCommand xterm -e wvdial BT
I also had to 'chmod u+s /usr/bin/wvdial' to let users dial out. Now when I press Del on the numpad a dial-up GPRS connection is made and I can surf!
The display has arrived! I now has a nice setup on my desk with a PC power supply, mainboard, VGA-TV-card and the in-dash monitor. The display is widesceren and I have to adjust the resolution.
To do list:
-Better maps for GpsDrive - Done
-Install Wifi-card - Ok
-Buy and test an in-dash monitor - Ok
-Test sound and mp3-apps - Ok
-Check out frontends - Done
-Make a shortcut on the numpad to connect to the internet. - Ok
-Volume control (maybe use another button for Next Window and use + and - to regulate volume?)
stupid question of the year
Does it have any wierd quirks, or does it do anything outragously stupid for/because of the shortened load time?