Monday, July 22, 2013

Delicious Raspberry Pi

I'm sure most folks have heard about the Raspberry Pi by now, and maybe some of you are curious if this $35 ARM-based computer is worth anything more than just a digital toy to play around with.  I know I was, so this last weekend I finally took a day to build one and see what it could do.

It was quite easy to assemble and get up and running. I won't produce another HowTo doc here because there are plenty of good ones already. The ones that I used that are referred to throughout this article. What actually took the longest was putting together the slick little case sold by Built To Spec.  There are lots of folks selling enclosures for the Pi, but I liked the looks of this one. It does require a bit of ambidexterity to assemble, kind of like putting a Chinese puzzle back together, but it is a nice, well-designed case.



In addition to the $35 Model B Pi purchased from Allied Electronics, I bought a $10 8GB SDHC card and a 7-port USB 2.0 powered hub for $25, because my plans for the Pi were to see how well it could perform as a NAS device and media server, and for that I was going to need more than just the two USB ports on the Pi.

I used the Raspbian “Wheezy" distribution downloaded from here and copied it to the SDHC card. I pretty much just followed the instructions in this document to boot and configure the device, and then I installed the Tightvncserver package and did the rest of the installation and configuration with the unit running headless.  The image at the top of this article is the Pi's vnc desktop running on my Linux Mint 15 work machine, click it for a larger image. Btw, here is a nice document that describes how to have the vnc server started at boot time.

Underneath my desk, nearly covered in cat hair are four USB 2.0 drives that I've accumulated over the past few years which have a total combined capacity of about 6 TB.  That's where all my movies, music, and other digital content is stored.  It is these drives that I wanted to disconnect from my main work server and let the Pi handle. I do, btw, have redundant backup elsewhere on higher-capacity USB 3.0 drives.



Installing the NFS server was straight forward, basically as described here.  Getting the NFS server running consists pretty much of just  sudo apt-get update; sudo apt-get install nfs-kernel- server nfs-common rpcbind , and then setting up the configuration files (/etc/fstab, /etc/exports).

At this point I was ready to test the Pi as a NAS.  I was pleasantly surprised that it could effortlessly serve up big, fairly high bandwidth Matroska 1080p movies across my home network to the Linux-based home entertainment system without a hitch.  So far, so good.

The final bit that I was interested in was installing some kind of media server package so that all my movies and music could be accessible from some of the Android devices laying about the house. The package I chose for this was MiniDLNA, and there is a decent document on installing it on the Pi here. MiniDLNA will scan all folders you specify in its config file for video, audio, and picture files. It will then make these available to any UPnP devices such as televisions, games consoles, and Android devices running a UPnP client like the MediaHouse UPnP / DLNA Browser.

When you first start minidlna on the Pi it searches through all the directories that you specified in the config file and indexes all the audio, video, and digital image files that it finds and builds that information into a MYSQL database.  In my case there were about 8,500 movie and audio files that have collected over the years, and it took about 1 1/2 hours for minidlna to index all of that. However, once it was done I could access the media from the Android devices running the MediaHouse UPnP browser.

Bottom line, I am very impressed with the Pi. It is amazing how much work you can do with the Broadcom 700MHz ARM1176JZFS processor with FPU and Videocore 4 GPU, and just 512 MB of ram.

--Doug

Update 7/23/2013: The cat discovered the 6 TB foot warmer.


10 comments:

  1. And the total cost is...?

    ReplyDelete
  2. Hey, Bob. :)

    For the server: $35 for the Pi, $17 for the case (there are cheaper ones), $10 for the SDHC card: Total = $62.

    I also bought a 7-port powered USB 2 adapter for $25.

    ReplyDelete
  3. Delicious. :)

    I just ordered another one that will be running XBMC and which will replace my current Linux-based home entertainment box.

    ReplyDelete
    Replies
    1. Put OpenElec on it instead. We run it and it works great!

      Delete
    2. I'll check it out, thanks!

      Delete
  4. I suppose if the r-pi is sufficient media server / NAS you don't care, but I'd recommend using the newer USB3 drives as the active storage and using the older USB2 drives as the backup.

    ReplyDelete
  5. Nicely done (and documented)!

    Dr. Strangelove

    ReplyDelete
  6. Thank you VERY much Doug!

    Can you guess what I am going to buy at my Electronic's Store now?

    Rgds

    //GF



    PS
    Pet your beautiful cat from me too! :-)

    ReplyDelete