Tuesday, September 16, 2014

Raspberry Pi DVR - Raspbian

The Raspberry Pi has lots of different operating systems to choose from.  For my DVR project, instead of picking one and trying to make it work at all costs, I decided to experiment with each operating system one by one.  That way I can see the strengths and weaknesses of each before deciding which operating system is the best for me.  To start things off I will be looking at Raspbian.

Raspbian is the main operating system for the Raspberry Pi.  It is a version of Debian "Wheezy" Linux made specifically for the Raspberry Pi.  It's a general purpose operating system, so you should be able to do most anything from Raspbian that you could do on a regular computer.

Raspbian Debian "Wheezy" - September 2014 (kernel 3.12)
Installing Raspbian is very easy.  Download the image then use a tool like Win32 Disk Imager burn the image onto your SD card.  The first time you boot a configuration screen will pop up.  I made the following changes on this screen (you can rerun this tool later on to make these changes).

  1. Select "Enable Boot to Desktop" and then "Desktop log in as user pi."  Without this change Raspbian will boot to command line, with this change Raspbian will boot to a nice graphical interface.
  2. Select "Internationalization Options" and then "Change locale."  Place a check by "en_US.UTF-8 UTF-8."
  3. Select "Internationalization Options" and then "Change time zone."  Linux handles time zones differently than Windows.  Instead of selecting your time zone by name or UTC offset, you instead select a region and a city near you.  So for me I select Americas and Los Angeles.
  4. Select "Internationalization Options" and then "Change keyboard layout."  For me I selected "Generic 104 key" and "English US."  This step is important as the default keyboard layout is English UK with things like the pound sterling symbol.
  5. Select "Advanced Options" and then "Overscan."  Set this option to disabled.  Older analog TVs have overscan where the image is smaller than what the TV can display.  If I don't disable overscan then on my computer monitor I have half an inch of black all the way around the outside edge.  Disabling overscan corrects this.

Once Raspbian is loaded, I used the "WiFi Config" link on the desktop to configure my wireless network.  I'm pleased to report that Raspbian includes drivers for the Rosewill RNX-N180UBE so the network worked as soon as I entered my wireless password.

One very common task on any operating system is browsing the Internet.  The Raspberry Pi has at least 4 browser options.  I tried each to see which worked the best; Iceweasel, Midori, Chromium, and Epiphany.
  1. Iceweasel is the Raspberry Pi version of Firefox.  To install it you run the command "sudo apt-get install iceweasel"  Whereas Firefox is my favorite browser on Windows, the Raspberry Pi does not do it justice.  It was the slowest of the bunch making surfing a painful experience.  On the plus side, the pages were rendered perfectly and looked as they should.
  2. Midori was the default Raspbian browser up until one month ago.  It was faster than Iceweasel, but still slow.  I also noticed some pages looked as if they did not render correctly.
  3. Chromium is the Raspberry Pi version of Chrome.  Chromium was fast and also rendered the pages correctly.  To install Chromium run the command "sudo apt-get install chromium"
  4. Epiphany was just released about a month ago.  It is the result of about 10 months of work dedicated to making the fastest most optimized browser for the Raspberry Pi's limited hardware.  And it shows!  Epiphany was the fastest of the bunch, rendered all pages correctly, and has a clean simple UI that was easy to use.
I would recommend Epiphany to anyone using a Raspberry Pi.  If you need a second choice, then go with Chromium.  Regardless of which you chose, all 4 browsers scored a perfect 100 on the acid 3 test.  You might run into problems getting Epiphany installed if you are using an older image.  I initially started testing with the June 2014 Raspbian image which does not include Epiphany.  There are instructions on adding it to your system, but each time the upgrade process hung.  I repeated it 3 times on fresh images, each time it hung.  Eventually I got it installed right about the time they released the September 2014 image which contains Epiphany out of the box.  So unless your image contains data you must keep, I recommend wiping your SD card and starting fresh with a new image.

The next hardware question was does Raspbian see the Hauppauge 950Q TV tuner?  The kernel does see it, but you need to manually install a firmware file (more on that in a later post).  Next you need to install the tvheadend server.  First run the command "sudo curl http://apt.tvheadend.org/repo.gpg.key | sudo apt-key add -" then edit the file /etc/apt/sources.list.  Append the following to that file, "deb http://apt.tvheadend.org/stable wheezy main"  Lastly, run "apt-get update" and "apt-get install tvheadend"  This will install and start the tvheadend server.  tvheadend did see the TV tuner and started to pick up local TV channels.  I won't go into more details about tvheadend right now.  I'll save that for another post.  After all, whether I use Raspbian or something else like OpenElec, the configuration of tvheadend will be the same, so best to cover it once in a dedicated post.

The final tests I wanted to run on Raspbian is remote access.  Using the Putty on another computer I was able to connect to SSH on the Raspberry Pi.  SSH was enabled by default in Raspbian.  SSH access was fast and snappy, as you'd expect from a command line only connection.

I also tried Windows Remote Desktop Connection.  On the Pi I ran "sudo apt-get install xrdp"  After which I was able to connect remotely from Windows using the built-in Remote Desktop tool.  The connection was relatively responsive.

The final remote option I tried was VNC.  I installed TightVNC server on the Pi, but no matter what I tried I was unable to connect using another computer.  I don't know if the server wasn't properly started, or maybe the port was wrong.  But I never got it working.  Since I had two other ways to remotely connect, I decided not to pursue this any further.


Well there you have it.  My first distro review for the Raspberry Pi.  For the most part it was easy to use, but I recommend a lot of tinkering to get used to the quirks.  For example, it took me a while to figure out how to set the keyboard to US layout instead of UK layout.

No comments:

Post a Comment