June 21, 2008

XBMC update .... 3 months on.

After the Media Centre's had quite some use, and then a little rest I came back to do an update - new build hoping that it would fix the bugs with MP3's and found my installation no longer worked! The XBMC guys had changed the output binary file names and stuff so I had to revisit the configurations and scripts etc.

NOTE: I have updated the installation posts with the new path/symlink & output files so that people looking at this blog will still be able to install.

So my thoughts, well ... the intel video stuff is 'ok', but it's not where I want it. I was hoping that 3 months on, some of the developers would have moved on with the linux support and was hoping that I would have super smooth play back. It's not that it wasn't smooth it's just that it would tear occasionally on large panning scenes etc.

The best work around for it was to set the Resolution of the application and all video playback to full screen, 720p - 50hz. Then I also configured the card to VSYNC. It was 'ok' but every now and then the video and sound wouldn't be synced, and it's just got on my nerves.

It became obvious that if I had just waited a little be longer for that XFX motherboard, I would have been having far less troubles. That said - I still had a PCI-E slot free on the motherboard so I decided to upgrade to the Nvidia graphics cards and looked at the options. There weren't all that many that met my requirements. I want it LOW COST and I wanted HDMI out, without a DVI->HDMI Adapter.

I have just purchased a Albatron GeForce 8500GT 256M DDR3 Blue Ray Decoder Card with HDMI, which was $65 from Umart again. Can't complain!

I am yet to install it, but I have been suring up and testing the XBMC installation and new features. YAY they fixed the MP3 Crashing problem I had been having!

I will post the details shortly regarding the installation of the Nvidia 8500 on it's completion.

March 01, 2008

Using your local Ubuntu Mirror!

Ubuntu We all know that in this day and age you need to keep your operating system up to date. With Debian/Ubuntu you simple run the 'sudo apt-get update' command followed by 'sudo apt-get upgrade' to ensure all your packages are ready to roll.

That said, when your machine goes and downloads from the update servers it may be using one that isn't local, which results in mediocre download speeds. Ideally, you want to setup access to a mirror that's closest to you. For me, that mirror is Internode.

For details of the internode mirror, I used the following site. For a full list of Ubuntu mirrors, checkout this website.

What you need to do is select the ISP that you're connected to, or that is closest to you (read the advanced section below for more details). Then select the distribution you're running - the one for this project was 'Gutsy Gibbon 7.10'. It will provide you with a couple of lines that you need to add to your '/etc/apt/sources.list' file. In my example, it was the following.

deb http://mirror.internode.on.net/pub/ubuntu/ubuntu/ gutsy main
deb-src http://mirror.internode.on.net/pub/ubuntu/ubuntu/ gutsy main
Once you have added the two new lines, run the following command!

# sudo apt-get update


Now next time you do a 'apt-get upgrade' or a 'apt-get install' you should be downloading at max speed! :)

Advanced tuning tips!

The simplest way to find out if a mirror is closest to you is to use the traceroute command from the console. Generally, the site that will provide you with the most bandwidth will have the lowest ping response time. The traceroute command will give you both information of how many hosts/routers your data has to go through to get to the end mirror server and what the return trip time is for that server.

It should also give you an idea of the networks/hosts that your data goes through to get to the mirror. Most ISP's have multiple links to eachother and upstream providers, which all have differing network characteristics. What you're looking for is ideally someone on your Local Exchange network. For instance, here in Australia the largest peering exchange is PIPE Networks, so for me it's ideal to use a network that shows PIPE Networks in the middle! :)

February 28, 2008

Getting the Linksys USB Wireless to Work

After installing Ubuntu, the Linksys WUSB54GC wireless network card was reported as available and looked as though I could configure it. Sadly, this isn't the case and the card doesn't actually work.

You actually need to install the driver (yes the windows one) that comes on the CD or that you download.

You need the ndiswrapper tools installed to do it.
# sudo apt-get install ndiswrapper

Copy the following three files from your CD\Drivers directory to somewhere useful, for example your homedir.
  • rt73.cat
  • rt73.inf
  • rt73.sys
# mkdir /home/xbmc/linksys-wireless-usb
# cp /home/xbmc/linksys-wireless-usb

Now build and install the module using the Windows INF file and the ndiswrapper tool.

