Smart Home Media Project - Phase II - Hack That Xbox

July 2nd, 2008 Tanstaafl

Yes, I will now be referring to these efforts as the Joseph Baxter’s Smart Home Media Project ™.  There’s no way I’ll be able to resist coming up with some sort of logo for that, I’m sure. :)

xbmc

So, now to the part that, quite frankly, spooked me a little.  Yeah, the Myth stuff was fairly hard, and my Linux knowledge is somewhat lacking, but it was just computer stuff.  Nothing really too far outside of my comfort level.  But this - hacking an xbox?  That’s something only DJ Micro can do!

Well…it turned out to be far easier than I thought.

The hardest part is actually getting all of the ingredients together.  The hack itself only took 10 or 12 minutes.  So, here’s the list to follow my (borrowed) method.

Hardware:

  • Original Xbox
  • M/F USB Extension Cable (that you don’t want anymore)
  • Xbox controller dongle (that you don’t want anymore)
  • Xbox DVD Remote Kit ($6.00 used on ebay)
  • Any USB memory key / thumbdrive (preferably 512MB or more)

Software

Step One

The first thing I did was get a cat5 cable behind the TV cabinent.  This may seem like an obvious step to someone who uses an Xbox or 360 to play games on Xbox Live - but I don’t.  Nor do I care to do so, that’s why I’m hacking it. 

Please Note:  If you hack your Xbox you will probably be banned from Xbox Live!

The next step was to solder up a USB-to-Xbox adapter.  Since I rec’d 4 wired controllers with the used Xbox, I sacrificed one of the off-brand ones to this step.  I cut the cable a few inches beyond the actual Xbox connector.  I also took a USB extention cable and cut off the female end.  This is essentially the walk thru posted here–but with a different goal.  (The writer of that article wanted to play PC games with an Xbox controller.)

xbox 01 wires

Actually, I guess if you solder up the two remaining pieces, you could still use the Xbox controller…but who cares? :)

Throw away the yellow wire and then solder up the remaining ones:  red, black, green and white.  If you don’t want to solder, just twist them together really well and tape them individually.  Ordinarily I would stagger my solder joints so that they weren’t in one big wad next to each other…but this project wasn’t worth the effort.

xbox 02 wrap

I individually taped each joint and wrapped as much of the foil and the mesh as possible back around it the cable.  Two or so layers of tape put some rigidity back into the product, to keep from snapping wires next to the solder joints.

xbox 03 finished

Now a quick test.  Plug a different controller and the new cable into the Xbox with no disk in the drive, insert the USB key, and boot it up.  Under Memory you should be able to drill down to see the memory key in Port 2 or whatever.

Step Two

usbview

The Action Replay software won’t just work with any old memory key…you have to configure it to see the USB key you are providing.  Plug in the USB key and load up USBView.  You need to grab a few hex numbers to put into the Action Replay configuration file.

Once that is done, then you have to load the Action Replay driver on your system and set your USB key to use it rather than the generic Windows driver.

Here is the tutorial that spells out exactly how to do all of this.

Lastly, you can start up Action Replay and work on transferring those exploit files.

Step Three

actionreplay

Follow the guide here to complete the hack.  The hard work is over.  Obviously the difference is that the author paid for an Action Replay kit and I used my mad skillz.

XMBC doesn’t “install” exactly, it really is just a matter of copying files over to the Xbox via FTP.  But, anyway, once that was done I started it up via the Evox menu.  It had a really well done theme that was filled with Xbox controller images…  Cool, but not what I wanted.  So I went in and configured the simple, tasteful, blue skin.  If I could have figured out how to kill that stupid scroller from the bottom of the default theme, I probably wouldn’t have bothered.  And my wife likes the blue one better anyway.

Step Four

I wanted to load XBMC automatically on boot.  So, I followed option one of this article to make that happen.

Final Thoughts

This was remarkably easy to do…up to this point.  Now I’ve run into some trouble working with the MythTV Python script, so I’ll cover all of that in the next posting.  I have the feeling that I’m about to learn a lot about Samba network shares.

