8track: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
Brian Wilson (talk | contribs)
Line 95: Line 95:
=== Done ===
=== Done ===


* GPS navigation: [[FoxtrotGPS]]
* GPS navigation: [[FoxtrotGPS]] and [[Navit]]


===To do===
===To do===
Line 102: Line 102:


List of applications
List of applications
* [[FoxtrotGPS]]
* Media player (VLC with custom skin?)
* Media player (VLC with custom skin?)
* Maintenance records (esp records of fill ups)
* Maintenance records (esp records of fill ups)

Revision as of 05:48, 6 January 2011

Exterior view of 8track

"8track" is complete computer system based on a Via CN10000 Mini-ITX board inside a GE 8 track player case. I am configuring it for use as a car computer in my Yaris.

Origin of the name 8track. When I was riding around Corvallis one day, I saw a pile of free stuff in front of someone's house. Right on top was a GE portable AM/FM 8 track player. I could not pass it up. I envisioned putting a computer in the case and that is what I did.

I used 8track as the unofficial Solar CREEK kiosk at DaVinci Days 2006. It ran off solar power all day playing a video and allowing access to the Solar CREEK Web site.


Hardware specs

8track currently has

The PicoLCD should be able to support 5 LED's that will be inserted into the 8 track case "stereo" and "track" indicators. It should also support some push buttons if I find a place to mount them.

I'd also like to hook up the tuner knob to a digital encoder. Who knows when I will get around to that!

The first version of 8track used a Via EPIA 800. The C7 is faster and uses less power.

It had a 60W Morex automotive power supply which died when it was less than a year old. For a few years I used the C7 motherboard in this Casetronic case and am currently using its power supply in 8track.

The Morex supply allowed 8-24V input. It was supplied with a separate DC-DC regulator. I bought it from Logic Supply, this link might not work any more. Morex automotive power supply At the Solar CREEK booth at DaVinci Days, I ran it on a solar panel and a 120 vac inverter. The inverter powered a 12V DC brick, the 120V Acer LCD monitor, and a pair of powered speakers.

Currently an old HP Omnibook 800 laptop mobile adapter is being used as the DC-DC regulator in front of the Casetronic supply (which also takes 12V in). This should be fine in an automotive environment.

Disk storage: Originally I used the 2.5" drive because the Morex did not support the power requirements of a 3.5" drive on its 12V output.I used a Toshiba 4200 rpm 30GB drive (PATA) plugged into a 44-40 pin adapter. Later I went to a Seagate 80GB 7200rpm SATA drive. Currently I am using a Patriot 32GB SSD. This SSD is probably a step DOWN from the Seagate, its performance is not very good; but it's a better choice for an automotive environment.

The original C3 set up with 4200rpm hard drive took about 10 watts at its 12V input. I need to take measurements on the new configuration.

Main board

I bought the CN10000EG fanless C7 board from Logic Supply.

This CN10000 board worked quite well as a server, I used it for about a year as my home server and firewall. I replaced it with an Intel Atom server Bellman. The C7 did not have enough juice to run the Java Netbeans IDE and the video drivers were not up to snuff for Ubuntu 7.04 Hardy Heron.

Maybe the video chip itself WOULD work but the drivers don't support the high end Gnome features. I am not sure. I wish that Via did more work to support their products or at least open them up. They put dandy hardware like graphics and media decoder and encryption chips on the board then do not provide up-to-date Linux drivers for them.

I got my EPIA C3 800 Mhz mainboard from Logic Supply, too. It has since died. I abused it when moving it from case to case, static probably got it.

Some specs:

VIA CN700 north bridge
VIA VT8237R south bridge
LAN: VIA VT6103 10/100
AUDIO: VIA VT1618 8 channel AC'97 codec

File:CN10000.pdf PDF manual

C7 + DisplayLink kernels

As I rebuild this system for its new automotive application, I tested Ubuntu 10.10 and found none of the i386 options will run. Applications crash randomly. I think it's probably using a 686 build that includes instructions not supported by the C7 processor.

I am using Debian 5.0 now and it works just fine.

I ran early versions of Ubuntu by compiling a C7 kernel. It turns out that I am once again building custom kernels, now to get support for the DisplayLink USB video system. While I am at it, I cut out every feature that I don't use (and there are a LOT of them) and I compile for a C7 again.

Official instructions: http://www.debian.org/releases/stable/i386/ch08s06.html.en

Building on a 64-bit development host: Great but probably not worth effort, I hope not to build too many kernels: http://linux.koolsolutions.com/2009/06/04/howto-cross-compiling-a-32-bit-i386-linux-kernel-on-64-bit-machine-amd64/

Obtaining source from Debian experimental:

svn co http://packages.debian.org/source/experimental/linux-2.6

Building:

