July 15, 2007
Gaming backlog
My little brother came out to visit over the 4th of July, and he pointed me to his new project: finishing his entire backlog of games. While I applaud his effort and wish him luck, he's more ambitious than I am. I have my own backlog (don't we all?), but I just don't have the motivation to take up the gauntlet and work my way through. There's too much new good stuff out now or coming soon that I'd rather get a taste of it all instead of immersing myself in one game at a time. That's not to say that I don't get caught up in certain games. I played Forza 2 nearly exclusively for all of June, and I continue to play it now. I just can't see myself focusing what little gaming time I have on going through my stack of games. Maybe someday ...
Posted by Todd at 2:37 AM-08:00
January 8, 2006
Xbox 360, Live, and NAT update
A little over a year ago, I posted how I fixed some problems I was having with Xbox Live by setting up UPnP on my Linux router. Since I was finally able to get my hands on an Xbox 360, I figured it was time to update my guide on using Live behind a Linux NAT. The instructions work for both Xbox and Xbox 360, but I'm going to focus on the Xbox 360 configuration this time around.
First things first. If you don't need to do this, don't do this. How do you know if you need to do this? Are you using Linux as a NAT router for your home network? Does the Xbox 360 report your NAT as moderate? If so, you probably need to do this. What is "this"? Keep reading.
Since the last time I posted, the Linux-IGD project has seen some development, but to look at their home page you wouldn't know it. Even the Sourceforge page still shows 0.92 as the latest version, having not been updated since January 12, 2003. All of the recent changes are in their CVS repository, though, so we'll build from that instead. Follow the instructions to checkout linux-igd to your machine.
If you followed my previous post, make sure you've fully uninstalled upnpsdk and linuxigd (a "make uninstall" should be enough for upnpsdk, and for linuxigd you should at least make sure upnpd is not running and remove the /etc/linuxigd directory). Once you've checked out the CVS project, you'll find a file called INSTALL. Read that to guide you through installing libupnp-1.2.1. Make sure you download version 1.2.1 and not version 1.2.1a from the download page. The INSTALL file is not exactly correct, as you can't just run "make" from the libupnp-1.2.1 root directory. Instead, go down into the upnp directory under libupnp-1.2.1 and run make there. This should also build ixml and threadutil at the previous directory level. Follow the rest of the INSTALL steps, making sure to copy the extra ixml and threadutil libs and includes. Finally, you can build and install the CVS linux-igd following the steps in the INSTALL file.
Before you fire up upnpd, first take a look through /etc/upnpd.conf and make sure everything is set to your liking. Some settings I suggest (these should be the defaults):
- Make sure "iptables_location" points to the path to your iptables binary. This should default to /usr/sbin/iptables and should already be correct, but double-check to be sure.
- debug_mode = 1. Without this, you're not going to be able to keep tabs on what upnpd is doing.
- Make sure the chain names for forward and prerouting are correct for your configuration. The defaults should usually be right, but it doesn't hurt to double-check.
- Set your upstream_bitrate and downstream_bitrate if you really care. These are in bits per second, not bytes, so make sure you multiply by 8 if you start from bytes per second. For example, 2 Megabits per second would be 2097152, but 2 MegaBytes per second would be 16777216.
Now that that's taken care of, start up your Xbox 360 and go to the System blade. From here, choose Network Settings and then Test Xbox Live Connection. You'll be prompted that testing the connection will sign out all profiles, so choose Yes and get down to business. You should now see something like this:
The most important line is the one called "NAT", and it should read "Open", like so:
(For original Xbox users, read my original post for steps to check your NAT level.) If it doesn't, something went wrong. On the linux box, run "tail -f /var/log/debug" (if your syslogd is configured to log debug messages somewhere else, tail that log instead -- you can find out what your syslogd will do by looking at /etc/syslog.conf). When you run the Test Xbox Live Connection troubleshooter, you should see something similar to the following in your log when it gets to the "Xbox Live" portion of the test.
If you don't see that, run "killall upnpd" and then check ps to make sure upnpd has died before restarting it. Watch the debug log when restarting, and if you see any errors you can look into the Linux-IGD forums to see if you can find some help. Luckily for me, everything worked great the first time.
By the way, if you have a Windows box behind your NAT, it should now pick up the UPnP gateway device (you may have to install some components through the Add/Remove Programs applet to be able to see UPnP connections, and even if you already have UPnP support installed you'll need to reboot for the OS to pick up the gateway device). For example, on my XP laptop, I now see this in my Network Connections control panel:
From here, you can drill down into the gateway device's Status, then Properties, and finally Settings to see the list of current port mappings.
If you can't get this working, you can use Noel Danjou's UPnPTest (about halfway down the page, "Univeral Plug-and-Play Tester") to test your UPnP configuration instead. Linux-IGD still reports itself as version 0.92, but the CVS version is really something like 1.04 or 1.05 now.
Hopefully this will help out other people trying to get Xbox Live working on their original Xbox or new Xbox 360, since Microsoft doesn't officially support Linux as a NAT router. If you've had problems and been told to go buy a router off of the official compatibility list even though you'd rather continue with your Linux setup, this is for you.
Update: One minor note that I forgot. You may need to do a little bit of manual patching of the linux-igd code, if that fix hasn't merged into CVS. Read that thread, and look in your downloaded code to see if you need to manually patch or not before you actually build.
Posted by Todd at 12:53 AM-08:00 | Comments (16)
November 19, 2005
Automatically add Gadgets to Live.com
I found a post detailng a new feature on Live.com, making it possible to automate adding a Gadget. Now I can provide links to add the Analog Clock or Livetris to your Live.com profile.
The following links will open a new window to Live.com and add the respective Gadget.
Posted by Todd at 9:54 PM-08:00
Tetris on Live.com - Livetris
For my next Gadget, I give you Livetris. It's a completely DHTML re-implementation of the classic puzzle game. It's still pretty basic right now, and only has 10 different speed levels (currently non-configurable, so you have to start at level 1 and work your way up). Block randomization needs some tweaking, since right now it's all too likely to end up with a long string of crap blocks without the bar or square you need to complete a set of lines. I also need to do some work on the scoring, as right now there's no bonus for clearing multiple lines at once. Finally, I'm still tweaking piece colors until I find something I really like, but that's the beauty of a Live.com Gadget -- I can make all of the changes I want, and you'll see that reflected on Live.com without any user intervention.
As with my Analog Clock Gadget, this one continues to use the awesome JavaScript VectorGraphics library. This is a very robust and powerful tool, and I highly recommend others check it out.

I plan to eventually put my Gadgets up on the Microsoft Gadgets site, but for now you can use these installation instructions:
- Copy
http://www.daishar.com/gadgets/Livetris/Livetris.xml
to your clipboard. - On Live.com, select Add Content on the sidebar and then Advanced.
- Paste the Gadget URL into the Add a Gadget by URL textbox.
- Select the Add button.
Compatibility notes: For now, this Gadget is IE-only due to the way I'm handling keyboard input. I hope to get this working with Firefox soon, but I figured I may as well release what I've got right now.
Posted by Todd at 6:05 PM-08:00
November 2, 2005
Live.com Analog Clock Gadget
With the launch of Windows Live yesterday, I decided I should try my hand at writing a Gadget (yes, I know Start.com has been doing the Gadget thing for a while, and Live.com is nothing more than a re-branded Start.com). What better than a simple Analog Clock? Thanks to the JavaScript VectorGraphics library folks for an awesome DHTML drawing library.
The Analog Clock Gadget works with both Live.com and Start.com.

To install (cribbed from Microsoft Gadgets' installation instructions):
- Copy
http://www.daishar.com/gadgets/AnalogClock/AnalogClock.xml
to your clipboard. - On Live.com, select Add Content on the sidebar and then Advanced.
- Paste the Gadget URL into the Add a Gadget by URL textbox.
- Select the Add button.
Posted by Todd at 10:38 PM-08:00 | Comments (3)




