The competition

I visited a friend recently and he had some sort of Streaming Media Server atop his TV.

It was a commercial system (boo! hiss!) called a Pinnacle Showcenter.

Anyway, it looked pretty nice.

Quite a bit smaller than the one I had built.

It had some funky blue LEDs, but my case has funky blue LEDs.

It doesn’t have an LCD panel though, so I win on that one.

But one really nice thing that it did do was to show photos as a slideshow on the TV.

“I can do that” I thought.

So I will.

First step, buy a cheapo (silent) video card with TV out.

Next step, write some code to display photos. On-screen display of photo titles would be a nice touch too.

Watch this space.

Network booting linux

For my project I decided from the very start I was not going to install a hard drive.

So, I needed some other way to boot the machine.

Options were:

  1. Network.

  2. USB stick.

  3. Compact Flash card (via a USB card reader).

  4. Compact Flash card (via a IDE based card reader).

I already own the kit to do 2 and 3, and needed to buy a wireless network card that could do 1 (or so I thought) so I discounted 4 on the basis that I didn’t want to spend money needlessly (haha, I wish).

I then discounted option 3 as I needed my card reader for getting photos off my camera.

I finally discounted option 2 as my USB stick is USB 1 and is slooooow.

So, network booting it is.

As previously documented, the wireless network card didn’t support network boot, so I eventually bought a “wireless bridge” that is completely transparent and allows the onboard network card to boot.

Initially I had thought it would be a complete pain to do network booting as I was unable to find instructions that completely matched what I was trying to do (most involved NFS in some way).

Fortunately though, a friend pointed me to instructions on his site that I was able to follow, and combined with instructions on booting Linux from compact flash I was able to muddle through it all.

I initially built my disk image by roughly following the compact flash instructions.

I did this by putting a spare hard disk into the box and installing a stripped down Slackware 10 on it.

This involved a fair level of faffing around as I tried to find a balance between disk space and convenience (could I live without having vim installed, that sort of thing).

I then roughly followed the network booting instructions to get my PC to network boot with my new disk image.

The main difference from the compact flash instructions was to set the final boot system as /dev/ram as the entire OS would run in RAM once it was booted.

The big mistake I managed to make was to set the root image to be so big that it wouldn’t boot (presumably as there was not enough free RAM) – the only symptom was that the OS hung at the point it said “RAMDISK: Compressed image found at block 0”.

It took me a while to figure out that it was too large.

I did some more trimming and ended up with a 274MB disk image that compressed to 78MB.

274MB might seem a lot but it had to include Java and all the libraries for music playback.

After all this faffing I finally had a machine that would boot from the network and run entirely in RAM.

It was worth it in the end.

Case built

A week ago my PC stuff arrived.

Here’s a summary of what has gone on in the meantime.

I built the case within the day. The heatsink and fan run very quiet indeed (almost inaudible at the lowest setting but still keeping the CPU around 48C).

The PSU fan is also nearly silent.

I also bought a blanking plate for the drive bay too that is silver although it only arrived today at work so I don’t know if it matches yet.

So, that was the good news.

The bad news is two-fold.

The LCD panel I bought doesn’t fit. 🙁

The only way to make it fit would be to cut the circuit board (that holds it in place) to the correct size.

I was unwilling to do this, partly as it might end up looking crap (I’m not the best at that sort of work) and partly as I didn’t want to start hacking away at something brand new.

So, after a few days of umming and ahhing I bought the recommended green VFD panel instead.

It doesn’t look as good and is smaller too so I wasn’t the happiest about that.

The other bit of bad news was that my wireless network card doesn’t support network booting so I have put it on ebay and bought a device that turns any wired network device into a wireless device.

I can then use the onboard wired network card that does support network booting.

So, a few teething troubles but I’m still on track for a Christmas Day go-live.

The kit has arrived

My PC case has arrived!

Initial thoughts.

It’s quite tall considering it’s got only one front bay.