cd /usr/src/linux-2.6/linux-2.6.36.1
make-kpkg clean
fakeroot make-kpkg --initrd --revision=c7.1 kernel_image

c7,1 is just a name I pulled out of the air since this is a c7 processor, and each time I build I increment the last digit.

This builds the packages up one layer, you have to go there and install them. Like this:

cd ..
sudo dpkg -i packagename

Fixing UTS error!!! ARGH!!!

http://ubuntuforums.org/showpost.php?p=8688831&postcount=1403

Software

Done

To do

Tune Matchbox and all installed applications to be finger-friendly for automotive use-- including the application switcher and all controls

List of applications

  • Media player (VLC with custom skin?)
  • Maintenance records (esp records of fill ups)
  • OBD II interface
  • Web browser (everything needs a web browser, right?)
  • WiFi wardriving with Kismet?

List of controls

  • Volume/mixer control
  • On/off/sleep
  • Backlight control
  • Nightmode

Indicators

  • GPS status

Keyboard special function keys

  • screen brightness up / down (F1, F2)
  • app switcher thing (I forget what Apple calls it) (F3)
  • gauges (F4)
  • rewind (F7)
  • play / pause (F8)
  • fast forward (F9)
  • mute (F10)
  • volume down / up (F11,F12)
  • eject

(What will the eject button do? Think about James Bond.)

If I had a bluetooth phone, I'd probably want to use 8track for hands-free.

I used netboot to install the basic Debian 5 plus the laptop stuff, because I always seem to end up with worn out CD players at home!

PicoLCD display

Set up /etc/lcd4linux.conf by uncommenting

Display 'picoLCD'

and set up the layout for L20x2 however you like, mine is

