Mar 152014

With this interesting tool you can redirect input over the network – control other Linux boxes as if you were physically sitting in front of them and using a USB mouse and keyboard.

The project’s GitHub repository is found here:

More documentation is available on this site:

Here is an introduction how to set up keyboard and mouse forwarding via SSH to a second Linux box.


Installing uinput-mapper

as user root (sudo su):

aptitude install git-core

cd /opt

git clone

cd uinput-mapper


This will check out the tool into the /opt directory. This is not a requirement per se, you can also install it in a different directory of your liking.

make will build the file “uinputmapper/”

Use the same procedure on the server.

Connect to server

Test the connection by logging in via SSH and the appropriate key to the server (you need to set this private / public authentication up first, of course – see this article, for instance).

ssh root@

Should log you in to the remote server. Change the username, (the path to the key if needed – can be specified with the –i option), and the IP address according to your setup.

Log out again.

Have a look at the input devices on your “local” machine, from which you will be redirecting the input:

ls -alh /dev/input/*

Sometimes, keyboards will create two devices – one for the additional (multimedia?) keys.

Connect (with error / stdin logging)

./input-read -G /dev/input/event0 -G /dev/input/event1 -D | ssh root@ “/opt/uinput-mapper/input-create &>>/tmp/errorlog “

If nothing happens, have a look at /tmp/errorlog on your server:

Traceback (most recent call last):
  File “/opt/uinput-mapper/input-create”, line 73, in <module>
    fd, ev = in_f.load()

Try connecting with the compatibility option for Python < 2.7 in this case.

./input-read -C -G /dev/input/event0 -G /dev/input/event1 -D | ssh root@ “/opt/uinput-mapper/input-create -C &>>/tmp/errorlog2 “

please note, that the compatibility flag needs to be given on BOTH sides (local and remote part) of the command.

You can verify your Python version like this:

root@cloudsource2:/opt/uinput-mapper# python –version
Python 2.7.3

If everything works allright, you can leave away the last part (starting with the ampersand “& …”) which just redirects standard output and error from the server for debugging.

Jan 312014

Open source code allows your operating system and application stack to be recompiled for different systems.

Today, with many applications being migrated into the cloud, good performance per Watt of power usage is paramount in keeping power-costs down.

x86 traditionally has not been optimized for best per-Watt performance – Intel is catching up with Atom, especially with the BayTrail SoC for the mobile application area. For microservers Intel has introduced the C2000 “Avoton” Atom SoC.

Let’s look at a couple of alternatives for modern cloud computing.

The ARM architecture is quite big already in the mobile market, getting more and more into the desktop markets (take the Raspberry Pi for instance), and now it’s taking big strides towards servers.

ARM Contender #1: Calxeda

Calxeda developed one of the first (or maybe THE first) ARM-based server module solutions. Their design “EnergyCore ECX-1000” is based on 4 x ARMv7 Cortex A9 cores (32 bit), running at 1.1 – 1.4 GhZ.

Each board has one memory slot for up to 4 GB of RAM (remember, 32 bit!), and four SATA ports per socket, and five 10 GBit/s on-board LAN-ports. They were specified at 1.5 W power usage per core, and 5 W per node.

It was planned originally by Calxeda to produce a “Midway” chip, which would allow for 40 bit memory addressing. Being socket compatible with the ECX-1000’s, the chip would have allowed to address 16 GB of memory.

According to this article, Calxeda was looking to provide a 15 – 20 x price/performance advantage over “traditional” server processors. This article claims Calxeda was also looking at a 5x – 10x performance / Watt increase.

Dell has built a server based on the Calxeda board architecture and donated it to the Apache Software foundation, so they can tweak Apache, Hadoop, Cassandra, … for the architecture. In this server architecture, up to 360 ECX-1000 nodes can be put in a 4U chassis.

HP has also tested the waters with it’s experimental Redstone ARM Server, based on Calxeda technology. It allows up to 288 ECX-1000 nodes in 4U rack space.

Avantek announced machines based on the Calxeda architecture at the end of 2012, with a 3U base machine (four x ECX-1000 cards, some disk drives) weighing in at about 4000 GBP (~ about 4900 €), and a fully “loaded” machine with 48 cards, giving 192 Cores and 192 GB of memory, mix of disk and flash at about 40.000 GBP (~ about 49.000 €). Here’s Avantek’s info page, which also has a comparison to Xeon E5450 on it.

“Ten times the performance at the same power in the same space”.

Calxeda ran out of money in mid-December 2013, and it looks as though they are shutting down operations. The intellectual property may very well be bought by Dell or HP. It had roughly 125 employees by the time the news hit, and they had raised about 90 – 100 Million $ in venture funding. (Have a look at the article to see an actual Calxeda card, with the SATA ports next to each core). Calxeda was also backed by ARM Holdings Inc.



Tilera has it’s own RISC based design (non-ARM), including many cores (up to 72) in one SoC, interconnected with the “iMesh” non-blocking interconnect, with “Terabits of on-chip bandwidth”. The cores can be programmed in ANSI C/C++ or JAVA. Linux runs on the system – support for the Tilera architecture was added in October 2010, with ver. 2.6.36 of the Linux kernel. The CPU series itself was launched in October 2011.

Facebook claimed, that in their tests the Tilera architecture was about four times more power efficient than the Intel X86 architecture. They ran memcached 

Router & Wireless company MikroTik has a product called “Cloud Core Router” which is based on a 36 core Tilera CPU. To give you an idea of it’s cost: the router retails (depending on the version) for about 1000 € including VAT.

Have a look at this page to see the Cloud Core Router. Tilera has also some evaluation platforms of their own.


ARM Contender #2: Marvell ARMADA XP

This is a series of multicore processors, (quad-core ARM). The XP apparently stands for “extreme performance”.

Marvell powers Dell “Copper” ARM Server.

Chinese search giant Baidu has deployed these.


ARM Contender #3: AMD

AMD’s getting on the ARM bandwagon. I always liked that company (and despite my criticism of it these days, I also like Intel!) – they are not disappointing me!

The Opteron A1100 is based on the first true 64 bit addressing ARMv8 core, Cortex A57.

The Octo-Core version of the Opteron A1100 is claimed to be “two to four times faster” when compared with the Opteron X2150, with four x64 Jaguar cores. This is an interesting comparison, because both are targeted to be available on the Moonshot platform (see below).

The TDP of the octo-core version of A1100 is 25 W. It contains two 10 GbE ports, eight SATA 6G ports, eight PCIe-3.0 lanes.

Development platforms based on the Opteron A1100 should be available soon. On the developer board, the chip can address up to 32 x 4 GB of memory (four DIMM slots).

AMD predicts that in 2019 the ARM platform will take up about 25 % of the server market.

Read more in AMD’s press release


The Moonshot platform

HP is offering different server-modules for the ProLiant Moonshot. The Moonshot platform is intended for cloud computing centers.

Calxeda’s modules (EnergyCore, see above) were also intended to be used for this platform.

HP also uses Intel’s Atom chips for Moonshot. They plan to use Avoton for it (see below for more information about Avoton).

The first Moonshot system is Moonshot 1500 – taking up 4.3 Rack Units, with 45 ProLiant Moonshot Atom S1200, ethernet switch and some more gear, prices start at 50.605 €.

HP wants to offer KeyStone Chips from TI including many DSPs, interesting for instance for content delivery networks (transcoding), etc.


Intel: Avoton

With the BayTrail SoC being targeted at the mobile market, Intel has introduced a different SoC for microservers, which is called Avoton (Atom C2000 series being the first representatives). They also have a SoC Rangeley, which shares some of the Avoton platform and manufacturing process, but is targeted at the communications / networking market.

Avoton has eight CPU cores based on the new Silvermont microarchitecture – the first true reworking of the Atom architecture since it’s beginnings. Intel finally introduced out-of-order execution for it.

Configured with two DIMMs per channel, a single Avoton node can support up to 64 GB RAM. It supports four Gigabit Ethernet connections – but no 10 GBit connection.

They have integrated power control tightly into the chip, and have made sensible tradeoffs – for instance wake up latency has not been compromised upon to avoid dropped packets and such.

They have a choice of different products based on Avoton and Rangeley. Ranging from two cores and 6 W, clocked at 1.7 GhZ to eight cores and 20 W, clocked at 2.4 GhZ.

Figures released from Intel indicate that the Atom C2750 (2.4 GhZ, 8 Cores, 20 Watt) easily outperform Marvell’s ARMADA XP (1,33 GhZ, 4 Cores, A9) and Calxeda’s ECX-1000 (1.4 GhZ, 4 cores, A9) in memory bandwidth and General purpose computing. I agree with the article that AMD’s Cortex A57 core with true 64-bit addressing will be the real rival for Avalon, the one it should be compared against.

Intel is targetting the C2000 at “cold storage” applications. Have a look at this PDF to read more about it.

The C2750 supports Intel’s virtualization feature (VT-x), but not VT-d apparently (which is used to “pass through devices” to the virtualized system, e.g. graphics cards, …)


Have a look at these charts. They even measure against a Raspberry Pi!


The Atom C2750’s list price is 171 $.


Supermicro has a motherboard, the A1SAi-2750F, which integrates the C2750.

This board is avaliable at about 340 € including VAT in Germany. It has 4 DDR-3 SO-DIMM slots, 1 x PCIe 2.0 x 8, 1 x VGA, 2 x 2 x USB 3.0, 2 x USB 2.0, 4 x GB LAN, Also 2 x 6 GB/s SATA, and 4 x 3 GB/s SATA.

It is a Mini-ITX board.

ASRock C2750D4I

This is another option, but more expensive, and with only 2 GbE ports.


SPEC_int_rate Benchmarks

source one 

  • Opteron A1100, eight core: 80 (simulated) @ 25 W
  • Opteron X2150, four core: 28,1 @ 22 W
  • Atom C2750 (Avolon): 105 @ 28 W
  • Intel Xeon E7-8870 (2,4 GhZ), Deca Core: 1770 @ 105.63 W
Apr 112013

As we have posted earlier, we own an old CanoScan LiDE 30. We are very satisfied with this scanner – but unfortunately it does not work on newer versions of Windows (e.g. Windows 7 64 bit, Windows 8) – Canon “forgot” to release updated drivers.

Raspberry Pi networked scanner sharing

A Raspberry Pi is perfect for a small, low volume server application. Today, we have put together all the pieces necessary to use it to attach the Canon scanner to our network, and scan from Windows once again.

BTW: It looks as though the Fujitsu ScanSnap 1300i might also be supported by SANE. This is the replacement scanner for the Canon flatbed scanner we bought – but it can’t scan books, for instance.

Step by step setup guide:

This guide is written for Raspbian. We have tested it with the latest Raspbian version currently available (2013-02-09).

Get the required packages:

sudo su
aptitude update
aptitude install xinetd sane-utils

xinetd is the Internet superdaemon which will start saned, the “Scanner Easy Access Now” daemon when a network connection to it’s port is opened (saned can’t do that on it’s own).

sane-utils contains the saned. (On Archlinux the package is called simply “sane”)

Raspbian automatically sets up the group saned and the user saned for you. It also adds the user saned to the group scanner.

Configure /etc/default/saned so it will start automatically (RUN=yes):

# Defaults for the saned initscript, from sane-utils

# Set to yes to start saned

# Set to the user saned should run as

Start saned, and test whether the scanner is recognized. Ideally you should do this as user saned, to see if all access rights for saned are setup correctly. Your scanner should naturally be attached to the Raspberry Pi. If it draws its power through USB, we recommend to use a powered USB hub.

root@raspberrypi:/home/pi# /etc/init.d/saned start

root@raspberrypi:/home/pi# su -s /bin/sh - saned
No directory, logging in with HOME=/

$ lsusb
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB
Bus 001 Device 008: ID 04a9:220e Canon, Inc. CanoScan N1240U/LiDE 30
Bus 001 Device 007: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 001 Device 006: ID 046d:c31c Logitech, Inc. Keyboard K120 for Business

$ scanimage -L
device `plustek:libusb:001:008' is a Canon CanoScan N1240U/LiDE30 flatbed scanner

$ exit


I have included the # and $ prompt in this listing, so you can distinguish between commands the root user (#) issues and the saned user issues ($)

If you see your scanner here, great. If not – have a look at the documentation and further reading links we will provide at the end of this article.

The USB scanner itself is plug & play – you can attach it to the Raspberry Pi when you feel like scanning, and remove it after you have finished.

Prepare network sharing of the scanner

root@raspberrypi:/etc/xinetd.d# cat /etc/services | grep sane
sane-port       6566/tcp        sane saned      # SANE network scanner daemon

You should see the sane-port line as in the listing. If it is not in there, add it.

root@raspberrypi:/# cd /etc/xinetd.d

root@raspberrypi:/etc/xinetd.d# touch sane-daemon

root@raspberrypi:/etc/xinetd.d# which saned

root@raspberrypi:/etc/xinetd.d# nano sane-daemon

This will set up the XInet configuration. Please use the following configuration for the /etc/xinetd.d/sane-daemon file:

service sane-port
              socket_type = stream
              server = /usr/sbin/saned
              protocol = tcp
              user = saned
              group = saned
              wait = no
              disable = no

Note that we used the output from “which saned” in the configuration above. If it is different for you – e.g. on Archlinux – adjust accordingly.

Set up saned to accept connections from your network by editing /etc/sane.d/saned.conf:

# saned.conf
# Configuration for the saned daemon

## Daemon options
# [...]
# data_portrange = 10000 - 10100

## Access list
# [...]
# The hostname matching is not case-sensitive.



# [...]

Please adjust the subnet specification to your network architecture. You can also explicitly specify single IPs. If you do not edit this file, SaneTwain will hang when contacting your Raspberry Pi scanner server.

Now you can reboot the Raspberry Pi (sudo reboot), and continue to the set up on the Windows side.

Setting up Windows to access the SANE network scanner

We have tested with Windows 7 64 bit & Windows 8 64 bit.

Windows users use “TWAIN” drivers. Luckily, there is an application, which will create a bridge between TWAIN and SANE on the network. The author claims it does not work for 64 bit Windows, but it did work for us. Please report back in the comments about your success / failure stories on different Windows versions.

Download SaneTwain here.

SaneTwain Setup


Just enter your Raspberry Pi IP (if you do not know it, “ip addr show” will show you it’s network setup) as the hostname. Port and Username can stay the way they are. Look through the other settings, if you want to. The Mail tab, for instance, offers the possibility to set up an Evernote account you want to scan to.

Before you try to use the TWAIN driver SaneTwain offers, you should set up the hostname using the way we just described (by starting ScanImage.exe).


Now you’re set up for scanning. Use the “preview” button to acquire a preview, and the “scan” button to save the selected area to a PNG (it will be scanned with better quality, of course). The resolution can be set, also other options.

Wait until the scanner is finished with the preview and has repositioned itself, before you hit the “scan” button.


The TWAIN driver works for us, too. (Tested with IrfanView) – this is Windows 8 64 bit. No special tweaks were applied.

Setting up Linux to scan from the network scanner

If you have a Linux box, you can use basically any SANE Frontend to scan using the network.

You need to add the network scanner to a local SANE installation.

Edit /etc/sane.d/net.conf and add the IP of your server. You can specify multiple servers.


Test with scanimage –L once again, and after a while you will see your network scanner showing up.


Try XSane. Noteworthy is also gscan2pdf which will convert scanned pages to multipage PDFs, and even OCR them for you!

Of course you should be able to scan from another Raspberry Pi on your network, or even the Internet.

simple-scan is a frontend for SANE.

Further Reading & Links




We used the following how-tos in building this tutorial. Thanks, guys!

Optimization WordPress Plugins & Solutions by W3 EDGE