Anatiferous blog | Move every zig.

Meta-Site

Welcome to Anatiferous: Using barnacles to make geese since 1689!

Howdy! This is my (William Reading's) webpage. At the moment, I only have this blog script and my gallery up, but I hope to get more stuff on this page at some point, or so I thought when I created this site years ago. Updates and shiny new copy to eventually go here. If you'd like to contact me to point out that I've done something to break XHTML/CSS standards or heaven forbid--look at my Vita--drop me a line at my e-mail address bill +spam @ [ELEPHANT] aggienerds.org. Simply remove "+spam", the spaces and the pachyderm along with its brackets and that address will reach me. I'm also available on Jabber/GChat/AIM/MSN with the same address above.

10/30/2004

T-Mobile GPRS on Debian

Filed under: — bill @ 2:22 am

I’ll be attending the acm regional intercollegiate programming contest next weekend and one of the things we have traditionally done on the way up there is to find geeky ways to pass the time in the van. In the past year, I convinced my parents to let me subscribe to the unlimited T-Mobile GPRS plan. This has obvious practical applications, including the ability to have network connectivity even when in a moving vehicle.

One of the past limitations of this was that the cable I purchased occupied the entire slot on the base of the phone due to the fact that the phone needs a resistor across the first and second pins in order to tell that a cable was plugged into it.
But thanks to Tristan’s excellent soldering job, I now have a cable that allow my phone to be plugged in to a car charger and connected to GPRS simultaneously.

A few weeks ago, I picked up an Xbox and installed Xebian/Xbox GNU/Linux onto it. It occured to me that this would be the perfect platform to serve up the network access and perform some additional tasks, such as uploading the coordinates from a GPS unit to a web server tracking our progress. (Alternatives include plugging the device into mine or the other passenger’s laptops the whole time)

So how does one go about setting this up? For starters, I need to be able to have the Xbox establish a GPRS connection on its own. This requires that the Xbox load the usbserial module on boot:

# /etc/modules.xbox: kernel modules to load at boot time.
#
# This file should contain the names of kernel modules that are
# to be loaded at boot time, one per line. Comments begin with
# a “#", and everything on the line after them are ignored.

loop
input
keybdev
mousedev
joydev
sunrpc
lockd
nfs
scsi_mod
sd_mod
lirc_dev
lirc_xir
usbserial

The next step is to set up pppd for the T-Mobile GPRS service. I have the “VPN” service, but most users with unlimited access will have the regular one. The main difference is that the “VPN” service gets you a public IP address and must be specifically requested. In places where internet3.voicestream.com is used, internet2.voicestream.com should be replaced if this is the case. While I was writing it, I used Brad Midgley’s T-Mobile GPRS page and the Eridani Linux pages as references.

The /etc/ppp/peers/tmobile file:

# File: /etc/ppp/peers/tmobile
#
connect “/usr/sbin/chat -v -f /etc/chatscripts/tmobile”
/dev/usb/acm/0 # Motorola Phone Cable
115200 # speed
nodetach # don’t fork
debug # show debugging info
defaultroute # set the default route
replacedefaultroute # yes, override the default route
usepeerdns # get the dns servers from the tunnel
crtscts # do flow control
noauth # no authentication required
deflate 0 # don’t compress
asyncmap 0
mtu 1500
mru 1500
noipdefault
idle 600

The /etc/ppp/chatscripts/tmobile file:

ABORT ERROR
‘’ AT&F
OK AT+CGDCONT=1,"IP","internet3.voicestream.com”
OK ATDT*99#
CONNECT ‘’

The /etc/ppp/pap-secrets file:

(none) * password
‘’ tmobile

With that configured, pon tmobile activates the GPRS connection and poff tmobile deactivates it.

10/13/2004

Packetshaper in the sky

Filed under: — bill @ 7:03 pm

So for anyone interested in the rules of how packetshaping is done and the results of it, I have all of the rules and statistics now online. Interestingly enough, usage is only shaped in dormitories and VPN. The document is rather large (over a thousand pages!), so it might take some time to grok interesting details out of it.

10/8/2004

Linux on the Xbox

Filed under: — bill @ 10:28 pm

So I decided to pick up an Xbox cheap from GameStop this week. (I couldn’t resist, they priced them at $129 and even included the Mechwarrior game with the saved game buffer overflow vulnerability). Having read through quite a few guides that appear to have been written by script kiddies, I decided to document a bit of what I did here to save someone else the trouble, should they run across this guide.

The hard part is really getting the Xbox prepared having nothing else but a Linux desktop and an Xbox. I’d originally intended on soldering a USB extension cable into an Xbox controller, (surprise, surprise, the Xbox controllers use a standard USB 1.1 hub inside them and the memory cards are your standard USB memory sticks with a funny connector). “After I’ve got a regular USB connector, I’d be able to use the handy dandy images designed to be dd’d onto a USB memory stick", I thought. However, after letting magic smoke out of various bits of the controller several hours later, I decided that this was probably a bad idea.

At that stage, it was back to the drawing board, since I’d just bought an Xbox and I really didn’t want to break it nor become unable to get Linux installed onto it. A few details about the Xbox before I talk about what I decided to do: 1) The Xbox uses a regular 8 or 10 GB hard drive with a standard ATA lock enabled. It’s using maximum security, so the vendor’s master password cannot override the password. The Xbox unlocks it by generating a SHA1 hash based upon a value stored in an eeprom, its MAC address, the drive’s model and lastly, the drive’s serial number. Since I have no way of knowing what value is stored in the eeprom (though I could piece together the rest from physical inspection of the unit), I had to figure out some way to get unsigned code to execute on the machine to hand over the value of the eeprom. This, of course, is a catch-22.