See you, Space Cowboy.

Popularity: 2% [?]

MythTV - Final Wrap Up

July 1st, 2008 Tanstaafl

I’m very happy with MythTV up to this point. It is no where near as fragile as I feared it might be–in fact, it seems to be quite robust. A recent power outage knocked its pins out from under it, but by the time I checked, the machine was already back up and running. Part of that is the BIOS setting “Last State on Power Restore,” but if the software wasn’t up to the task no hardware setting is going to help.

Which reminds me, I need to get a separate UPS for all of these machines that will form the backbone of my home network.

apc ups

I found this website for refurbished APC units, that has great prices, but will add shipping charges. However, for the savings on some of the larger models, those fees would be negligible.  For the 300VA model they only ask $29.00 (very reasonable).  Matter of fact, for the firewall certainly, 300 is all I would ever need.  Or I could get this 350VA Eaton Power model from 3btech, with free shipping…

I just want to cover the power “blips,” not the extremely rare two hour plus outages.

There are two remaining “issues” that are probably related.  The first is the channel changing speed on LiveTV, it’s a bit slow.  The second is the “Listings” on the MythWeb page from the same server–also slow to come up.  I will be adding a much faster and larger hard drive that will probably do a great deal to help this.  Also some fiddling with hdparm will probably help.  This link outlines the basic idea.

Finally, I want to point to two 3rd Party applications that work with MythTV.  The first is MythTV Player.  This is a Windows client for Myth that can play recordings and live TV.  It works like a champ.  There is no scheduling capability, but then, that’s what MythWeb is for…  I’ll add in the screen shot from the program’s homepage, because I forgot to grab one of my own. :)

mythtvplayer

The last little thing I’ll throw out is Myth2iPod.  I haven’t tested this one yet, but the idea should be pretty obvious–synch your recorded programs to your video iPod.  Even if this doesn’t work–and I don’t know why it wouldn’t–the idea is out there.  Adding an RSS feed for the videos in iTunes shouldn’t be too much work.

ipod myth

And that’s about it.  This has been a fantastic learning experience–and a highly inexpensive one.  I have four “nice to do” purchases ahead of me–none are in the “have to do” category.  And all of them together won’t even add up to $150.00.  They are:

  1. Bigger Hard Drive
  2. Moderate UPS
  3. 512MB RAM
  4. Additional Tuner Cards

On to the Xbox hack!  See you, Space Cowboy.

Popularity: 2% [?]

MythTV is UP AND RUNNING! Changing Channels via Serial Cable

June 26th, 2008 Tanstaafl

mythtv

It is official - I am a MythTV user.  Well…let’s ammend that:  I am in the possession of a fully installed and functional MythTV backend server.  There were two things wrong with the Channel Changer program:

  1. I didn’t know that the current directory is not in your path.  SO–just because you are in the same directory as a binary file, it can still be “unfound.”  When I typed in /usr/local/bin/channel to define the path explicitly it worked–I should have tried that.  I probably would have, but I was pressed for time that day.
  2. Once I could get the channel binary to work, then I faced a different issue.  By using the -p switch on the channel changer program, the individual serial ports can be specified.  Here’s what I got:
    • /dev/ttyS0 - Input / Output Error
    • /dev/ttyS1 - No communciation
    • /dev/ttyS2 - Input / Output Error
    • /dev/ttyS3 - Input / Output Error

Great.  What now?  I found several postings on the web talking about the dialout group–but I checked and my user account was already in that group.  I was pretty sure that the serial cable to the Motorola box was hooked up to COM1 (/dev/ttyS0) so I thought I better do some more investigation.  I found this tidbit:

http://www.linuxquestions.org/questions/linux-hardware-18/cat-devttys0-inputoutput-error-397212/

Which instructed me more perfectly in the way of the SETSERIAL command.  I ran SETSERIAL -a for each port and got the following info:

/dev/ttyS0, Line 0, UART: , Port: 0x03f8, IRQ: 4
Baud_base: 115200, close_delay: 500, divisor: 0
closing_wait: 30000
Flags: spd_normal

/dev/ttyS1, Line 0, UART: 16550A, Port: 0x02f8, IRQ: 3
Baud_base: 115200, close_delay: 500, divisor: 0
closing_wait: 30000
Flags: spd_normal

/dev/ttyS2, Line 0, UART: , Port: 0x03e8, IRQ: 4
Baud_base: 115200, close_delay: 500, divisor: 0
closing_wait: 30000
Flags: spd_normal

/dev/ttyS3, Line 0, UART: , Port: 0x03e8, IRQ: 3
Baud_base: 115200, close_delay: 500, divisor: 0
closing_wait: 30000
Flags: spd_normal

Wow.  Do you see what I saw?  Three out of four of my serial ports aren’t detecting the UART.  I can understand COM3 and COM4 not being there–they were not setup in the computer’s BIOS, but COM1 and COM2 should be fine.

A quick shutdown and boot to CMOS configuration proved my memory to be correct–but obviously there was something wrong.  This motherboard only had one physical serial port (the other one can be added with via a pin header) which I assumed to be set to COM1.  So, I reset it to COM2 (2F8 / IRQ3) and disabled all the rest.

And presto, it works.  I added that line into MythTV and away we go.

Playback on the computer monitor is a bit jerky, but I don’t think that it will be a problem.  This is an underpowered machine, after all, that is only supposed to be the backend.  Dividing the workload up as planned and letting the frontend machine do the playback should fix any jerkiness in the video.

The tactical plan for this box is to get a 150GB or larger hard drive in this box as soon as possible.  While I’m doing that, I might as well get a 1GB stick of RAM as there’s only 256MB in it right now.  (I thought there was more.)  Ideally, if this is all working pretty well over the next month or two I’ll buy a second PVR card, split the cable, and be able to record basic cable as well as the digital.  This will essentially duplicate the TiVo we used to have–one basic line and one digital line.

Long-term strategy will be to add a third PVR card and move one of the other cable boxes down to the backend server, fix whatever is wrong with COM1, and be able to do 3 recordings at once (or 2 recordings and one live TV).  As long as they are MPEG hardware-based encoders, this shouldn’t tax the system too much.

Oh, and I’ve still got to pay SchedulesDirect my $20.00 for this year…

Anyway, time to move on to the Xbox MythTV Frontend.  But first, I think I have one more MythTV article in me–I found two or three really nifty applications for Myth that I wasn’t expecting.  One is a Windows player for Myth that can watch recordings and livetv (no scheduling, but that’s what MythTV has a webpage for).  The other main one is a MythTV to iPod appliation that can synch your TV shows up like video podcasts.  I’ll test them out and post the results.

See you, Space Cowboy.

Popularity: 5% [?]

MythTV Makes Me Cry - Motorola DCT2xxx Serial Port

June 25th, 2008 Tanstaafl

It shouldn’t be this hard.  Unlike peeling an onion, I feel more like I’m slicing a bushel of them.  <sniff>  Ok, I’m better now.  I was just feeling a little fragile there for a moment…

onion

Allow me to make with the status.

First, the Cable box is connected back up, along with a serial cable to COM1.  Inside MythTV Backend Setup, I set the input pretune to channel 4 (which is what the cable box requires).  Going just that far, I can start the Myth frontend and watch Live TV, but I have to change the channel manually by pushing the buttons on the front of the cable box.

Ok.

So, obviously I need something to send a signal out COM1 and into the Motorola serial port that tells it to change the channel.  Doesn’t sound too hard, right?  Sure didn’t to me–however, it is seriously hard to track down information on this subject.

I finally found this link:

http://www.mythtv.org/wiki/index.php/Motorola_DCT-25xx

However, it seems to be pretty old information–it certainly didn’t work flawlessly.  Matter of fact, MAKE returned tons of errors and missing files.

So, went back to the well and fished up this little beauty:

https://help.ubuntu.com/community/MythTV_External_Channel_Changer