Layout L20x2 {
   Row1 {
       Col1  'WiFi'
   }
   Row2 {
       Col1  'Busy'
       Col11 'BusyBar'
   }

Audio setup

Add to /etc/security/limits.conf to reduce latency with Jack.

@audio		 -	 rtprio		 99
@audio		 -	 memlock	 unlimited

The secret to making festival work:

printf ";use ALSA\n(Parameter.set 'Audio_Method 'Audio_Command)\n(Parameter.set 'Audio_Command \"aplay -q -c 1 -t raw -f s16 -r \$SR \$FILE\")\n" > .festivalrc

Text to speech

Play a file: festival --tts filename

Getting better voices for festival

http://ubuntuforums.org/showthread.php?t=751169

Oh look! There has been a new release of festival, just last month Nov 2010. I downloaded the sources and I am building it now. This is very exciting.

I installed it in /usr/local and removed the debian version The new release comes with several good voices.

Bluetooth wireless keyboard

One of my least favorite Garmin nuvi features is the on-screen keyboard. 8track now has an Apple Bluetooth keyboard.

I thought about getting a tiny generic bluetooth keyboard from eBay or Amazon, but ultimately walked around the corner and picked up the Apple keyboard at the Mac Store. I like the way the keyboard feels on my MacBook Pro, and the Apple keyboard should be small enough to get lost in one of Alba's numerous glove compartments yet it's still big enough for touch typing. I like the sturdy aluminum case and best of all, there is no garish logo on the front or glowing Apple on the back.

I followed the instructions on this page to get it working with Debian. https://help.ubuntu.com/community/BluetoothSetup

Log into 8track via ssh (since it has no keyboard right now) Turn on the Apple keyboard. Scan the airwaves to find the hcid code:

bwilson@8track:~$ hcitool scan
Scanning ...
	E8:06:88:4F:52:48	Apple Wireless Keyboard

Then in /etc/default/bluetooth, set HIDD_ENABLE=1 and add "--connect E8:06:88:4F:52:48" to HIDD_OPTIONS. Set up like this, the keyboard will be available after rebooting.

Removed dead weight

Basically I got matchbox going, which shows (most of) the installed applications, and whittled them away until matchbox became (IMO) usable.

cups -- not planning on printing... 
exim4 mutt -- not planning on emailing or reading email
iceweasel -- substitute for firefox, using firefox instead!
inkscape
openoffice.org 
pidgin -- never use it on the desktop either
xsane xsane-common - uh no not doing any scanning!
wodim -- no cd burner here

Removing wodim, which is a disk burner causes a bazillion dependencies to be removed including gnome. To me this is stupid, wodim is like a bit of lint and removing it causes the removal of the entire windowing environment! Whatever. I was going to remove gnome anyway.

I figure I will add it back in in about 20 minutes when I add something that loads it all back in again. Merd! It should not be like this.

Once the obvious unwanted applications are removed, go look in /usr/share/applications. The files there define what shows up on the screen.

Added dead weight

aprsd (not sure about this one yet)
firefox (sorry Debian people, I want firefox not "iceweasel", oye!)
gpsd (for kismet and foxtrotGps)
kismet (for wifi searching. this pulls in lots of other packages)
openssh-server (for logging in from the laptop at the kitchen table)
vlc -- a media player
audacious - a media player that will be removed soon (?)
sqlite
festival text to speech
strace

Taking a page from the Garmin nuvi 855 I add these to try them out

matchbox
pulseaudio -- trying jack first after reading the wikipedia pages.
speex -- speech compression
libmad -- integer based mpeg decode
flac -- free lossless audio compression

X Display manager

"Nodm" is the display manager used in Openmoko phones.

The "display manager" is the program that normally puts up a login prompt and then starts the appropriate X window manager as part of the login process.

There is no documentation on how to use nodm on the nodm site. The only place I found notes was the openmoko site: http://wiki.openmoko.org/wiki/Window_Manager_Startup

Read the README and INSTALL docs in the source, which is here: http://www.enricozini.org/sw/nodm/

echo "/usr/local/sbin/nodm" > /etc/X11/default-display-manager

You can install it from "backports".

deb http://backports.debian.org/debian-backports lenny-backports main

/etc/defaults/nodm

NODM_ENABLED=yes
NODM_USER="alba"

Matchbox X window manager

The Openmoko page taught me how Matchbox works.

http://wiki.openmoko.org/wiki/Window_Manager_Startup

Do this to get the Matchbox session manager to launch.

update-alternatives --install /usr/bin/x-window-manager x-window-manager /usr/bin/matchbox-session 100

matchbox-session is script that starts matchbox-desktop, matchbox-panel and matchbox-window-manager by default; you can create a file ~/.xsession or /etc/matchbox/session to override it.

After getting Matchbox going I was able to remove all the apps that are useless for a car computer, OpenOffice etc and the original window manager XFCE.

/usr/share/applications contains the definitions that the window manager uses to put all those icons out on the desktop.

Matchbox applets

Saved in ~/.matchbox/mbdock.session

mb-applet-menu-launcher = Application launcher (with the red ^ icon). Too fiddly on this screen.

Matchbox Theme

I can have more than one panel.

GPS Navigation

The navigation software will be based on FoxtrotGPS. Since I plan on writing code I am downloading the source from there. I added the packages required to build it; more information is on my page here: FoxtrotGPS.

WiFi

Using Kismet for wardriving.

Kismet.conf source line for the Shuttle USB card

source=rt8180,wlan0,wlan0

This is a card that came with the case that I am using for Raven. Raven did not need WiFi so I had already pulled it out. I am using it with an antenna purchased from Pasadena Wireless. It has a mag mount base and mounts outside on the roof of the car.

WiFi PCI card

This is the Broadcom based card you can see in the picture below.

b43-phy0 ERROR: Firmware file "b43/ucode5.fw" not found or load failed.
[ 1499.272529] b43-phy0 ERROR: You must go to http://linuxwireless.org/en/users/Drivers/b43#devicefirmware and download the latest firmware (version 4).
[ 1621.377228] input: b43-phy0 as /class/input/input27

Change sources.list

# deb http://debian.osuosl.org/debian/ lenny main

deb http://debian.osuosl.org/debian/ lenny main contrib non-free
deb-src http://debian.osuosl.org/debian/ lenny main contrib non-free

deb http://security.debian.org/ lenny/updates main contrib non-free
deb-src http://security.debian.org/ lenny/updates main contrib non-free

deb http://volatile.debian.org/debian-volatile lenny/volatile main
deb-src http://volatile.debian.org/debian-volatile lenny/volatile main

Then install b43-fwcutter

apt-get install b43-fwcutter

Download page: http://linuxwireless.org/en/users/Download

The stanzas in /etc/network/interfaces

iface eth0 inet static
 address 192.168.123.132
 netmask 255.255.255.0
 gateway 192.168.123.254
auto wlan0
iface wlan0 inet dhcp
 wpa-ssid wildsong
 wpa-psk xxxxxxxxxxx  <-- put your secret here

Debian packages

When a package is too new, go to /var/cache/apt/archives and look for the older package and install it then delete the older and newer archives

Pictures

Exterior view of 8track

A wood strip is fitted to cover over empty slots left when I removed the various controls (volume, tone and so on.) It fits the style of cases of this vintage though it's real hardwood not contact paper!

View inside with back cover removed

Here you can see the interior layout. The Seagate PATA drive has been replaced with a Patriot SSD SATA drive.

There is now a PicoLCD 20x2 LCD mounted in the tuner display area. The Wifi card fit in easily once I removed its card slot adapter.

I used a router* to enlarge the 8-track slot to fit the mainboard back panel. The styrene plastic is very easy and clean to work with a carbide bit. I probably won't get cancer for many more years.

The large metal ring on the left is an eye bolt to allow me to lock down the case when I leave it unattended in public places. It has been removed now, replaced with a power on/off push button.

* Def router: a motor with a spinning cutter attached, not a network device.