April 14th, 2006 by anton
Configuration
By now you should have a login prompt in your serial console. Login as root, no password and run the stompbox config script, /usr/local/bin/initial-setup. The questions are pretty self explanatory. If you don’t know the answer to a question, take the default. I don’t have a camera or gpsd setup but it still asked me to configure those items. I just hit enter on the defaults to keep going. I do recommend getting a dynDNS account and entering that info. It makes it a lot easier to get to your stompbox from the real world. If you don’t want to mess with dynDNS then just enter something and we can disable it later. When the script is done you should reboot the box.
The setup script fails to update /etc/resolv.conf so you’ll need to do that before you can get along with much else. Put the box in RW mode (remountrw) and vi /etc/resolv.conf. Change the IP of the nameserver to the local wifi address (127.0.0.1 should work too). If everything went well you now have a working stompbox.
Read the rest of this entry »
Posted in Linux, Stompbox | 2 Comments »
April 14th, 2006 by anton
Boot Media
You’ll need a 128MB CF card and a card reader for your computer. I would think a larger card would work but many people say otherwise on the forums. I happened to have a 128MB card left from my last camera and a Sandisk USB reader so I didn’t have to buy either. I plan to make a 256MB verson just because the extra room might be handy in the future but I’m sure I won’t get around to it until I really need it.
Read the rest of this entry »
Posted in Linux, Stompbox | No Comments »
April 10th, 2006 by anton
For a little test script I’m writing I needed to split a line on a ‘;’ but preservere the “s and ’s, something that echo doesn’t like to do. Digging deeper into the bash docs I see that there are some handy string handling functions.
#!/bin/bash
line=’this “is” a command;this “is” a pattern’
COMMAND=${line%;*}
PATTERN=${line#*;}
echo $COMMAND
echo $PATTERN
And the output would be:
this “is” a command
this “is” a pattern
Posted in Bash | 14 Comments »
April 6th, 2006 by anton
I’ve been asked this a number of times and always have to look it up, so here are 3 ways to convert a unix timestamp (seconds since Jan 1, 1970 GMT) to a real looking date.
Perl method 1: use the ctime module:
perl -e “require ‘ctime.pl’; print &ctime($EPOCH);”
Perl method 2: use the scalar and localtime functions:
perl -e “print scalar(localtime($EPOCH))”
Awk has a wrapper for the standard C strftime function:
echo $EPOCH|awk ‘{print strftime(”%c”,$1)}’
Here’s a sample script that uses all methods.
!#/bin/bash
EPOCH=1000000000
DATE=$(perl -e “require ‘ctime.pl’; print &ctime($EPOCH);”)
echo $DATE
DATE=$(perl -e “print scalar(localtime($EPOCH))”)
echo $DATE
DATE=$(echo $EPOCH|awk ‘{print strftime(”%c”,$1)}’)
echo $DATE
[update: Thanks to S. Maynard for reminding me of the proper use of quotes and how to avoid using the pipe...]
DATE=$(awk “BEGIN { print strftime(\”%c\”,$EPOCH) }”)
[UPDATE]
A reader found another way listed below. This doesn’t seem to be as portable (The mac ignores the –date and -d is an illegal option).
# date –date=’1970-01-01 1000000000 sec GMT’
Sat Sep 8 20:46:40 CDT 2001
[UPDATE]
# date -d @1000000042
Sun Sep 9 01:47:22 GMT 2001
But this only works on newer versions of date. It fails on my FC2 server and my Debian Sarge machine, but works fine on Ubuntu Feisty and Debian Etch.
Posted in Bash | 19 Comments »
March 29th, 2006 by anton
General Hardware Requirements
You’ll need some form of EVDO card with an external antenna jack, an 802.11b card with the Prism 2/2.5/3 chipset, and a small computer with interfaces for both. The Soekris 4521 fits this need nicely without a lot of money. It’s configured with two PCMCIA slots and one miniPCI slot.
EVDO
Your best choice for EVDO service will vary depending on location and budget. I’m using Verizon’s Broadband Access for $80/mo which drops back to 1xRTT when I’m out of the broadband areas. I originally had the Audiovox PC5470 (no antenna jack) but switched it out with an older PC5220 that I snagged off eBay for $20. CAUTION: watch out for the auctions that sell the card cheap with a contract unless that’s what you want. There are “better” cards than the 5220 and they should all work, but make sure it’s got an external antenna jack. Google around to make sure the card and service work with Linux before spending the money and comitting to a contact. Verizon makes it easy to switch cards online, no need to talk to anyone.
Read the rest of this entry »
Posted in Linux, Stompbox | No Comments »
March 29th, 2006 by anton
This is the start of my Stompbox Network howto. I have 6 parts planned so far, but may add a couple more later when I add GPS and a Webcam to my stompbox.
Why A Stompbox
The first thing to ask is if you really need one of these, and I suppose the second is can you really afford one. Odds are that you don’t really NEED mobile internet everywhere you go, but for those of us who do and anyone with money for toys, then this can be a cool project. This is not a cheap $50 Linksys router hack. It is built on a solid industrial grade platform and the cost reflects that. My total cost to date is around $400, excluding the initial cost of the EVDO and cellular antennas. The monthly cost for Verizon EVDO is $80 and you’ll most likely need to sign a two year contract to get a new card for cheap. If you have a voice plan with Verizon you may be able to get the monthly cost down to $60, check the forums for details.
Read the rest of this entry »
Posted in Linux, Stompbox | No Comments »
March 26th, 2006 by anton
I received the Senao Net2511 MP WiFi card in the mail yesterday and the stompbox booted right up into AP mode. The card’s got a 200mW transmitter and should belt out the signal quite well, even with the antennas I stole from my WRT-54G. One of these days I’ll take the laptop out in the field and see how far it reaches.
I also re-installed the Stompbox image and reconfiguring it just to back out a few mistakes I’d made. Just for reference, if you happen to use the Stompbox image, do NOT “apt-get update” or you’ll get an upgraded glib6 with your next install which chews up almost all of the space remaining on the CF card and causes library issues with some of the stripped down packages, most notably dpkg.
It’s a good idea to backup the image frequently to make restoring easy. I used “dd if=/dev/sda of=stomp.img bs=8192 count=15648″ to make the backup. The count is important as devices don’t always have an EOF to mark when to quit and dd isn’t smart enough to see the seek errors.
OpenVPN is now installed using a back ported package to woody although I don’t think it’s very happy with the config I copied from my old router. Right now it connects fine but dies of a SIGUSR1 every 30 seconds. I can’t see how anything local is giving the sig, so I’m assuming it’s something internal to the openvpn process. (USR1 is the signal used to ask the daemon to reconnect.) The server logs don’t seem to indicate any problems so I’m pretty sure it’s the client.
Posted in Stompbox | 4 Comments »
March 23rd, 2006 by anton
I’ve got some pictures up on Flickr now.
The scripts are coming along and it now tells my webserver every time it reconnects. I managed to screw it all up once, but it only took half an hour to get the disk image back to where I was. Many thanks to the backups.
The miniPCI WIFI card is on the way and I’ve started looking for a PCMCIA to USB adapter. They are cheap enough on ebay and in surplus bins but I’m looking for one that isn’t too big.
I may eventually try to wedge a laptop drive under the pcmcia cards and power it with one of the small ide to usb adapters. If anyone has any experience with them please comment with a quick review.
I’m in the process of converting all the computers in the house to wireless so that silly Cat5 will soom be gone 
Posted in Linux, Stompbox | No Comments »
March 21st, 2006 by anton
Listen, just listen
There’s a new mp3 player in the gnome world. May have to check it out when Dapper stablilzes and I get mp3 and m4a files working with gstreamer again.
With listen you can
* Play your favorite songs
* Manage your library
* Manage your ipod
* Make playlists
Posted in General | No Comments »
March 20th, 2006 by anton
Voyage - Software | Voyage Linux
Weighing the options for another distro to use on the stompbox. Alternately I may consider Pebble x Voyager which adds the Voyager packages to an existing Pebble Linux.
Voyage Linux is a Debian sarge-based distro (voyage) built from scratch. It is best run on a x86-based embedded platform such as Soekris 45xx/48xx and WRAP boards. It can also run on low-end x86 PC platforms. Typical installation requires 64MB disk space, although larger storage allows more packages to be installed. Voyage Linux is so small that it is best suitable for running a full-feature firewall, wireless access point, VoIP gateway and network storage device.
Posted in General | No Comments »