# cd /home/xbmc/linksys-wireless-usb
# sudo ndiswrapper -i rt73.inf
# sudo ndiswrapper -m
# sudo ndiswrapper -mi
# sudo ndiswrapper -ma

Restart your machine and it should be all up and running and fully configurable from inside the Gnome/X11 UI! :)

February 27, 2008

Ubuntu - Remove User login from XWin

Obviously the major issue with any Linux host is that everything that you do requires user authentication. If I intend to use this computer with only a remote control I obviously need to remove the requirement for a user to login when the machine boots.

Well, in Gnome - Ubuntu's default X Windows Manager, this is quite simple to achieve.

Simply open a console window from within your current X desktop session. Type the following command.

# sudo gdmsetup

This will bring up a GUI tool which looks like this.


Select the Security tab, select the 'Enable Automatic Login' checkbox and then select the XBMC user that you have used. (In my example, it's obviously 'xbmc').

Remote Control Tuning!

For me, as soon as I had installed the infrared remote tool it was up and running after the next restart of XWin.

What I obviously want to do is put this PC under the table that the TV is currently sitting on and have NO keyboard and NO mouse. (While that's a great idea right now, I still have to get around the 'login to linux' thing, but give me a day or so and I will have that sorted out too.

For the remote, I followed the 'Tips and Tricks' thread in the XBMC for Linux End User forum and put together a number of scripts (mainly what they had already) and put them on my HTPC.

Tool 1 - Start and Stop XBMC From your Remote

File: /home/xmbc/.lircrc
File: /home/xbmc/scripts/startIRexec.sh
File: /home/xbmc/scripts/startXBMC.sh
File: /home/xbmc/scripts/stopXBMC.sh

To Download all files, grab this archive and extract it in the XBMC Home directory. >> File Download Link <<.

Now, after these scripts are in place you need to setup your X session to load the IR Daemon to listen for your special remote key presses. Steps are as follows:
  • Click System, Preferences & then Session
  • Under the "Startup Programs" click "Add" and enter the following values.

Logout of your X Session and you should be ready to go using my assigned buttons. They're configured in the '.lircrc' file in your home directly. You will notice I am using the following buttons on my remote.
    • RecTV - Start/Restart XBMC
    • LiveTV - Kill XMBC - back to Gnome desktop.
If you would like to choose your own buttons for your remote, checkout the lircd.conf options for the Microsoft Media Centre Remote 1039 >> Here <<. For other remotes check the LIRC webpage.

XBMC Installation steps taken

Here's the steps I took to install Ubuntu 7.10 (Gutsy Gibbon) and XBMC.
  1. Installed Ubunto 7.10
  2. Checked Graphics Settings (X11 'intel' Driver)
  3. Checked for Updates (Using Ubuntu GUI)
  4. Added a new XBMC user
  5. Logged in as XBMC User
  6. Installed SVN

  7. # sudo apt-get install subversion
    # cd $HOME
    # svn checkout https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/linuxport/XBMC

  8. While that was running, I opened another Console and started installing some additional packages i needed.
    • openssh-server (For Remote Telnet/SSH Access to the Box)
    • samba (For Remote Windows File Sharing)

    # sudo apt-get install samba openssh-server

  9. Installed the XBMC Required Packages (Please check this document for the up-to-date required packages)

    # sudo apt-get install make g++-4.1 gcc-4.1 libsdl1.2-dev libsdl-image1.2-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libsdl-sound1.2-dev libsdl-stretch-dev libfribidi0 libfribidi-dev liblzo1 liblzo-dev libfreetype6 libfreetype6-dev libsqlite3-0 libsqlite3-dev libogg-dev libasound2-dev python2.4-dev python2.4 python-sqlite libglew1.4 libglew1.4-dev libcurl3-dev g++ gawk x11proto-xinerama-dev libxinerama-dev libxrandr-dev libxrender-dev libmms-dev pmount libmad0-dev libtre-dev libogg-dev libvorbis-dev libmysqlclient15-dev libpcre3-dev libdbus-1-dev libhal-dev libhal-storage-dev libjasper1 libfontconfig1-dev libbz2-dev

  10. Compiled the Source Code

  11. # cd $HOME
    # cd XBMC
    # ./build.sh

  12. While the source is compiling, there's a few little options that are worth changing.
    • Disable CD Autoplay/Mount - Untick both the 'Mount removable' and 'Browse Removable' when inserted options.
    • Install the Infra-red Remote Control Software for Linux

    • # sudo apt-get install lirc
      # sudo /etc/init.d/lirc restart

  13. Install additional remote control tools (Check IR Remote Tuning Article).
  14. After the compile finishes as expected, run your XboxMediacentre Executable!

  15. # cd BUILD
    # ./XboxMediaCenter

  16. You should be up and running!


  17. If that works, and it comes up, the binary obviously compiled properply and is working ok. To make the remote control scripts work properly you need to create a 'symlink' to the binary in the home/XBMC directory.

    # cd $HOME
    # ln -s $HOME/XBMC/BUILD/xbmc.bin $HOME/XBMC/XboxMediaCenter


    Now, press 'RecTV' on your remote! :D

LinuxMCE - Boo!

Well, I installed it and I gave it a good go. I give it 3 out of 10.

There's a number of problems that I experienced with this distribution, some important, some not. As a result I am currently reinstalling Ubuntu 7.10, to install XBMC for Linux to give that a test run.

Issues:
  • The X11 drivers for the G35/X3500 GMA Video cards aren't quite there. I sort of knew this might happen running the absolute latest in graphics products. The i965 drivers seem to do ok, there's just some issues with GL/Shading. I am certain that it will get sorted.
  • The way LinuxMCE assumes that it's just going to be your home gateway for internet access and all things network is just purely wrong. The fact you can't even get it to ignore outside/inside interface information and fall back to a single NIC just throws me. The fact that you almost certainly have to run a DHCP server is also a pain in the rear.
  • The RAID (albiet software) configuration is just stupid. I cannot using their RAID tool just mirror the primary disk. If I could have got all the networking stuff working, I would have configured Linux's MDRAID myself, but I was already frustrated enough.
  • The Interface is 'ok', and flickered a little. I am sure this was related to the X11 video drivers.
  • The fact I couldn't ever get the network sorted out meant adding Windows based Samba media was tedios, if not painful. I also couldn't figure out the filesystem and directory structure.
  • While alot of these issues can normally be resolved reading Wiki's, forums and documentation there's no-one really looking after the collation of all this data and it's so hard to find. Additionally you have to search internally on their Wiki/Forum to find anything as for some reason Google's got very little results for LinuxMCE.
At this stage, I am going to see what I think of XBMC on my new hardware. I realise this project is even more in it's infancy but it shows considerably better signs of 'community' organisation.

The LinuxMCE is something I might come back to when I have a little more time, it's just for now I got frustrated doing anything outside the box of whatever their developers have dreamed up.

February 26, 2008

Hardware Supply Hiccup

My hardware supplier had some issues sourcing the XFX motherboard so I ended up shelling another $100 out for a different one. Being a huge fan of ASUS, I ended up getting myself a P5E-VM HDMI motherboard. The major difference with this board is the OnBoard video device - an intel GMA X3500, their latest DirectX 10.0 and Shader Model 4.0 compliant video card. Really, I was tempted to go down the nVidia path, but I was too keen to wait so I ended up with this one. Features I don't like about this board are the fact that it's only got a single PCI card and it's twice the price.

Features that I do like are the additional SATA controller ports, the S/PDIF In port, which is natively on the motherboard. The XFX Listed S/PDIF IN only, which I was concerned about. ASUS also have some of their own fancy BIOS controlled fan settings, which you can very simply just set the device to 'quietest' and off you go.

That said, it's an ASUS and it will no doubt perform perfectly, and I know for sure their BIOS' etc will be regularly updated. It can now sit next to all my other ASUS motherboard'd PC's in my house! :) hehe.

For a detailed review of this board, check this out. I am really becoming a fan of the Slient PC review site, it REALLY detailed the important things in their reviews while not nitpicking over stupid in-game FPS meters and software CPU measurement tools. I believe this stuff's for people who just want to overtinker their computers, cause they refuse to just pay another $40 for the faster CPU (which would overclock to the next level anyway).

ezhtpc - The Software?

Before ordering my hardware, I looked into the options for the media centre front end. As a long time admirer of all my friends with XBox consoles and the recent announcement of the Linux port, XBMC was the way I was headed.

Upon talking to another friend of mine, Troy, who as 2 Xbox's and a XP Media Centre PC he suggested I look into Linux MCE. Well, I checked the site and remembered being sent the info on Linux MCE months ago and feeling the urge to just go out and buy it immediately. I was sceptical at the time but there seems is now a considerable amount of information and discussion on the various internet discussion boards and Wikis.

The question really remains - Which one will I go for? ..... Well, why not both? :)

