raspberry pi – Vincenzo's hacks http://vincenzo-ampolo.net hacks, researches, thoughts Thu, 12 Mar 2015 07:52:30 +0000 en-US hourly 1 https://wordpress.org/?v=4.5.3 XBian 1.0 beta 1.1 released, let’s give it a try http://vincenzo-ampolo.net/2013/08/04/xbian-1-0-beta-1-1-released-lets-give-it-a-try/ http://vincenzo-ampolo.net/2013/08/04/xbian-1-0-beta-1-1-released-lets-give-it-a-try/#respond Mon, 05 Aug 2013 02:38:38 +0000 http://vincenzo-ampolo.net/?p=369
XBian logo
New XBian Logo

About ten days ago XBian 1.0 beta 1.1 has been released. It included a significant update i was looking for, the SuperRepo integration. Just if you don’t know, SuperRepo is a community maintained repository of more 1300 add-ons for your XBian mediacenter. Why do you need it? Because the default repository that comes with xbmc follows xbmc updates and thus some add-ons take a really long time to be updated if they get broken.

This was true few months ago for the youtube add-on that makes you able to play youtube video in your tv. The add-on was broken and you had to install SuperRepo in order to get the updated version that fixed the issue.

With XBian 1.0 beta 1.1 you no longer need to install SuperRepo and your are sure that your packages are up to date with the largest repo for xbmc mediacenters. This means that if an add-on is broken as soon as it is fixed and uploaded to SuperRepo you can easily update to the new version of the add-on.

The other thing I liked the most was the auto-overclocking of the raspberry pi that boosted from 700Mhz to 800Mhz without any issue and made me play 1080p video without a breeze.

overclokcing
XBian overclocking settings

The new logo is well designed and slick, much better than the previous one. The system is, like before, a full debian with mediacenter capabilities, which is exactly what a geek wants: a fast, low cost, raspberry pi based mediacenter which does let you extend and personalize with programs that do not break the overall system.

Up and running the system consumes 11% of ram (was 17% in Xbian 1.0 alpha 5) leaving a lot of resources for the decoding of complex 1080p videos. fps jumped to an average of 46fps on 1920×1080@60Hz (were 39fps on Xbian 1.0 alpha 5). Boot time also has been shortened by 6 seconds from 56 to 50 secs.

Given the very good performances I then decided to update my production mediacenter (the one I share with all my flatmates) to the new version. Unfortunately xbian-config under the Updates submenu tells me that my system is up to date. After a little bit of googlin I’ve found the XBian forum post that describes the update procedure.

If you were looking for one of the best mediacenter distribution for your raspberry pi, you can stop looking for one since you just found it…

]]>
http://vincenzo-ampolo.net/2013/08/04/xbian-1-0-beta-1-1-released-lets-give-it-a-try/feed/ 0
How to make usb disks readable by all users on Raspbmc http://vincenzo-ampolo.net/2013/02/21/how-to-make-usb-disks-readable-by-all-users-on-raspbmc/ http://vincenzo-ampolo.net/2013/02/21/how-to-make-usb-disks-readable-by-all-users-on-raspbmc/#comments Fri, 22 Feb 2013 05:28:44 +0000 http://goshawknest.wordpress.com/?p=360 In a past article I wrote about a comparison of Openelec, Raspbmc and Xbian. That article hit a record in terms of number of readings and comments on this blog. I spoke about some modification I had to do to Raspbmc to make it usable for my needs but I din’t show them. In this article I’m going to fill this gap.

