Sunday, December 12, 2010

Talking to my toaster

I want my kitchen toaster/computer to be wireless, so it can be a media client.  My ultimate goal is to have my new 'mediamonster' computer be a media server that can send music/video to the various computers in the house.  But first I have to get toaster talking to the rest of the network.  I had tried a couple of wireless dongles, one that came with my Samsung blu-ray player, and another one that we purchased at a PC recycle place here in Tacoma (I can't find a URL, I'll post one later if I can find it).  Neither worked out of the box.

First, some background.  I haven't posted since November, but I've been busy with some new projects that I should fill everyone in on.  One of them is my new mediamonster, which is another barebones computer from tiger direct.  This one has a fancy case that makes it look more like a stereo than a computer, so it fits nicely in my media center.  I read a blog about a month ago about someone that created a media server from spare parts.  That makes a lot of sense, since if you do it correctly, you don't need a lot of fancy hardware to build a good server, and it has surprisingly minimal requirements as far as RAM and CPU speed.  Why pay a couple hundred dollars for one from the store when you can get the same thing for pennies and a little sweat equity, and get the pride of saying you made it yourself.  Ok, so I didn't pay just pennies, my last spare motherboard was used on the toaster, so I had to buy one, and I bought the fancy case so that I didn't have to hide it behind my TV.  Also I bought a cool wireless keyboard so that I could still couch surf with it.

Now the sweat equity part of the media monster.  There were a few issues getting the whole thing together, and a little more learning about how hardware has changed since I last dabbled seriously in computer building.  First off, the case didn't come with a power supply, but I had a spare power supply I figured I could use.  Wrong!  The new motherboard has a 24 pin ATX power connector, and my spare power supply came with a 20 pin connector.  So off to Best Buy to spend a fortune on a new power supply and a IDE ribbon cable which I also needed.  They had the power supplies for 60 some dollars, but they didn't have any IDE ribbon cables so we figured Radio Shack might have both for cheaper.  Fortunately for us, the Best Buy salesman was kind enough to point us to 'The Green PC' here in Tacoma.  We went searching for the place, and found it in a dark back street off South Tacoma Way.  It's a PC recycling place, and also sell bottom-of-the-line cheap hardware.  We got the ribbon cable, the power supply, a used TV tuner card, and a wireless dongle that said it was Linux compatible on the packaging.

Back home, we found more issues.  The case is a specially designed, fold-up case with the power supply and disk drives on the top half, and the motherboard on the bottom.  But the power supply cables didn't reach to the motherboard, even with the case closed.  The wires from the power supply came out on the opposite side as the connector plugs on the motherboard, and the distance was just long enough that it was clear it wouldn't work.  I had to flip the power supply upside down, which meant the fan would blow down into the lower half.  To do that I had to remove the fan grill which stuck out.  The screws that held the grill in place also held the fan in place, so it was a bit of a struggle getting the fan back against the side of the power supply so I could re-attach it.  That all done, the cables just barely reached the motherboard.

I had some issues installing software for it.  It's hooked up to our Samsung LCD TV, and it takes some time for the picture to show on the screen.  So I couldn't see the BIOS screen to set it to boot off the CD.  So I had to guess and just hit delete over and over when booting up, and I finally got to the BIOS screen.  After that, installation went without problem.  Now we have the mediamonster hooked up to the TV, and we can watch Hulu through the Hulu desktop, as well as stream music and video from our MyBook NAS.  No luck on the TV tuner card, it wasn't recognized by the standard set of drivers, so I will have to cobble together my own somehow.

Back to the toaster computer, I had the same trouble with the wireless dongles, they weren't recognized by the standard set of drivers.  Both dongles had drivers available, but in Linux tradition, it wasn't just a simple file you could plug in, but the source code that you had to build, and pray that it would compile without error.  Of course, neither did.  I looked around some more and found some how-to documentation that walked me through some of the trouble shooting steps.  To make the story short, I discovered that the wireless dongle that we purchased actually did have the drivers installed, but there were error messages in the syslog about not being able to load the firmware.  I'm not exactly sure what the story is with the firmware, and why it has to be separate from the driver.  Anyways, these wireless cards need to have firmware loaded into them in order to work, and the firmware is located in /lib/firmware.  Doing some investigation on in the Ubuntu forums, I found that the drivers installed in Ubuntu are looking for the firmware in the wrong place.  For this dongle they are looking in /lib/firmware/RTL8192SU, but there is only a /lib/firmware/RTL8192SE.  So I made a copy of RTL8192SE and called it RTL8192SU, rebooted, and the wireless dongle started blinking a happy green light.

Now I could see the list of wireless networks in the area, and our two were listed.  So I connected to our main wireless network, typed in the password, and it made it's little connecting animation.  After about a minute it re-prompted for the password, and repeated this cycle.  Again, I'll cut to the chase.  Apparently when the package says wireless-N it means it.  It was not able to connect with my wireless network because it was a B/G network, and wasn't backwards compatible.  I can't say that for certain, as I couldn't tell exactly what it was that the dongle didn't like, but I set it to talk to my secondary wireless network, which is N, and it was much happier (I did have to set the security protocol to WPA only rather than WPA/WPA2).  It's a long story as to why my primary network is a G network, and the secondary network is an N, but I'll probably revisit that whole setup soon anyways.

So now I can talk to my toaster, and it can stream music and video.  One issue still remains, it has occasional freezes, which is very unusual for a Linux system.  All of my other Linux systems can run continuously for months without rebooting.  To freeze like that almost certainly is either a driver issue or a hardware issue.  I'm assuming this network driver wasn't throughly tested by the Ubuntu people or the firmware wouldn't have needed to be monkeyed with.  But equally likely is the fact that it's running on a motherboard strapped to a toaster grill. But for now, I'm going to relax and stream my favorite radio station KING FM

One last thing, our latest visit to the Green PC landed us a cool looking 8 port gigabit network switch.  Our project yesterday before the concert was to re-wire the downstairs for gigabit networking.  We found a spot for the switch in the utility room, put a few holes in the wall, and reran the network cables. Now the whole house is wired gigabit.

Upcoming...I'm determined to get the TV tuner card in the mediamonster working, I'll have to look into troubleshooting capture device drivers next.  So stay tuned for the latest in my endless litany of frustration as I struggle with making my universe work.

No comments:

Post a Comment