Sunday, January 06, 2008

Getting SlimServer and NSLU2 (Unslung) to play nicely

My latest project involved getting a squeezebox up and running. If you haven't seen one, check it out here - www.squeezebox.com. They allow you to stream music across your network, and do so wirelessly. This was for my girlfriend's place. I really like the Squeezebox, but I think if I were to get something similar in my house, I'd get a Roku Soundbridge. No other reason other than the Soundbridge uses mt-daapd/iTunes to stream music, and the Squeezebox uses it's own SlimServer software. The SlimServer is actually quite nice, but doesn't stream to other computers running iTunes, but I digress...

I got my girlfriend a Squeezebox, a NSLU2 and a USB 2.0 500 GB drive. I thought the NSLU2 seemed like a great idea. It could stream the music, be a network drive, be always on with no need for her computer to be on to stream the music. More environmentally friendly and easier to use, a win-win. However, it doesn't quite work as easily as it should.

First and foremost, getting the NSLU2 to run the software requires replacing the Linksys firmware with an open source, Linux-based firmware. It took a little work, but not so bad. Great work by those contributing to the NSLU2 project - www.nslu2-linux.org.

Next step was getting the NSLU2 to boot off the USB drive. Again, this took some work, but I managed to get that up and running.

However, once I got to this point, the time came to setup a network drive on the XP computer (so it could access the music store). This took a little work as the Slug web interface isn't the most straightforward, but that was good.

Next came installing SlimServer on the slug, which was outlined nicely here - http://www.nslu2-linux.org/wiki/Applications/SlimServer. However, I soon found out a problem - the NSLU2 isn't the most powerful application in terms of memory and processing speed. So running the SlimServer software is a bit taxing on the Slug, especially when scanning for new music.

So, to be safe, I decided to install SlimServer on the XP computer as well. That installed fine, but then I came across an issue that was almost impossible to track down. Under SlimServer->
Server Settings (Basic Settings):MUSIC FOLDER, I set it to be Z:\, which was the mapped drive on the XP computer. However, SlimServer kept giving me Oops - "X:\" doesn't seem to be a valid directory. Try again. It took forever for me to track this down and figure out what was going on.


Turns out there are two issues with this
  1. Samba must be guest account enabled.
  2. SlimServer service must have rights to access network drives.
Samba Guest Account
I am not 100% sure of this, but I believe that the Slimserver doesn't connected via Window's network drive, but rather sets up its own connection. So you cannot enter Z:\ for the music folder, but rather the path to the network drive. In my case it was \\192.168.0.12\music. But, being that you cannot supply any credentials for the login, you must allow guest access via Samba. This meant altering the samba configuration file (smb.conf) as follows

guest account = ehaus
(I added this near the top of the file. It can anywhere in the file as long as it is in the global section, and not the individual shares).

Starting SlimServer with proper rights
Lastly, SlimServer needs permission to access shared drives. If you start SlimServer as a service on windows (this is the default), you must allow it to login as a Windows XP user. To do this, go to Control Panel->Administrative Tools->Services. Look for SlimServer, and either double click or right click and select Properties. Click on the LogOn tab, and select "this account" and enter a username and password for Windows XP account.

Restart SlimServer on the XP machine and samba on the Slug. You should be able to change the SlimServer web Music Folder to \\192.168.0.12\music. It worked for me, your mileage may vary.

Monday, December 03, 2007

mt-daapd (Firefly) and Hawking WiFi card - ACX111

My latest linux hack is to use Firefly (mt-daapd) to stream music to other computers in my network. I had been sharing my music with via Samba. However, I found iTunes to be slow to read my music library via a shared network drive (Samba). So I tried using Firefly Media Server (previously known as mt-daapd - a service that serves music to iTunes as well as other players like rhythmbox).

Firefly installed quite easily, and seemed to start up just fine. The log files showed that it found my music library, and that the web portal that Firefly comes with showed that everything was running just fine. But my iTunes just couldn't find see Firefly on my media computer (running Ubuntu Feisty Fawn).

I tried almost everything to debug this. I used avahi, I tried compiling a more recent build of mt-daapd, nothing. I tried running mt-daapd (installed from Ubuntu repositories) on a laptop running Feisty, and it worked. iTunes could see it, rhythmbox could see it, and everything was good.

It drove me nuts because I couldn't figure what the issue was. I spent hours reinstalling mt-daapd and avahi. Finally, I read that some wireless routers and wireless cards with linux don't work well. So I hooked my Ubuntu media PC up to ethernet and disabled the wifi card. All of sudden Firefly worked just fine.

So it turns out that my wireless card (Hawking HWC54G) which used the ACX111 driver just didn't work well with mt-daapd (or more precisely, Avahi). So after replacing my Hawking wifi card with a DLink DWL-G510 which uses an Atheros chipset, I know have Firefly serving up my music as it should.

It works quite well and is definitely more responsive than sharing my music via Samba.

Sunday, April 09, 2006

Installing Fedora Core 4 & MythTV, Part 1

So I recently decided to create my own MythTV machine. I don't watch much TV, but the idea of zapping commercials and automatically recording shows is kind of appealing, plus, at the end of the day, setting of MythTV is probably more fun than actually using it.