The solution to it, while simple, is kind of boneheaded to try. (So I did) This method is what the Xbox kiddies call the “Hard drive hotswap trick". The idea is fairly simple: Plug in the Xbox, let it send the ATA unlock command to the drive and then plug the IDE cable into an already running desktop. There are a couple of caveats to this: the drive cannot be reset and cannot be powered down or it returns to the locked state. It’s easier said than done.

However, I did get it to work by powering on the Xbox, navigating to the saved games screen, unplugging the IDE cable and then plugging it into my desktop by itself on the secondary IDE bus with a Xlinux (a special Xbox distro) disk running off the cdrom. Surprisingly enough, it actually worked! Any linux distro with the xfat patches can be used, but the patch that I pulled off the xbox-linux’s project site refused to compile with gcc 3.3 and gcc 2.95, on my debian machine, so I settled on the livecd.

I was pretty happy at this point, having gotten it to work, but overlooked one detail: The save files needed to start MechInstaller. So I restarted with a hard drive containing the files on the second channel of the primary ide bus. (following all the steps from before, since I didn’t want to reset the drive). After unmounting all the filesystems and starting up the Xbox with the saved files in the proper directory (it’s the UDATA one, IIRC).

With the MechAssault game started up, I hopped over to “Campaigns” and there was the emergency linux boot game, which actually worked as advertised. The rest of the install is an exercise in installing Xebian or gentoo, that of which I probably wont actually do for a little bit since my new project is getting StepMania to run on here :).

Speaking of which, to run stepmania requires installing a dashboard replacement binary which is fairly trivial to do once you have emergency linux on your hard drive. It’s only necessary to pick up a copy of Bert is cheating on Ernie.rar and do a couple of things. (Yes, it is in fact named that, and it’s with snufflelopagus). I’m not certain about the legality of it, but since it’s my hardware, I don’t see why not.

Open up Rescue Linux and cd into /mnt/C, ftp the xbe file and the ini into the root directory, rename the .xtf files to something as a placeholder name, and move the two files into the fonts directory and bert to “Xbox book.xtf” and snuffle-boy to “Xbox.xtf". Stick the skin.ini file into /mnt/C/Skins and the two jpegs into a subdirectory of that named PheoniX. That should be about it to it, though it needs the version of the dashboard that comes with any live game for it to work. Note that while the link for the network has to be up to upgrade the dashboard, it should not give the machine a route to the internet because the replacement dashboard depends on behavior that is patched in later versions.

10/6/2004

Using gif devices on FreeBSD5

Filed under: — bill @ 3:02 am

This was not obvious for me and didn’t seem to be well documented, so mostly as a note to myself, when creating gif devices on FreeBSD 5, just do something like this:
ifconfig gif create
In previous releases of FreeBSD, it was automatically created for you and sort of sat there doing nothing. Other differences is that when configuring the interface you would do ifconfig gif0 tunnel a.b.c.d e.f.g.h instead of using gifconfig

 

Google
 
Web anatifero.us
aggienerds.org

Powered by WordPress