In order to make the usb drives be mounted with writing permissions to all the user of the system I’ve modified the /etc/udisk-glue.conf as following (in bold are the part that I’ve added:

filter disks {
 optical = false
 partition_table = false
 usage = filesystem
}

match disks {
 automount = true
 automount_options = { sync, noatime, <strong>"dmask=0", "fmask=0"</strong>}
 post_insertion_command = "udisks --set-spindown %device_file --spindown-timeout 1800 --mount %device_file --mount-options sync,noatime,<strong>dmask=0,fmask=0</strong>"
}

And I had to let udisk-glue run as root as following:


# udisks-glue
#

description "udisks-glue for udisks"

start on started dbus
stop on (runlevel [06] or stopped dbus)

expect fork
respawn

#exec su - pi -c "udisks-glue"
exec udisks-glue

(I’ve changed udisk-glue such that It’s run by root)

Since there are a lot of folks out there that are using this distro I think it’s is worth sharing this knowledge. If some dev is reading this, please consider to propagate this changes (or do equivalent ones) to the distro in order to increase flexibility.

]]>
http://vincenzo-ampolo.net/2013/02/21/how-to-make-usb-disks-readable-by-all-users-on-raspbmc/feed/ 9
Openelec vs Raspbmc vs Xbian http://vincenzo-ampolo.net/2013/02/19/openelec-vs-raspbmc-vs-xbian/ http://vincenzo-ampolo.net/2013/02/19/openelec-vs-raspbmc-vs-xbian/#comments Tue, 19 Feb 2013 08:00:00 +0000 http://goshawknest.wordpress.com/?p=328

Update

In less than 12 hours after being public this article hit 1500 unique visitors. I received a lot of comments and thus an update is needed. You will find original part that has been corrected under stricke through text.

It’s now been a month that I’m playing with a borrowed (thanks to my flatmate Spencer Matteson) Raspberry Pi. Didn’t have time at the begininnig but as soon as I started connecting to a tv and sharing with all my flatmates it was fun from the first second.

I’ve been reached a stable configuration after X ( read as x big) number of researchs, hacks and tries. In this blog post I want to share my impressions and my researches about Raspberry Pi as a mediacenter with anyone that reads this blog post.

Raspberry Pi

It’s a cool toy, nothing to say about that. Even if people on the internet says that it lags in playing 1080p video in all my tests I didn’t find any lag. They pop up as soon as you start playing a 1080p video and doing netwoking intense operation like starting a rsync with a remote server or downloading 4/5 torrents.

If you have 25$ buy it. It’s worth the time and money you will spent on it. Due to the fact that it gets powered by a micro-usb connector (we are talking about 1A at 5V) don’t expect to connect a portable usb disk without power supply to the Raspberry. It will simply not going to work well and keeps rebooting just because power is too low to keep on the hard drive.

In my configuration I just connected to the Raspberry pi a ethernet cable, a HDMI cable and a usb hard drive with its own case and power supply.

Distro challenge

Openelec

Version tested: 3.0 RC2

Openelec was the first distribution I’ve tried. It’s easy, smooth to install and to use. It just works (TM). It has only one goal: be the best mediacenter distribution. And It just does it very good. With openelec you don’t have to worry about updates but as a con, you miss a package manager and everything of a linux distribution actually. It’s very stable and if you just need a mediacenter I will use this.

There is openssh installed but you will barely need it, I just used for a couple of reboots. The XBMC repository is already set and you can install any kind of software that is available directly from the UI. The problem is that you will not find anything advanced like a webserver or any other package you will find in other distributions. The farest I went while using it was to install transmission bittorrent client directly from XBMC repositories from the UI. It went well and worked pretty smooth. But transmission just uses http and does not support https so exposing it outside your personal network is not wise. And since you don’t have a webserver you can’t actually put an apache configured as https trasparent proxy in front of transmission.

Also I was really disappointed when I figured out that It doesn’t support changing ssh root password as its FAQ states. Since I soon wanted to do more with Raspberry pi that a simple mediacenter this was clearly an issue. I than tried Raspbmc.

Raspbmc

Version tested: 1.0 final installed on 3th of Feb 2013

Seriously. Don’t do that. Don’t spend your time in trying to figure out to make this distro work. It’s bloated. As soon as I installed I liked the really nice self installer and the cool splash screen while the system is loading. But apart from that, underneath you have a broken apt and package repository.