If you are considering building MythTV, IT WILL BE A LONG PROCESS. If you are not a system administrator for Linux (and I am most definitely not), you're in for a long ride. Like every open source project, there are millions of web postings, HOWTOs, forums, etc dedicated to installing, setting up and configuring MythTV. And like every open source project, 95% of this documentation is incomplete, confusing, contradicting, etc.

You may want to consider using BeyondTV or other windows-based projects if you are not comfortable with Linux. It will be time consuming and it will be frustrating.

So the first step, is to get the necessary hardware for MythTV, which is mostly a computer and video capture card. I took it one step furter, and bought a card that has on-board MPEG encoding, which means that I do not need a really powerful computer, as the card will do a lot of the heavy video processing, leaving the computer/CPU free for other tasks.

I bought the Hauppage WinTV PVR 350, as it seems to be well supported for Linux, and it has a video out. However, if you are using Windows as your PVR/media center, I would recommend getting the WinTV PVR 150/250 and a different video card that can output to your TV. It turns out that you cannot output the desktop (ie, your computer screen) to your TV with the PVR 350 in Windows, only video files that are being played back. Since I am not planning on using a monitor in my media center, trying to click on a file and open it up blindly before it anything appears on my TV screen was disappoing to find out. I thought I was saving money by getting the WinTV PVR 350 as it had the video out, but perhaps not. I'll see how it works in Linux.

So my media center computer has the following:
Intel Celeron 1.8 GHz
512MB RAM
40 GB hard drive (this is probably too little, but a good start for now - I'll discuss the issues this raises when partitioning the hard drive and being able to expand it later)
Hauppauge WinTV PVR 350 card
Hawkings Wireless PCI 802.11g card (I ordered this for this machine specifically because I heard it was Linux friendly - to be determined).

My next step was to determine what flavor/distribution of Linux to use. I realize that this can be an almost religious debate among compu-geeks. But for the guy who just wants to be able to watch the Daily Show whenever, and not be sys admin for my home network, I want something that is easy as possible.

The possibilities I considered were:
  1. Knopp/KnoppMyth. This is the "out of the box, just install it and run MythTV" distribution. I did not try out Knopp, but I have tried MEPIS, which I believe is derived from Knopp. I really like MEPIS, but I did not choose KnoppMyth, as I heard it is OK to use for Myth, but if you ever want to use your machine for something else (a file server), it may not be great. Moreover, there is no such thing as an out of the box MythTV machine. At least not yet. Linux may be 1000x more stable, powerful, better designed than MS Windows, but when it comes to usability for an average person, Linux is years behind.
  2. Gentoo. There are people who love Gentoo with MythTV. Basically the idea behind Gentoo is that you compile all your programs yourself. The upside is that you really gain a solid understanding of how everthing works in Linux. The downside is that you have to gain a really solid understanding of how everything works in Linux in order to use it properly. Great for the computerphiles. Not so good for me.
  3. Fedora Core 4. This may sound like a silly reason, but the sole reason I chose Fedora Core 4 was that I thought it had the best documentation out there. A person named Jared Wilson created an excellent FAQ/guide on how to install and configure MythTV with Fedora Core 4. It can be found at http://wilsonet.com/mythtv
So, thus I began my road to installing Fedora Core 4 on machine. In Part 2, I explain how to install Fedora Core 4, and add some tips that are missing on Jared Wilson's FAQ.

Wednesday, March 22, 2006

Netgear MA111 USB wireless adpater woes with MEPIS Live

Trying to install on a wireless, Netgear MA111 (USB) adapater on MEPIS Live linux is a royal pain. After trying in vain to get it to work and reading a billion newsgroup postings, I came to realize that soemthing was just wrong with MEPIS.

If you go to OS Center->Network interfaces you can enter information for WiFi, DNS, eth0, waln0, etc, etc.

You can turn start and stop the interfaces. So if your wireless isn't working, the first step is to stop the wlan0 interface . Then you need to enter the proper information for WiFI (the [E]SSID for your wireless access point, etc).

Then you you need to re-start the wlan0 interface. However, MEPIS wouldn't let me restart it (the stop/start button just froze). I tried a ton of tweaks to get this to work, but to no avail.

The only way I could get it to work was to make sure that when MEPIS started it could connect by default to my wireless router - which means I had to broadcast my ESSID and turn off WEP (ie, my wireless router had to be open - I think that MEPIS by default at boot up connects to the strongest access point it can find. If you, like me, have lots of neighbors AND you don't broadcast your ESSID, you're screwed.

So once I broadcasted my ESSID and turned off WEP, MEPIS would auto-connect and it worked fine.

FYI - using the same MEPIS Live CD (3.4.1) on a my laptop with a different wireless card (Linksys PCMCIA), I could easily stop/start the wlan0 interface. So, I believe the problems lie with MEPIS and my Netgear MA111 USB adapter.

NOTE - if you install MEPIS, I think these problems go away because you can save the profiles/settings for what the wireless adapter should connect to. But if you are using MEPIS Live, have a Netgear MA111, you may be screwed like me.

BTW - using iwconfig/ifup/ifdown didn't help either. Had the same issues.