Given I have will have a blank handware slate shortly, I will test both frontends and see how they go!


February 25, 2008

My AV Setup - TV & Amp

Though not considered part of the HTPC itself I thought I let you know what A/V equipment I am using for the HTPC setup.


TV: Panasonic Viera 50" Plasma TH-50PX70A.
AMP: Pioneer
DVD Player: Pioneer Multiregion
Others: Playstation II

My First HTPC - The Hardware

Being both a industry professional and PC hardware enthusiast, I set about creating myself a HTPC that would both allow me to tinker while also keeping costs low. I already run 4 PC's at home, the last thing I needed was another one .... right? :)

Below is the hardware I have purchased.

Case - $125
- Antec NSK2480B Solution Series MicroATX Desktop Case Black (Review)

Motherboard (Sound, Video, Expansion) - $108
- XFX N630-7159 nForce 630i - 1333Mhz FSB DDR2 Intel Socket 775 MicroATX (Product Page)

CPU & Ram - $289 & $89
- Intel E6600 - Core 2 Duo 2.4Ghz
- DDR2 2048MB(2x1G)PC6400 800Mhz Green Heatspreader G.Skill

Hard Disks - $124 each
- 2x Samsung 500G 7200RPM SATAII

Optical Drives - $37
- Pioneer DVR-215BK 20x Dual Black OEM - SATA

