In my latest article, I tested the video output capabilities of the little RPi as a usable HTPC. While it can be used as very efficient and low-consumption movie player using XBMC (no matter what flavour: Xbian, Raspbian or OpenELEC), I found it hard to use it as a download server, since it does not provide enough power to feed external USB drives. Some time ago I bought a Pandaboard ES. It is also a small ARM based computer, quite powerful and, while it was intented to be as an Android sandbox development board, there are Ubuntu distributions that can be used for other purposes (like, creating a download server or media center). So, I decided to give it a try and see if the Pandaboard could substitute the RPi as a tiny and efficient HTPC. Keep reading to check the results.
Raspberries for breakfast! |
Setting up the pandaboard
I've used the Pandaboard mainly as a server machine, used to deploy several OSGi bundles we use at work. It performs considerably well as a server, being capable of handling hundreds of connections with no issues. Sadly, at least before I tried more recent images, desktop experience in the pandaboard was a real pain. First image I tried was Ubuntu 11.10 with Unity. The pandaboard was not even able to move windows and drag&drop was totally unresponsive, thus making the user experience a nightmare.
That said, I did a little digging and found a distribution that can be used with the pandaboard in order to unleash its full graphic potential: Linaro. Linaro is a developer community highly active devoted to provide OS operating systems distributions for ARM processors. They have distributions for Android, OpenEmbedded and Ubuntu aiming several developer hardware platforms like Origen, Pandaboard, Snowball and Versatile Express boards. For the pandaboard, there are Android and Ubuntu distributions. I decided to try the Ubuntu one. Follow this steps to get the image flashed in your SD card:
- Add the linaro repository to your sources list in order to install linaro tools
$ sudo add-apt-repository ppa:linaro-maintainers/tools
$ sudo apt-get update $ sudo apt-get install linaro-image-tools
$ wget http://releases.linaro.org/13.01/ubuntu/boards/panda/linaro-quantal-developer-20130128-256.tar.gz $ wget http://releases.linaro.org/13.01/ubuntu/boards/panda/hwpack_linaro-panda_20130128-58_armhf_supported.tar.gz
dmesg
umount /dev/sdbX
sudo linaro-media-create --mmc /dev/sdX --dev panda --hwpack hwpack_linaro-panda_20130128-58_armhf_supported.tar.gz --binary linaro-quantal-developer-20130128-256.tar.gz
Ready to plug your Linaro SD card and give it a try in the pandaboard! Unfortunately, I never managed to create the image myself with linaro image tools, so I had to use a pre-built image, and here is where the fun begins.
The provided images here are headless images intended for development, thus, no desktop is included. In case you need (that was my case for a HTPC), so what you really need is Linaro Evalution Builds or LEB which include the desktop packages. Funny enough, I also found a 12.06??? ubuntu desktop release for the panda, that oddly, weights about hundred more megs than the "official". That's one of the confusing things about Linaro, there are many hidden URLs that provide different builds, so it can be a bit of a mess. I tried both and they both seem to work fine, so up to you to choose. Let's go with the official one:
The provided images here are headless images intended for development, thus, no desktop is included. In case you need (that was my case for a HTPC), so what you really need is Linaro Evalution Builds or LEB which include the desktop packages. Funny enough, I also found a 12.06??? ubuntu desktop release for the panda, that oddly, weights about hundred more megs than the "official". That's one of the confusing things about Linaro, there are many hidden URLs that provide different builds, so it can be a bit of a mess. I tried both and they both seem to work fine, so up to you to choose. Let's go with the official one:
- Get the pre-built image
$ wget http://releases.linaro.org/12.11/ubuntu/precise-images/ubuntu-desktop/linaro-precise-ubuntu-desktop-20121124-560.tar.gz
$ gunzip linaro-precise-ubuntu-desktop-20121124-560.tar.gz
$ sudo dd bs=4M if=linaro-precise-ubuntu-desktop-20121124-560.img of=/dev/sdb
Ok, now you can test it in your panda. Plug it in and give it a try. Now you have a few options here. If you have a stable system with this image, go ahead and install XBMC to try the video capabilities of the pandaboard. I did this and found that GPU acceleration was not as close as, to put an example, as with the RPi, resulting in clumsy movie play.
That said, I renounced to used this image and looked for an "already built" XBMC solution for the panda, sort of like Xbian, OpenELEC, etc for RPi. To my dismay, there does not seem to be the same initiative regarding the pandaboard, probably because the GPU capabilities of the panda are not the same, and most important, the guys developing Linaro are not getting all the kernel support from Texas Instruments.
That said, I renounced to used this image and looked for an "already built" XBMC solution for the panda, sort of like Xbian, OpenELEC, etc for RPi. To my dismay, there does not seem to be the same initiative regarding the pandaboard, probably because the GPU capabilities of the panda are not the same, and most important, the guys developing Linaro are not getting all the kernel support from Texas Instruments.
The only available XBMC build I found for the panda is the one created by Ricardo Salveti. Unfortunately, the links provided are broken and no way to found the pre-built images. Lucky you, I managed to get one of those before the links were gone, and I've uploaded the image I have to my dropbox. Process is as before, flash it to your SD card and you'll get a XBMC working in the Panda. Once again, unfortunately, perfomance compared to the RPi when it comes to playing video was way down. Even worst, when trying to login in the undelying OS (precise with Unity AFAIK), never managed to make it work. I wanted to try the pandaboard as a download server + media player, not just the latest, otherwise I'd stick with the RPi, so this image was NOT an option for obvious reasons.
At this point, if you managed to make the panda work with the Linaro desktop images plus installing XBMC and your download stuff, and you're happy with the performance, I'd recommend you to stop reading. What comes next is my struggle to get a decent download server in the pandaboard.
Going back to origins
Pandaboard performance with FullHD |
Playing video files at decent frame rates with high resolutions (720p, 1080p) became an impossible task for me. Thus, I decided to simply download the official Ubuntu release for the panda (not the Linaro one), install p2p related software and attach my external USB drives. Pretty much the same setup I have with my old HTPC, "the mother of all the noises" Asrock ION 330T. The process is very similar to depicted above:
- Get the latest Ubuntu release for the pandaboard:
$ wget http://cdimage.ubuntu.com/releases/12.04/release/ubuntu-12.04-preinstalled-desktop-armhf+omap4.img.gz
$ gunzip ubuntu-12.04-preinstalled-desktop-armhf+omap4.img.gz
$ sudo dd bs=4M if=ubuntu-12.04-preinstalled-desktop-armhf+omap4.img of=/dev/sdb
$ sudo sync
Now you should be able to plug your SD card and get a fresh install of Ubuntu on the pandaboard. There are a few recommendations on how to improve overall performance. Here is a list and my thougts after trying them:
- Disable swap. Edit your /etc/fstab file and remove the following line:
$ /SWAP.swap none swap sw 0 0
I didn't really see any improvement doing this. This is supposed to be effective if you're experiencing sudden lag because of memory swapping, but that was not my case.
- Enable tmpfs in fstab. Add these two lines to /etc/fstab:
$ tmpfs /tmp tmpfs nodev,nosuid 0 0 $ tmpfs /var/log tmpfs nodev,nosuid 0 0
Same as before, not feeling any performance boost with this, at least on a X session. Just give it a try.
- Substitute Unity with Xubuntu or even better, Lubuntu:
$ sudo apt-get install xubuntu-desktop $ sudo apt-get install lubuntu-desktop
Xubuntu works faster than Unity in the panda, and you can get a really good UI performance boost with Lubuntu. No matter what you choose, prepare for a long install (about an hour or so), so grab your mug and go for a coffe :D
Best mug for chilling |
- Install omap4-extras. Additional packages that enable video hardware acceleration (among other things) in the pandaboard:
$ sudo add-apt-repository ppa:tiomap-dev/release $ sudo apt-get update $ sudo apt-get dist-upgrade $ sudo apt-get install ubuntu-omap4-extras
Get ready for a VERY long install. Besides, I never managed to make this work. NEVER. Actually I did, but it results in a unstable pandaboard that crashes, freezes and hangs every now and then, thus I can't recommend it unless you absolutely plan to use hardware acceleration on the pandaboard. Me, I gave up after 4 or 5 SD flashes and starting from scratch each time.
- Change default cpu frequency governor policy
$ echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
Again this resulted in a very unstable system in my case, constant reboots and system freezes. Can't recommend it.
The solution
Just came to the following conclusion: the pandaboard can't be used for streaming FullHD video while the Raspberry Pi is not good enough as a download center, but performs incredibly well playing fullHD videos. So? Why not use the panda exclusively as a download center and the RPi as a movie player? And that's what I did. There are some people that use just a couple of RPi for this, but I already have a couple USB external drives up to 3TB, so I just simply didn't want to throw them away and having to buy a hard drive case with external power supply. This is because, as you may already know, the RPi is not capable of powering up external USB drives.
Thus, I just installed the official Ubuntu release on the panda with nothing extra besides installing Xubuntu desktop and Xbian on the RPi for playing videos. On the other hand, I have used my already existing Xbian image with the RPi to use as the video player machine. The following picture depicts my layout:
Device layout |
As you can see, I'm using two HDMI cables instead of one for the RPi. The reason for this is that there is no way the RPi will be able to send a DTS/DD decoded signal decently, you only get what is known as "downmixed stereo"...plain 2-channel sound, ok if you don''t have 5.1 and DTS receiver, but I have one and REALLY enjoy surround, so this was not an option.
Your only chance then is to send the VIDEO&AUDIO signal directly from the RPi to your AV receiver, and it will responsible of audio encoding/decoding. Besides, your RPi will get a small performance boost, since it does not care any longer about video & audio, just spits it directly from its HDMI out to your AV receiver. The receiver will get the audio signal and based on its properties decide how to decode it. Now to get video out to the TV, you'll need another HDMI that goes from your receiver to your TV/project/whatever (see picture above).
New HTPC in da house |
I had to buy two 10 meter long HDMI cables, not really expensive (about 10€ each), but the pain comes to actually installing them...it takes some time, but it is worth every minute afterwards, when you can enjoy. This is how it looks on the back of my TV:
Keep them tidy |
Setup pandaboard as download center
Setting up a download media server is pretty straight forward, but here are some tips in case you miss something (like I did). I'm supposing you're starting from a freshly installed Ubuntu image with Xubuntu or Lubuntu installed.
Static IP on your pandaboard
It is nice to have a static IP assigned to your pandaboard, specially if you plan to access it via ssh or Remote Desktop, like me. Besides, setting a static IP will allow accessing your panda from outside your home network. Always cool to manage your downloads from work :).
- Modify your network interface configuration
$ sudo vi /etc/network/interfaces
$ # The loopback interface auto lo iface lo inet loopback auto eth0 iface eth0 inet static #your static IP address 192.168.1.X #your gateway IP gateway 192.168.1.1 netmask 255.255.255.0 #your network address "family" network 192.168.1.0 broadcast 192.168.1.255
$ sudo /etc/init.d/networking restart
$ sudo vi /etc/resolvconf/resolv.conf.d/head
$ nameserver 8.8.8.8
$ sudo resolvconf -u
$ nslookup google.com | wget google.com
Installing Samba
My setup required the RPi to access media from a external USB drive that is actually connected to the panda. Thus, I need the panda to share that drive in my home network. You can choose NFS instead of Samba, but I'm used to Samba and find it easy to setup, and besides, it just works, so keep it simple.
- Download and install samba
$ sudo apt-get install samba
$ sudo vi /etc/samba/smb.conf
$ [global] workgroup = [workgroup] netbios name = [name of="" server=""] server string = [title] log file = /var/log/samba/log.%m max log size = 50 map to guest = bad user socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 local master = no dns proxy = no
$ [public] path = [folder to share] public = yes only guest = yes writable = yes
Mounting external drive automatically
Previous Samba configuration requires that you have the shared folders you want to share mounted at start-up. Thus, we'll have to modify /etc/fstab file so it does this automatically each time at boot. In my case, I have a external usb drive that will be mounted on startup, where a couple of folders will be shared.
- Plug your drive and check device name. Should be on of the last entries, something like /dev/sdb1 or similar
$ sudo mount
$ sudo mkdir /media/toshiba_drive
$ sudo vi /etc/fstab
$ /dev/sdb1 /media/toshiba_drive auto auto,user,rw,exec 0 0
Reboot and check that you can access the shared drive from another computer or even better, from Xbian on the RPi.
Installing a remote desktop server
Let's face it, having to switch from one computer to another is annoying. I love the idea of controlling almost every device at home with just one computer. Hence, I recommend you to install a VNC server. There are quite a few options here, the most simple using xrdp, which does not require any configuration and works straight away. It is a shame there are no NX machine binaries for ARM Ubuntu machines, because it is by far the best Remote Desktop server-client in my opinion. Another option that I prefer is x11VNC, mostly because it uses the server X session, not creating a new one. The following instructions work for Xubuntu, but I recon they should also work for Lubuntu.
- Install x11vnc and openssh server
$ sudo apt-get install x11vnc openssh-server
$ sudo x11vnc -storepasswd [yourpass] /etc/x11vnc.pass
$ sudo vi /etc/init/x11vnc.conf
$ start on login-session-start script x11vnc -rfbauth /etc/x11vnc.pass -rfbport 5900 -display :0 -auth /var/run/lightdm/root/:0 -forever -bg -o /var/log/x11vnc.log -noxrecord -noxfixes -noxdamage -nomodtweak end script
$ sudo reboot
Now for the client part, I used the default client in many distros, Vinagre. Obviously it is up to you which one to choose. Just remember your IP:PORT and password (in case you specified one) and you should be good.
Accessing your pandaboard from the Internet
If you're willing to access your pandaboard via ssh or remote desktop from other place beside your home network, you're gonna need some service that offers a static IP you can access from a dynamic IP, the one your router has. There are many but I decided to choose No-IP. Create a free account and register your domain. Now its time to install the required client. On older Ubuntu versions this was easier since there was a package, but since Ubuntu 12.04, is a bit more tricky.
- Download and install latest no-ip client
$ cd /usr/local/src/ sudo wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz sudo tar xf noip-duc-linux.tar.gz cd noip-2.1.9-1/ sudo make install
$ sudo /usr/local/bin/noip2 -C
$ sudo /usr/local/bin/noip2
$ sudo vi /etc/rc.local
$ /usr/local/bin/noip2
$ sudo reboot
You should have an accessible pandaboard via URL similar to http://yourhostname.no-ip.org and depending on your services, you can access them via ssh, VNC, Apache, whatever you've installed. NOTE: You will also need to forward ports in your router to your panda to whatever ports you have open, otherwise you won't be able to access them. Since this is highly dependent on the router brand/model, it is useless to point instructions here, just check your router User Manual on how to port forward to the pandaboard static IP.
Final thoughts
I'm quite happy with the transition from my old NOISY Asrock ION to the combination of panda-RPi.
So long, dear friend |
Been using both for a week now and I'm not missing any previous functionality, plus having a more energy efficient solution and, above all, a SILENT one. That said, there is one final detail that was not really a complaint, but you know, I don't like having to plug/unplug my panda/RPi each time I want to completely turn them on/off.
Now for the RPi there are some solutions. One is to create a hand-made micro USB cable with a switcher or just pay for one (a lot in my opinion). For the panda, my case is not letting me access the power button, and I couldn't find any 5V power supply with on/off built-in switcher. Thus, I just came to a much more efficient and cheaper solution.
Living on the bleeding edge, yeeeha! |
There are obviously alternatives for US plugs and I'm sure there must be too for UK. Any electronics & hardware store can also have some of those.
Maybe it would have been easier to just buy a Cubox and have a single machine, but hey, then I'd miss the fun :) Hope you find this post useful if you're planning to use the pandaboard or the RPi as a feasible HTPC solution. Enjoy!
Maybe it would have been easier to just buy a Cubox and have a single machine, but hey, then I'd miss the fun :) Hope you find this post useful if you're planning to use the pandaboard or the RPi as a feasible HTPC solution. Enjoy!
I'm to configure the pandaboard as streaming server right now. But the regular pandaboard, not the ES version.
ReplyDeleteHope to find a good distro without X11 server. Just torrent, no-ip and NFS
Hey!
DeleteThere are many, armstrong or even Linaro, with comes without X11 server by default. Let me know how it goes :)
Great post. I too am finally giving up on using my Panda Es as a media center.
ReplyDeleteAnd you are right with the Pi not being good for usage as a server.
Cheers
Pranay
Yeah, a shame you need external storage for the RPi or a NAS. Still, it is an amazing little one :). Thanks for your comment!
DeleteThere is very good native Pandabord ES support from GeexBox
ReplyDeletehttp://www.geexbox.org/download/
XBMC Distro
Should add I've only tested 720p 4Mbit mkv's on it.
DeletePlays smoothly
Sounds good! I'll be testing it soon! Thanks for pointing that out!
DeleteThanks for a nice post! I was struggling with the same thing over a year ago, and in the end I got it to work. I can now play basically all 720p and 1080p videos without any glitches, and I've set up a xbmc, sickbeard and couchpotato combo for downloading. I don't remember the details, but I used one of the linaro releases and did a work around to remove the stuttering video (had to do with monitor detection I think). I can dig a bit more if someone is interested.
ReplyDeleteAlso, if you have an enormous amount of extra time, you can build your own box for the pandaboard out of wood :) (http://dontbuyjustmake.blogspot.nl/2013/07/box-for-pandaboard.html)
ReplyDeleteWow! That's some SERIOUS work, thanks for sharing Ulf! I've found something similar but much simpler, but you needed a laser cutter printer to cut the wood, something not easy to find, ans specially expensive. Thus, I ended buying the standard pandaboard box (the white one). I might give it a try, looks like a good idea :)
ReplyDeleteVery Good! This is exactly what I want to do. Do you have digital audio working on the HDMI?
ReplyDeleteWould it be possible to share the binary images? it could save many time :)
Many thanks!
Hello David,
ReplyDeleteYou mean for the panda or for the rpi?
Regards,
Alejandro
This comment has been removed by a blog administrator.
ReplyDeleteHello, Neat post. There is a problem together with your website in web explorer, could test this? IE nonetheless is the marketplace leader and a good section of other people will pass over your magnificent writing because of this problem. aol.com mail login
ReplyDeleteWhether you have to deal with termites, or you have to eradicate roaches, or any other type of small pest, you will find that doing it on your own is not effective enough. Portland Pest control
ReplyDeletewe repair and service all models of oneplus Service in Chennai, We rely on customer satisfaction. We can service all problems faced by oneplus customers in chennai.EarnHoney
ReplyDeleteI wanted to thank you for this excellent read!! I definitely loved every little bit of it. I have you bookmarked your site to check out the new stuff you post. cara nonton video bokep
ReplyDeleteMosquitoes have incredibly touchy receptors on their radio wires that can recognize follow measures of CO2. Mosquito control
ReplyDelete1st news web site this site provide a news information so more gain information. 1st news
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteWeb2.0 our link provder a web2.0 sevice so see our fiverr link and gain totely cheape rate servce. web 2.0
ReplyDeleteStickerZone is the fastest and easiest way to buy custom sticker printing. Order in 60 seconds and we’ll turn your designs and illustrations into custom stickers UK, custom labels, window, magnets, buttons and packaging in days. We offer free online proofs, free worldwide shipping and super fast turnaround. We don’t just custom stickers printing. StickerZone provide a wide variety of custom signage for all business types.
ReplyDeleteCustom Sticker Printing
Online learn Quran
ReplyDeleteI’m curious to find out what blog system you’re utilizing? I’m having some small security problems with my latest website and I’d like to find something more safe. Do you have any suggestions? And Bet Numbers
ReplyDeleteCOOL MATH GAMES UNBLOCKED RUN 2? A ONLY COMPLETE REVIEW COOL MATH GAMES UNBLOCKED RUN 2s play free online games in various math-related skills, such as logic, strategy, numbers, etc.
ReplyDeleteWow! Such an amazing and helpful post this is. I really really love it. It's so good and so awesome. I am just amazed. I hope that you continue to do your work like this in the future alsoTransparent stickers
ReplyDeleteI always appreciate quality content, Thanks to you for sharing such post.
ReplyDeleteAsk Questions Get Answers
I really thank you for the valuable info on this great subject and look forward to more great posts
ReplyDeleteCustom Boxes UK
Nowadays, teaching and learning math has been made easy by the proliferation of online tutorials and math games. cool math games run
ReplyDeleteGreat website, I really like the layout!It was definitely a lot of work.
ReplyDeletePrinted Labels
Printed Stickers UK
Get Instant Printing USA
I am impressed. I don't think I've met anyone who knows as much about this subject as you do. You are truly well informed and very intelligent. You wrote something that people could understand and made the subject intriguing for everyone. Really, great blog you have got here
ReplyDeletePop-up Display Boxes
Printed Gable Boxes
Display Boxes Wholesale
Custom Counter Display Boxes
Custom Christmas Boxes
Custom Packaging Boxes with logo
I like the valuable info you provide in your articles. I will bookmark your blog and check again here frequently. I am quite certain I will learn many new stuffs right here! Good luck for the next!
ReplyDeletefactory outlets market of clothing brands in Lahore
ReplyDeleteIreally impressed your blog. It is very beneficial for everyone. keep up the good work admin.
This is actually the kind of information I have been trying to find. Thank you for writing this information. Pillow boxes
ReplyDeleteIt must be at or under 35% of your respective pre-tax household income. canada mortgage calculator Additionally, both HSBC Advance and Premier chequing accounts have monthly fees if you do not meet the minimum qualifying balances. mortgage calculator canada
ReplyDeleteIt must be at or under 35% of your respective pre-tax household income. canada mortgage calculator Additionally, both HSBC Advance and Premier chequing accounts have monthly fees if you do not meet the minimum qualifying balances. mortgage calculator canada
ReplyDeleteCustom Packaging Boxes
very good quality custom boxes
ReplyDeletenice post, keep up with this interesting work. It really is good to know that this topic is being covered also on this web site so cheers for taking time to discuss this! Custom Boxes Usa
ReplyDeleteI appreciate your post thanks for sharing the information.
ReplyDeletekraft popcorn Boxes
best Postage Boxes
Looking great work dear, I really appreciated to you on this quality work. Nice post!! these tips may help me for future.
ReplyDeleteCustom Packaging Box Manufacturers