Plex on Radxa Rock

Plex is a great home media server with clients for iOS, OS X, Windows, web and even some TV sets. For my Radxa Rock home server, an ARM V7 build of Plex server is needed. Fortunately Plex has recently started to offer an ARM V7 build for some Synology NAS devices, which can be repackaged to work on other ARM V7 devices such as the Radxa Rock and the Raspberry Pi 2. I won’t go more into detail here as an excellent guide for installing Plex Home Server on Debian Jessie based distros can be found at htpcguide.

To make your Plex server available on the go, you can either use UPNP to let it configure itself or forward some ports manually. I prefer the latter option, as I don’t like the idea of basically anything being able to expose hosts on my networks. Here are some hints for a FritzBox:

portfreigabeFritzbox
configurationPlexMediaServer

Single Board Computer Benchmarks

Over the last few years, I have evaluated many single board ARM computers for mobile robotics and home automation applications. Here are some rough benchmark results comparing across different SBC generations that may help avoid some bad buys:

Raspberry Pi

CPU : ARMv6-compatible processor rev 7 (v6l)
L2 Cache :
OS : Linux 4.0.9+
C compiler : gcc version 4.6.3 (Debian 4.6.3-14+rpi1)
libc : libc-2.13.so
MEMORY INDEX : 2.528
INTEGER INDEX : 3.150
FLOATING-POINT INDEX: 2.073

Banana Pi


CPU : Dual
L2 Cache :
OS : Linux 3.4.90
C compiler : gcc version 4.6.3 (Debian 4.6.3-14+rpi1)
libc : libc-2.13.so
MEMORY INDEX : 3.448
INTEGER INDEX : 4.516
FLOATING-POINT INDEX: 3.794

Raspberry Pi 2


CPU : 4 CPU ARMv7 Processor rev 5 (v7l)
L2 Cache :
OS : Linux 3.18.5-v7+
C compiler : gcc version 4.6.3 (Debian 4.6.3-14+rpi1)
libc : libc-2.13.so
MEMORY INDEX : 4.256
INTEGER INDEX : 5.640
FLOATING-POINT INDEX: 4.786

Raspberry Pi 3


MEMORY INDEX : 7.105
INTEGER INDEX : 8.976
FLOATING-POINT INDEX: 7.601

Radxa Rock with antiquated kernel on NAND:


CPU : 4 CPU
L2 Cache :
OS : Linux 3.0.36+
C compiler : gcc version 4.8.2 (Ubuntu/Linaro 4.8.2-19ubuntu1)
libc : libc-2.19.so
MEMORY INDEX : 9.142
INTEGER INDEX : 9.994
FLOATING-POINT INDEX: 9.965

Radxa Rock Pro with experimental 3.18 kernel on SD card:


CPU : 4 CPU ARMv7 Processor rev 0 (v7l)
L2 Cache :
OS : Linux 3.18.0-rc5+
C compiler : gcc version 4.8.2 (Ubuntu/Linaro 4.8.2-19ubuntu1)
libc : libc-2.19.so
MEMORY INDEX : 3.463
INTEGER INDEX : 3.741
FLOATING-POINT INDEX: 3.665

Hardkernel Odroid XU4 on SD card


CPU : 8 CPU ARMv7 Processor rev 3 (v7l)
L2 Cache :
OS : Linux 3.10.82
C compiler : gcc version 4.8.4 (Ubuntu/Linaro 4.8.4-2ubuntu1~14.04)
libc : libc-2.19.so
MEMORY INDEX : 15.504
INTEGER INDEX : 15.309
FLOATING-POINT INDEX: 14.164

And my current 13″ MacBookPro 🙂


CPU : 2,8 GHz Intel Core i7
L2 Cache :
OS : Darwin 14.5.0
C compiler : Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
libc :
MEMORY INDEX : 47.880
INTEGER INDEX : 40.440
FLOATING-POINT INDEX: 83.190

You can benchmark your own SBCs with nbench by:

If you have some interesting results of your own, please don’t forget to drop a comment.

Deactivate the LEDs of your Radxa Rock

The Rock’s frequently blinking lights can be an annoying source of light pollution. Here is how to turn most of them off. However, the ethernet and wifi leds can only be soldered them out.

On the newer images, the 3 Rock’s LEDs are configured as LED class devices, so edit rc.local

and set them to none using this snippet:

For the older images, the LEDs have to be set via the GPIOs:

make sure that you add those lines before the exit 0 statement in rc.local.

Bluetooth on Radxa Rock

Because of some kernel memory allocations not aligned to 4 bytes, bluetooth until now did not work on radxa. Fortunately rapidkaju has found a fix:

Now you should be able bring up your bluetooth device:

see its detailed status:

to make the rock discoverable:

to scan the environment for discoverable devices:

Once you found something you like to connect to:

and have a look at the connections:

Then you can pair with:

Linaro 14.04 on Radxa Rock

