8track: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
Brian Wilson (talk | contribs)
mNo edit summary
 
(121 intermediate revisions by the same user not shown)
Line 1: Line 1:
My quest for low power systems began in my [[Carbon diet]] page and now it continues with this system. It is smaller, faster, and uses less energy than the earlier [[Via EPIA 800]] system. I migrated from the C3 to the C7 system.
[[Image:8track.jpg|thumb|left|Exterior view of 8track]]
Now to an Intel "Little Falls" Atom 230 board.


'''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 immediately envisioned putting a computer in the case and that is exactly what happened.
"8track" is complete computer system based on a Via CN10000 Mini-ITX board  inside a GE portable AM/FM 8-track player case. I am configuring it for use as a car computer in my [[Yaris]].


I realize now that I could probably have sold it for $10 on Ebay! Well, I have gotten more than $10 worth of entertainment out of it so far.
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.


I used 8track as the unofficial [[http://www.Solarcreek.org/index.php/Kiosk 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.
<br clear=all>
 
Alas it is no longer in the 8 Track player but I stuck with the name.


== Hardware specs ==
== Hardware specs ==
"8track" was originally a complete computer system based on a Via CN10000 Mini-ITX board built inside the 8 track player case. The overpriced Morex
automotive power supply died when it was less than a year old. Rather than
throw more money at Morex, I replaced the case with a commercially built
slim case.


8track currently has  
8track currently has  
Line 21: Line 13:
* Via CN10000 C7 mainboard
* Via CN10000 C7 mainboard
* 1GB RAM
* 1GB RAM
* 80 GB 7200 rpm Seagate SATA drive
* 32GB Patriot solid state SATA drive
* [http://www.logicsupply.com/products/c158b_90w Casetronic case]
* WiFi USB dongle from Alfa
* [[PicoLCD]] from http://mini-box.com/
* Zonet USB bluetooth adapter
* Apple Bluetooth HID keyboard
* [[Lilliput DisplayLink monitor]]
* Pico power supply [http://www.mini-box.com/M3-ATX-DC-DC-ATX-Automotive-Computer-car-PC-Power-Supply M3-ATX] 25w output, 6v to 24v wide input Intelligent Automotive DC-DC Car PC Power Supply
* [[Powerstream UPS]]  


With the [http://www.logicsupply.com/product_info.php/cPath/40_63/products_id/179 Morex automotive power supply] the power options included using either an old HP Omnibook 800 laptop power supply or a 12 volt gel cell. At the [http://solarcreek.org Solar CREEK] booth at DaVinci Days, I ran it on a solar panel and a 120 vac inverter.
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.  


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. A Toshiba 4200 rpm 30 GB drive was IDE (PATA) and plugged into a 44-40 pin adapter. The Seagate SATA drive is a huge improvement, it's much faster.
I'd also like to hook up the tuner knob to a digital encoder. Who knows when I will get around to that!


At DaVinci days, I used an Acer 15" display and a PS/2 keyboard and mouse. The monitor ran off the inverter, too. I plugged in stereo speakers and connected to the Solar CREEK web site via a wireless link.  
The first version of 8track used a [[Via EPIA 800]]. The C7 is faster and uses less power.


The HP power supply puts out about 35 watts and it had no trouble running this machine in the above configuration. I measured output of the supply and found it took about 10 watts to run.
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  [http://www.logicsupply.com/products/c158b_90w Casetronic case]


I need to take measurements on the new configuration.
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. [http://www.logicsupply.com/product_info.php/cPath/40_63/products_id/179 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 ==
== Main board ==
Line 38: Line 42:
I bought the [http://www.logicsupply.com/product_info.php/cPath/78_93/products_id/553 CN10000EG fanless C7 board]  from [http://www.logicsuppy.com/ Logic Supply].
I bought the [http://www.logicsupply.com/product_info.php/cPath/78_93/products_id/553 CN10000EG fanless C7 board]  from [http://www.logicsuppy.com/ Logic Supply].


Mini-review: The CN10000 board works quite well as a server, but it does not have enough juice to run the Java Netbeans IDE and the video drivers are not up to snuff for Ubuntu ''Hardy Heron''.  
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 dandy hardware like graphics and media decoder and encryption chips on the board then do not provide up-to-date Linux drivers for them.
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, static probably got it.
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:  
Some specs:  
Line 53: Line 57:
[[Image:CN10000.pdf]] PDF manual
[[Image:CN10000.pdf]] PDF manual


=== C7 kernels ===
=== C7 + DisplayLink kernels ===


When I first got the C7 board I had to build a custom kernel because it was not supported by default on Ubuntu. Currently I use the standard Ubuntu kernels but here are my old notes on kernel building for the C7.  
Linux just gets better and better. The DisplayLink driver is now included with kernel 3.2 and the display just fired right up after a kernel package upgrade.
That pretty much means the rest of this section is here just as documentation.
'''Use the 3.2 kernel!!!'''


http://www.howtoforge.com/kernel_compilation_ubuntu_p2?s=2e4e7db1d3b0009a48132ba132e72f9e&
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: 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/
I tried using 3.0 but I found the new Alfa Networks card was not supported yet. Then I found I could not get the new (802.11n) card working with Kismet anyway so I tried the stock 3.0 kernel and it worked fine.
====Some notes left over from the 2.6 days:====
To configure the 2.6 kernel with
'make xconfig' I needed to do this
apt-get install libqt4-dev
Building:
cd /usr/src/linux-2.6.39.4
make xconfig
  make-kpkg clean
  make-kpkg clean
  fakeroot make-kpkg --initrd build kernel_image kernel_headers modules
  fakeroot make-kpkg --initrd --append-to-version='''.090411''' kernel_image
 
The 090411 thing is just a date stamp so I can differentiate builds.


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


  cd ..
  cd ..
  sudo dpkg -i ''packagename''
  sudo dpkg -i ''packagename''
..and so on
 
Fixing UTS error!!! ARGH!!!
 
http://ubuntuforums.org/showpost.php?p=8688831&postcount=1403


== Software ==
== Software ==


=== Done ===
* GPS navigation: [[FoxtrotGPS]] and [[Navit]]
===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
=== Festival speech synthesis ===
Download the latest version. (2.1 November 2010) Put it where you want it installed, it wants to live in its build directory. So for example unpack and build in /usr/local and then link /usr/local/bin/festival to /usr/local/festival/main/festival
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


24 Aug 2007 Via C7 (The old board, now in [[Bellman]])
The new release comes with several good voices.


I have most all the multimedia features working smoothly now.
=== Bluetooth wireless keyboard ===
HOWEVER, the system still LOCKS UP sometimes when running Realplayer.


Annoying but not bad enough to work on it!
One of my least favorite Garmin nuvi features is the on-screen keyboard. 8track now has an Apple Bluetooth keyboard.


It also occasionally locks up when running VMWare machines!  Again, I don't do this often enough for it to be worth working on, I am hoping the newer kernels which now support the C7 processor will fix things eventually.
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.


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


With the initial release of Ubuntu 8.04, the ethernet driver for the Little Falls board was broken. Ubuntu soon released 8.04.1 to fix it -- but the onboard Realtek ethernet interface remained so unreliable that I stuck a 3com NIC in there for a few weeks while waiting for smarter people to figure it out.
Later (Aug2011) I found this page helpful, http://chezphil.org/apple-alu-bluetooth-kb-linux/ especially the hidd --connect command


Without some extra help Linux thinks the chip is an R8169 and loads that driveer but that is wrong. With 8.10 I did more poking around and discovered that I could compile and install the 8101 driver from the Realtek site (release 1.011) and things seem to be okay now.
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:


Symptom: Ethernet appears to be working but no data will flow across the link. Reboot and it works. Reboot and it doesn't...  
bwilson@8track:~$ '''hcitool scan'''
Scanning ...
E8:06:88:4F:52:48 Apple Wireless Keyboard


=== Driver Fix ===
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.


# Download and install r8101 driver from [http://www.realtek.com.tw/Downloads/downloadsView.aspx?Langid=1&PNid=14&PFid=7&Level=5&Conn=4&DownTypeID=3&GetDown=false Realtek download site]. ("LINUX driver for kernel 2.6.X and 2.4.X")
=== Removed dead weight ===
# Unpack it in /usr/src and do
 
make
Basically I got matchbox going, which shows (most of) the installed applications, and whittled them away until matchbox became (IMO) usable.
make install
 
depmod -a
cups -- not planning on printing...
echo blacklist r8169 >> /etc/modprobe.d/blacklist-network
exim4 mutt -- not planning on emailing or reading email
  update-initramfs -u
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 (build from source, distro version is too old)
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 [http://backports.debian.org/ "backports"].
 
deb http://backports.debian.org/debian-backports lenny-backports main
 
cat /etc/default/nodm
NODM_ENABLED=yes
NODM_USER="alba"
 
=== Enlightenment X Window manager ===
 
This is one of the choices for Openmoko, with the Illume module. Therefore setting it up is best done by following the [http://wiki.openmoko.org/wiki/Illume openmoko instructions]
 
I downloaded and ran the script there to get the latest enlightenment and the illume module. The alternative was to follow the complicated instructions on how to download and build each little piece separately. Too much work!!
 
The script installs into /usr/local
 
It fails on a Debian lenny install, it wants debian-unstable. Well... this is all an experimental system anyway. So off we go. Here comes Debian "sid". So I edit /etc/apt/sources.list and apt-get dist-upgrade and a few hours later... I am now running sid. I wonder how I am doing on disk space now, I am running a 32 GB SSD.
 
I no longer have X display on the little monitor. Boo. I wonder if my /etc/X11/ files were "improved" in the update.
 
Running the Enlightenment installer script again. This probably won't fix X11 but what the heck.
 
=== 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.


You have to repeat this process if you upgrade your kernel.
/usr/share/applications contains the definitions that the window manager uses to put all those icons out on the desktop.
I got the idea to do this from [http://en.alessiotreglia.com/articles/how-to-compile-r8168-and-r8101-modules-for-realtek-ethernet-adapters/ here] that tell how to compile and install the driver. Ignore the part about patching it. The latest Realtek driver already has the patches installed.


=== Drivers for RTL8101E and R8110S ===
=== Matchbox applets ===


Since I wanted to try out gigabit networking with my Intel Atom motherboard, and the builtin interface only does 100BT, I added a Dlink 1Gb card.  
Saved in
~/.matchbox/mbdock.session


All was well until I decided to use 8track as a router.
mb-applet-menu-launcher = Application launcher (with the red ^ icon). Too fiddly on this screen.


If you add a 1GB card that is based on the Realtek chipset RTL8110S
=== Matchbox Theme ===
then the two interfaces get in a fight. The kernel prefers to use the r8169 driver over the r8101 driver and since r8169 has a signature for the built-in RTL8101E interface, it tries to use it for the motherboard interface which then fails 1/2 the time. We are back where we started.


The solution is to to download and install the [http://122.146.118.42/downloads/downloadsView.aspx?Langid=1&PNid=4&PFid=4&Level=5&Conn=4&DownTypeID=3&GetDown=false&Downloads=true#RTL8110S-32/RTL8110SB(L)/RTL8169SB(L)/RTL8169SC(L)%3Cbr%3ERTL8169 r8169 driver from RealTek]
I can have more than one panel.


I am guessing that both the RTL8101E and RTL8110S chipsets are happier running with drivers written by their creator anyway.
== GPS ==


If you do this then when you type 'make install' you overwrite the stock driver and you don't want to do the blacklist thing listed above.
=== GPS Hardware ===


Since the Realtek driver does not include the RTL8101 signature in its r8169 driver, the kernel finds and loads the correct driver for each card.
21-Jan-12


Nice theory Brian, but it's still finding the r8169 module first!
I have a "U-Blox AEK-4P GPS Evaluation kit". It shows up on /dev/ttyACM0


Next I am trying a tip from another web page,
$GPGSV,3,1,11,28,08,211,,08,40,271,45,07,71,308,33,13,71,119,41*70
$GPGSV,3,2,11,10,43,253,47,23,40,130,42,03,29,077,36,16,22,045,34*74
$GPGSV,3,3,11,06,22,062,,19,20,113,36,05,18,317,42*48
$GPGLL,4432.73048,N,12315.76310,W,052841.00,A,A*7F
$GPZDA,052841.00,22,01,2012,00,00*6C


# Edit /etc/initramfs-tools/modules to add the drivers in order
I have installed a backup battery on it. I could not find a spec anywhere for the battery but I popped in a 357A cell, that's 12mmx 4mm and it seems to work. (Faster fix on power cycle)
# update-initramfs -u -k all
# reboot


=== BIOS upgrade ===
=== GPS Navigation ===


8.10 seemed to have significant problems, until I realized the system BIOS was at rev level 67 and the current version is 103. Since updating BIOS things seem to be running much better.
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]].


The upgrade files can be downloaded from Intel and put on a floppy. Remember floppies? I might still have a drive somewhere in my junk pile.
To use FoxtrotGPS I need gpsd installed,


I downloaded a copy of PCDOS 7, copied it to a thumbdrive.
sudo apt-get install gpsd gpsd-clients
  dd if=pcdos7.IMA of=/dev/sdb1
  sudo dpkg-reconfigure gpsd


This gives me a thumbdrive with no space for the BIOS files (and no way to expand it as it's FAT12 format), but PCDOS knows about CDROM's, so I put IFLASH.EXE and the BIOS file onto a CD and ran them from there.
Now to dump NMEA strings as a test,


=== USB problem ===
<pre>
gpspipe -r
netlib_connectsock() returns socket on fd 3
{"class":"VERSION","release":"2.95","rev":"2011-07-27T11:32:38","proto_major":3,"proto_minor":3}
{"class":"DEVICES","devices":[{"class":"DEVICE","path":"/dev/ttyACM0","activated":1327254330.01,"native":0,"bps":115200,"parity":"N","stopbits":1,"cycle":1.00}]}
{"class":"WATCH","enable":true,"json":false,"nmea":true,"raw":0,"scaled":false,"timing":false}
{"class":"DEVICE","path":"/dev/ttyACM0","activated":1327254330.17,"driver":"Generic NMEA","native":0,"bps":115200,"parity":"N","stopbits":1,"cycle":1.00}
$GPRMC,174531.00,A,4432.73267,N,12315.75998,W,0.056,252.20,220112,,,A*77
$GPVTG,252.20,T,,M,0.056,N,0.103,K,A*3B
$GPGGA,174531.00,4432.73267,N,12315.75998,W,1,09,1.18,72.6,M,-21.0,M,,*5F
</pre>


In 8.0.4.1 these messages filled log files. This problem seems to have gone away in 8.10.
Then when I try FoxtrotGPS, it finds my location and puts me on the map.


  26.100735 hub 3-0:1.0: over-current change on port 2[
== WiFi ==
  26.204644 hub 5-0:1.0: over-current change on port 5
  26.308536 hub 5-0:1.0: over-current change on port 6
  26.412452 hub 3-0:1.0: over-current change on port 1
  26.516351 hub 3-0:1.0: over-current change on port 2
  26.620257 hub 5-0:1.0: over-current change on port 5
  26.724160 hub 5-0:1.0: over-current change on port 6
  26.828059 hub 3-0:1.0: over-current change on port 1


=== Random number generator ===
My intention is to try using Kismet for wardriving.
To kick things off, I am testing on my Ubuntu desktop. Once things are running here I will move them to 8track.


  32.407090 intel_rng: Firmware space is locked read-only. If you can't or
I installed the latest kismet from sources.  
  32.407096 intel_rng: don't want to disable this in firmware setup, and if
  32.407100 intel_rng: you are certain that your system has a functional
  32.407103 intel_rng: RNG, try using the 'no_fwh_detect' option.


=== Packages of note ===
=== Adapters ===


Some Ubuntu "upgrade" happened and now Firefox 3 crashes every 5 minutes. I am using Seamonkey but have been thinking about going to Kubuntu so I am looking at what packages I want to reload... I have a ton installed now but most can get dumped.
I really wanted this jazzy 2 watt Alfa AWUS036NHR 802.11b/g/n adapter from [http://rokland.com/ Rokland] to work. I tried and tried. I even built new drivers from sources. It works as a network adapter but not wit Kismet.


I used '''digiKam''' for photo transfer and archiving.
I gave up and bought the 1 watt 802.11b/g model and it fires up out of the box.
'''Hugin''' makes photo sets into panoramas.
Conclusion: '''Get the [http://store.rokland.com/products/alfa-1000mw-usb-wireless-g-b-adapter-w-rp-sma-antenna-awus036h Alfa AWUS036H] from Rokland.''' It's only $27.
'''Vlc''' plays my videos.


I have been experimenting with QT so I have all the '''QT''' packages installed, including the [[Python]] support. For Python I have [[Komodo]] 5.0.3
I also have a Shuttle WiFi adapter that came in [[Raven]]; again, it works fine with Linux as a network adapter but not with Kismet.
I also have the [[wxPython]] stuff loaded.  


QT is actually the best reason to go to Kubuntu since it's built on QT and the QT development system is built on Kubuntu.
=== Antenna ===


I used '''eagle''' to view and edit schematics and circuit boards.
I have a nice heavy duty antenna purchased from Pasadena Wireless. It has a mag mount base and mounts outside on the roof of the car.


I use '''VMware Workstation'''. Save and restore /usr/lib/vmware/licenses
For indoors/testing I have the 5.8 dBi antennas that came with the Alfa radios.


I backed up everything (about 10 GB) on the internal system volume to an external hard drive with this command
=== Kismet ===


mkdir /media/disk-4/bellman-backup-7-Feb-09
Building Kismet from svn sources
tar c --exclude=proc --exclude=var --exclude=home --exclude=dev --exclude=media --exclude=sys --exclude=tmp -f - * | (cd /media/disk-4/bellman-backup-7-Feb-09; tar xpf -)


== Where is it now? ==
sudo apt-get install libnl-dev libpcap-dev
svn co https://www.kismetwireless.net/code/svn/trunk kismet-devel
cd kismet-devel/
./configure
make


8track is now the machine we use here at home 95% of the time. It is so power efficient and quiet that I use it in preference to either the laptop or the old desktop system for most of my work.
If you want to use GPS, get and install [[gpsd]] too. Kismet is a gpsd client.
 
== 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==
==Pictures==
Line 192: Line 401:
[[Image:8track_interior.jpg|thumb|left|View inside with back cover removed]]
[[Image:8track_interior.jpg|thumb|left|View inside with back cover removed]]


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


There is enough room at the top of the case to accomodate an LCD display.
There is now a PicoLCD 20x2 LCD mounted in the tuner display area.
The Trendnet Wifi card fit in easily once I removed its card slot adapter.
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.
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 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.
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.''


* Def router: a motor with a spinning cutter attached, not a network device.
[[Category: Car Computer]]
[[Category: Computers]]

Latest revision as of 15:10, 13 August 2023

Exterior view of 8track

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

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

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

Linux just gets better and better. The DisplayLink driver is now included with kernel 3.2 and the display just fired right up after a kernel package upgrade. That pretty much means the rest of this section is here just as documentation. Use the 3.2 kernel!!!

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: 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/

I tried using 3.0 but I found the new Alfa Networks card was not supported yet. Then I found I could not get the new (802.11n) card working with Kismet anyway so I tried the stock 3.0 kernel and it worked fine.

Some notes left over from the 2.6 days:

To configure the 2.6 kernel with 'make xconfig' I needed to do this

apt-get install libqt4-dev

Building:

cd /usr/src/linux-2.6.39.4
make xconfig
make-kpkg clean
fakeroot make-kpkg --initrd --append-to-version=.090411 kernel_image

The 090411 thing is just a date stamp so I can differentiate builds.

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

Festival speech synthesis

Download the latest version. (2.1 November 2010) Put it where you want it installed, it wants to live in its build directory. So for example unpack and build in /usr/local and then link /usr/local/bin/festival to /usr/local/festival/main/festival

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

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

Later (Aug2011) I found this page helpful, http://chezphil.org/apple-alu-bluetooth-kb-linux/ especially the hidd --connect command

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 (build from source, distro version is too old)
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
cat /etc/default/nodm
NODM_ENABLED=yes
NODM_USER="alba"

Enlightenment X Window manager

This is one of the choices for Openmoko, with the Illume module. Therefore setting it up is best done by following the openmoko instructions

I downloaded and ran the script there to get the latest enlightenment and the illume module. The alternative was to follow the complicated instructions on how to download and build each little piece separately. Too much work!!

The script installs into /usr/local

It fails on a Debian lenny install, it wants debian-unstable. Well... this is all an experimental system anyway. So off we go. Here comes Debian "sid". So I edit /etc/apt/sources.list and apt-get dist-upgrade and a few hours later... I am now running sid. I wonder how I am doing on disk space now, I am running a 32 GB SSD.

I no longer have X display on the little monitor. Boo. I wonder if my /etc/X11/ files were "improved" in the update.

Running the Enlightenment installer script again. This probably won't fix X11 but what the heck.

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

GPS Hardware

21-Jan-12

I have a "U-Blox AEK-4P GPS Evaluation kit". It shows up on /dev/ttyACM0

$GPGSV,3,1,11,28,08,211,,08,40,271,45,07,71,308,33,13,71,119,41*70
$GPGSV,3,2,11,10,43,253,47,23,40,130,42,03,29,077,36,16,22,045,34*74
$GPGSV,3,3,11,06,22,062,,19,20,113,36,05,18,317,42*48
$GPGLL,4432.73048,N,12315.76310,W,052841.00,A,A*7F
$GPZDA,052841.00,22,01,2012,00,00*6C

I have installed a backup battery on it. I could not find a spec anywhere for the battery but I popped in a 357A cell, that's 12mmx 4mm and it seems to work. (Faster fix on power cycle)

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.

To use FoxtrotGPS I need gpsd installed,

sudo apt-get install gpsd gpsd-clients
sudo dpkg-reconfigure gpsd

Now to dump NMEA strings as a test,

gpspipe -r
netlib_connectsock() returns socket on fd 3
{"class":"VERSION","release":"2.95","rev":"2011-07-27T11:32:38","proto_major":3,"proto_minor":3}
{"class":"DEVICES","devices":[{"class":"DEVICE","path":"/dev/ttyACM0","activated":1327254330.01,"native":0,"bps":115200,"parity":"N","stopbits":1,"cycle":1.00}]}
{"class":"WATCH","enable":true,"json":false,"nmea":true,"raw":0,"scaled":false,"timing":false}
{"class":"DEVICE","path":"/dev/ttyACM0","activated":1327254330.17,"driver":"Generic NMEA","native":0,"bps":115200,"parity":"N","stopbits":1,"cycle":1.00}
$GPRMC,174531.00,A,4432.73267,N,12315.75998,W,0.056,252.20,220112,,,A*77
$GPVTG,252.20,T,,M,0.056,N,0.103,K,A*3B
$GPGGA,174531.00,4432.73267,N,12315.75998,W,1,09,1.18,72.6,M,-21.0,M,,*5F

Then when I try FoxtrotGPS, it finds my location and puts me on the map.

WiFi

My intention is to try using Kismet for wardriving. To kick things off, I am testing on my Ubuntu desktop. Once things are running here I will move them to 8track.

I installed the latest kismet from sources.

Adapters

I really wanted this jazzy 2 watt Alfa AWUS036NHR 802.11b/g/n adapter from Rokland to work. I tried and tried. I even built new drivers from sources. It works as a network adapter but not wit Kismet.

I gave up and bought the 1 watt 802.11b/g model and it fires up out of the box. Conclusion: Get the Alfa AWUS036H from Rokland. It's only $27.

I also have a Shuttle WiFi adapter that came in Raven; again, it works fine with Linux as a network adapter but not with Kismet.

Antenna

I have a nice heavy duty antenna purchased from Pasadena Wireless. It has a mag mount base and mounts outside on the roof of the car.

For indoors/testing I have the 5.8 dBi antennas that came with the Alfa radios.

Kismet

Building Kismet from svn sources

sudo apt-get install libnl-dev libpcap-dev
svn co https://www.kismetwireless.net/code/svn/trunk kismet-devel
cd kismet-devel/
./configure
make

If you want to use GPS, get and install gpsd too. Kismet is a gpsd client.

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.