I tried to install the *byobu* package. When it was installing it’s dependence, *screen* there was a detected /deadlock in the init system/ so it refuses to install it. What?! (as a comment demonstrated this issue seems to have been fixed after this post. I’ll try myself as soon as I’m nearby my Raspberry). After that I installed apache2 and transmission and linked the two together making apache2 being a transparent ssl proxy. It didn’t work. It appears that Raspbmc mounts the drives as the pi user which is the one that runs the xbmc application using writing permission only for the pi user. The problem is that transmission runs as debian-transmission user. So it is unable to write on my external usb disk! After tweaking with /etc/udisk-glue.conf configuration I managed to mount the devices as root and assigning a write permission to all the users.

(The best part was when I tried to install some software from XBMC repository. I couldn’t because the repo was empty. Bart Otten, webmaster of Xbian.org and Superrepo.org contacted me privately saying that this issue is related to the XBMC repo. It can happen in any distribution that has XBMC. So if you don’t find software in your XBMC addon catalogue, just wait until the repository is up again.)

It may be the fact that Raspbmc is a one person project but the fact is that I found it really unstable and not flexible. If I were Sam Narzako (the man behind Raspbmc) I would open the project to more people or, better, contribute to the Xbian project.

Sam Nazarko politely commented that Raspbmc is not a one man project. I apologize for the misunderstanding but I got this information from the raspbmc.com about page that states that “Raspbmc is created and maintained by Sam Nazarko, a 19 years old student from London”.

Xbian

Version tested: 1.0 Alpha 4

Xbian was really easy to install. After downloading its image and put in a sd card as its website states first time that it loaded on the Raspberry pi to stretch the partition in order to use all the space in the sd card. The system was ready in less than five minutes and I was able to install byobu, apache2 and transmission without problems. Also the usb hard drive is automounted allowing anyone to create or read any file (chmod 777).

I then installed the XBMC watchdog plugin in order to keep the library up to date with new additions. The system resulted to be really stable.

I found Xbian to be the most mature mediacenter distribution for Raspberry pi. It is easy to install and maintain but it preserve the flexibility of a debian based distribution. The only annoying thing is a menu that appears to the user anytime he/she logs in with ssh. I don’t think that this behaviour is wanted by an user that is connected through ssh because it tries to simply management. But who connects through ssh is not a newbie and thus does not need any simplification. Instead this menu alter the expected behaviour that the user imagine about connecting through ssh.

Configuring apache2 as transparent proxy for transmission

In order to simplify configuration, the configuration for apache2 as transparent proxy for transmission is the following:

<VirtualHost *:443>
 <proxy>
    Order deny,allow
    Allow from all
  </proxy>

  SSLEngine On
  SSLCertificateFile    /etc/ssl/certs/ssl-cert-snakeoil.pem
  SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key

  ProxyPass        /  http://127.0.0.1:9091
  ProxyPassReverse /  http://127.0.0.1:9091

</VirtualHost>

I’ve my new shiny mediacenter, how do I control it from my sofa?

You can have a Raspberry pi with all the software you want, but you will never have a mediacenter until you can control laying on your sofa. For xbmc, which is the base software in all the distribution I just spoke about, the remote control software is Yatse or Xbmc remote.

I tried both and I prefer Yatse. It’s much more complete and the UI is much more effective than the one in Xbmc remote. Also for functionality yatse seems much more powerful even if I didn’t analyze each specific functionality between the two remotes. You can install Yatse directly from goole play as like Xbmc remote.

They both work accessing your Raspberry pi via the network. All of the distribution I’ve shown have remote control enabled by default although both Openelec and Raspbmc use port 80 while Xbian uses port 8080.

I highly suggest to make Xbmc scan through your media files in order to populate your library. In fact library is easy accessible, sortable and playable from yatse and It will save a loot of file in finding the right file expecially when it’s in a directory polluted by other media files.

Alex, from a comment, says that XBMC Remote for iOS works very well, I didn’t test it personally. YYou can find it on the app store.

]]>
http://vincenzo-ampolo.net/2013/02/19/openelec-vs-raspbmc-vs-xbian/feed/ 70