If linaro 13.09 from the Radxa Rock Image doesn’t get new security updates anymore, it is time to move on to 14.04 Trusty Tahr a long term support version.

and replace the content with:

deb http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ports.ubuntu.com/ubuntu-ports/ trusty universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty universe
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-updates universe
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://ports.ubuntu.com/ubuntu-ports/ trusty multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty multiverse
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-updates multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://ports.ubuntu.com/ubuntu-ports/ trusty-backports main restricted universe multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty-backports main restricted universe multiverse

deb http://ports.ubuntu.com/ubuntu-ports trusty-security main restricted
deb-src http://ports.ubuntu.com/ubuntu-ports trusty-security main restricted
deb http://ports.ubuntu.com/ubuntu-ports trusty-security universe
deb-src http://ports.ubuntu.com/ubuntu-ports trusty-security universe
deb http://ports.ubuntu.com/ubuntu-ports trusty-security multiverse
deb-src http://ports.ubuntu.com/ubuntu-ports trusty-security multiverse

then:

and when done:

CUL auf Radxa Rock

Zuerst das passende cdc-acm kernel modul herunterladen z.B. hier für Kernel 3.0.36. Oder selber kompilieren.

Wenn es funktioniert kann man das Modul dauerhaft installieren:

und cdc-acm eintragen

nach einem Neustart sollte:

auftauchen
/dev/ttyACM0

Den entsprechenden Nutzern sollten Zugriffsrechte eingeräumt werden:

Danach können Sie den CUL z.B. in Fhem verwenden:
define CUL_0 CUL /dev/ttyACM0@38400 9999
attr CUL_0 group System
attr CUL_0 rfmode HomeMatic
attr CUL_0 room hidden

in den Pairing Modus versetzen:
set CUL_0 hmPairForSec 600

Falls autocreate aktiv ist können die anderen Homematic Geräte nun ebenfalls in den Pairing Modus versetzt werden und sollten dann automatisch von fhem angelegt werden.

i2c on Radxa Rock

Download and flash this image, it has i2c support already baked in.
Otherwise compile your own kernel with i2c support.

Install i2c tools and add you user to the i2c group:

Connect according to the schematics:

radxa i2c

Then you are good to go:

Fhem auf Radxa Rock installieren

Der Fhem Server ist nun zum Beispiel erreichbar unter:
http://radxa:8083/fhem

Gleich mal ein:

und schon ist man auf dem neuesten Stand und kann die Geschwindigkeit des Rock voll auskosten.

Jetzt noch ein altes Backup importieren:

Install ROS Indigo Igloo on Radxa Rock

Assuming you followed my tutorial for configuring your Radxa Rock, you can easily install ROS Indigo on it by:

Setup your environment:

As ROS does not recognize Linaro as an OS:

and replace „Linaro“ with „Ubuntu“

Init a catkin workspace:

and test it:

Configure Radxa Rock

The Radxa Rock is a cheap and powerful quadcore ARM9 board, which is perfect for home servers or mobile robotic applications.

Here are some tipps how to set up the Radxa Rock:

By default, the Radxa Rock boots into Android. In the application folder you can find an app for booting into Ubuntu.

First configure your keyboard layout if needed:

And get wireless network access:

The content should look like:

Now you can manage several WPA keys in the wpa_supplicant.conf:

For each network add a definition like:

If you have several Radxa Rocks, you should change their mac addresses by modifying the parameter file and flashing it in loader mode:

And replace de:ad:de:ad:be:ef with a valid MAC address of your choice e.g. from this MAC generator:

you may also want to change their hostnames:

Now restart the networking:

Now that your Radxa Rock should be successfully connected to your wireless network, you can login via ssh by:

and the default root password „root“

You should directly change that password to something less easy to guess with:

remove the user rock:

and add an ordinary user:

and add him to the sudoers:

and then upgrade your Ubuntu installation:

Install zsh and some other useful tools:

Pick an agreeable theme (optional):

and set ZSH_THEME=“af-magic“

then source the changes:

Allow SSH authentication with certificate:
On the rock:

And copy the public key from your computer into the list of authorized keys on the rock

If you can now connect via ssh without being asked for a password you can force ssh to only accept authentication with certificate:

and make sure the following values are set:
PasswordAuthentication no
RSAAuthentication yes
PubkeyAuthentication yes

If you are using Macs, you might want to install netatalk to simplify file sharing:

Additional folders can be shared by editing AppleVolumes.default:

and adding a line like

/media/microsd/media „Media“

and restarting the netatalk service with:

You can also access the board via its UART Interface, connect the cables as follows:
RX -> Green
TX -> White
GND -> Black

For more see my post about OSX and USB to TTL

Flashing new Images:
First install rkflashtool:

Get into recovery mode:

When the board is connected with the USB OTG cable, press and hold the left recovery key and press and let got the right reset key. The board will reboot and stay on recovery mode waiting for commands.

TODO
For now use RK_BatchTool under Windows…