There is no cover for the front drive bay, although there is a pull-down flap, so it only looks bad if you open the flap. This is annoying, but I guess they expect you to put a CD-ROM drive in there. I won’t be so will need to get a nice looking cover from somewhere.

The heatsink and fan are huge. Hope they fit.

And the entire thing is freezing cold as it’s just come off the UPS van, so I think I’d best leave it to warm up for a while as it’s condensation city at the moment.

I have already created a stripped down Slackware install to put onto it.

For now I will boot it off a USB memory stick as network booting looks like a configuration nightmare.

The OS it boots from will run in RAM and be read only.

To speed things up today I will stick a spare hard disk in it.

Once I’m happy it all works I’ll dump the install to the usb stick and boot from there.

Wiphi photos

Some photos of the Wiphi LCD panel.

I don’t have a box for it yet so there is nothing else to see really.

The main title screen

A track playing

Changing the volume

The menu system – browsing a playlist

The volume bar disappears five seconds after the volume button on the remote is released.

The menu bar disappears after ten seconds of inactivity.

Multi-threaded innit.

More coding on Wiphi

I have done much work on Wiphi of late.

Stuff I have working so far:

Remote control of MPD (the music player). I can play, pause, stop, select next and previous tracks and change volume, using a repurposed Sony remote control (I will buy something that fits the purpose better at some point).

I found a Java API to LCDproc, it’s basic but works. Saves me writing one.

The LCD panel shows the currently playing tune. And if I change volume it shows a volume bar.

It doesn’t yet have any indication of play/pause/stop status (I need icons).

It also displays a clock. This is a very important requirement, as the box will sit in the spot that my VCR currently sits in and that hunk of junk‘s only purpose is to display the time.

I am now working on the menu system. I can press the menu key on the remote and the menu appears, I can then scroll through the available playlists, step into a playlist to see each track, and step back to the list of playlists. Next step will be to play a selected track or playlist.

Project repurposement

Some background info so the following makes sense.

For Wiphi I currently store the information about my ogg files in a database and have a Web app that streams the music to MPD (or any player that can handle streams, I also use that setup for playing music on the PC upstairs too).

So….

I was chatting to the developer of MPD on IRC recently, trying to explain my project and he couldn’t understand why I was streaming the music from a remote server, when I could just use Samba and let MPD handle the music database and playlists. I couldn’t understand what he was getting at and we were both completely confused.

His suggestion though did get me thinking and I realised my way of doing it was over-complicated. However, that in itself is not a reason to change, after all, it’s my project, and I can do it how I like.

But, I couldn’t shake the thought that I might be going about it the wrong way.

Then I realised the source of the confusion. He thought I was writing a front-end to MPD. And I was in fact only using MPD as a player. I was ignoring half its feature-set.

I was busily writing a system that would be useful to one person, me. When I actually had the chance to write something that could be useful to many people. Once I realised this my opposition to his suggestion crumbled.

So, I am going to re-work the project. It’s going to essentially be a LCD/remote control front-end to MPD. It will still have all the functionality I originally intended, but it will actually be useful to other people too.

Hopefully it won’t involve too much new code.

Project Wiphi

Streaming media project update time.

Software:

I am gonna use MPD and Java MPD to play streaming music.

I’ll use LIRC and JLIRC for the remote control.

And LCDproc to control the LCD panel I bought and I will write some sort of Java API to it.

I’ll also write the glue software that holds it all together in Java and make it open source.

Linux:

I will probably use a stripped down custom build of Slackware as the OS and I intend to boot it from the network or from a compact flash card.

Hardware:

I still plan on using the Accent HT101 box.

I bought a remote control receiver from zapway as it works well with LIRC.

I need to find some way to hold the receiver in place behind the smoked glass panel inside the case.

Lastly, I decided to change the project name. WiMeP didn’t really roll off the tongue.

I am going to call it Wiphi which has much more “rollability” but doesn’t really stand for anything.

It’s sort of a play on “Wireless hifi” though.