However, when I try to test the program, the console returns:  COMMAND NOT FOUND.  I don’t know what the deal is…  I’ll get back to you.

Popularity: 5% [?]

MythTV - Storage Groups and Linux Hard Drives

June 24th, 2008 Tanstaafl

Last night completed the second to the last step of my Mythbuntu adventure:  Adding in the second hard drive.

hard drive

Well, this would all be easier if I wasn’t trying to do it so low rent.  Right now in the Myth box there is only 512MB of RAM and two 40GB Western Digital Hard drives.  After everything is setup that only gives me about 65-ish GB for video recording.  Not alot, but not great either–right around 40 hours of recording space.

So, I should get a larger hard drive…

Well, when I do, I’ll have to repeat this same process.  Obviously, first one has to install the hardware and make sure that the BIOS can see it.  If you don’t have this, you don’t have anything.  Now to the Linux part:

  1. Partition - Setup the drive to hold data.  The main drive is probably /dev/sda, making the OS install to be on /dev/sda1 and the swap partition to be on /dev/sda5 (at least on my box).  The second hard drive will probably be /dev/sdb, and so a third physical hard disk will be /dev/sdc, and etc.  I created one big partition on the new drive.
    1. sudo fdisk /dev/sdb
    2. n (new partition)
    3. p (primary partition)
    4. 1 (first primary partition)
    5. <enter> (default first cylinder)
    6. <enter> (default last cylinder)
    7. w (write the new partition table to disk)
  2. Format - Prepare the new partition for data.  Nothing big here, but one small caveat.  Since this is not a the boot drive, theres no need for reserve space.  Usually a format reserves 5% space incase the drive fills up–this helps keep from crashing on full drives.  I set the second drive to 1% reserve.
    1. sudo mkfs -t ext3 /dev/sdb1
    2. sudo tune2fs -m 1 /dev/sdb1
  3. Mounting - Add the new space to the filesystem.  Linux sees everything like one big directory tree–there are no C: and D: drives.  So, to mount this new drive I created a directory called /video on the root and some subdirectories called /video/livetv and /video/media.  And while I was doing it, I made a backup spot for my Myth database.  After the directories are made, I changed the file rights so they could be used by Myth.
    1. sudo mkdir /video
    2. sudo mkdir /video/livetv
    3. sudo mkdir /video/media
    4. sudo mkdir /var/dbbackup
    5. chmod a+wrx /video/livetv
    6. chmod a+wrx /video/media
    7. chmod a+wrx /var/dbbackup
  4. FSTAB - Edit the /etc/fstab so that the drive is mounted on bootup.  I don’t know if you like Vi, but I hate it.  So, I installed GEdit to make my life easier.
    1. sudo apt-get install gedit
    2. gksudo gedit /etc/fstab
    3. <add a line>/dev/sdb1   /video/media  ext3    defaults     0     0
    4. Save and Reboot (or sudo mount -a)
  5. Test - Make sure that the new drive is seen (sudo mount -l)
  6. MythTV Storage Groups.  I wanted to help utilize my space as well as possible.  Inside the MythTV Backend Setup, I set:
    1. LiveTV to /video/livetv/
    2. Default to /video/media/
    3. DBBackup to /var/dbbackup/

My theory is that the Live TV buffering will all happen on the drive with the least amount of space, as well as the dbbackups.  And (hopefully) all of the actual recordings will go to the second hard drive.  We’ll see how it works out.

It has been running Live TV on The Weather Channel for the last sixteen hours and the capture files are all going to the right spot.  One problem is that my demo subscription to Schedules Direct has ran out–I’ll have to pay the twenty dollars before I can go on to the last step–changing channels on the cable box.

moto cable

Bryan said he doesn’t remember if he ever got this working a few years ago.  It is probably easier to do, now, with the new releases.  After I accomplish this last step, I will post a quick recap and include some other extremely cool stuff I found that works with MythTV.  Until then.

See you, Space Cowboy.

Popularity: 6% [?]