Wireless Adaptor - $39
- Linksys WUSB54GC Wireless Compact USB Network key 802.11g(54Mbps)

Remote Control - $49
- Microsoft Media Centre Remote





Total Price: $1013.00 Australian Dollars

All parts were sourced from my local PC Store, U-Mart.

My First Blog and the Beginning of EZHTPC

For years and years I have always wanted to create for myself a little embedded Linux based network firewall device. I had previously done this before for a 'Global' wireless initiative making use of uClinux and the Snapgear hardware. This was obviously a network focused device making use of some key internet protocols for authentication and a number of linux based tools. The hardware was faultless, but the business never really flew.

I moved overseas to undertake a position in Ireland and for my 'home broadband' I purchased myself a Netgear WGT634U wireless router to use with my NTL: Cable broadband connection. The router worked ok for a while, but it's DNS processes would crash every now and then. I went about upgrading the firmware from Netgear's site. Much to my disappointment, nothing was fixed so I took the next step. Putting on my development hat I broke my way in, removed the DNS tool that was causing the issues. This made me think about these devices a little more, especially with the USB option.

2 years later after moving back to Australia and with the recent purchase of a Australian 3G Wireless Broadband account which makes use of the Huawai E220 USB 3G/HSDPA modem my interest in this little project was reborn. I got the WGT634u out of the cupboard again and tried to get the modem working with the OpenWRT distribution and additional packages. It didn't work due to the nature of the USB modem having a Serial and USB Mass storage mode. I set about recompiling the operating system to include tools to better manage the device, but I ended up cooking the little router. I am now awaiting the shipping of a serial cable to fix it.

Having nothing to work on all of a sudden while I waiting for special cabling to arrive from the USA and China from Ebay I thought about some other hardware that might have been better suited. I found some of the emebedded Mini-ITX boxes that I was after and looking at the price tag of $700 i thought to myself, well I probably won't use this device all that often, so maybe I will get one with TV OUT and let it double as a media PC.

After digging around I could have put one together but it just wouldn't have the kick required for a HTPC displaying HD Content. Given the fact these devices are quite expensive, I priced up an alternative using more consumer based electronics and found myself leaning towards a proper PC.

After convincing myself I needed to spend the money I bought myself the hardware and I sit now awaiting its availibility for pickup!

This is my first blog ever and I hope that one day it becomes useful for someone.