Apr 162014

This is a list of USB power supplies / charging devices that I own. I measured how they tell connected devices that they are for power supply only. This is done with the data lines (D+: green, D-: white).

Nominal Specifications:

Supply for Voltage Current Imprint
Google Nexus 4 5.0 V 1.2 A
Apple iPad 4 5.2 V 2.4 A Model A1401 Flextronics LPS 0012ADU00
TP-Link TL-MR3020 5.0 V 1.0 A HuntKey Model HKA00605010-3B
EasyAcc Wall Charger 5.0 V 5.0 A


Supply for Setup
Apr 162014

Let’s start by checking the current status of the RAID system:

[philipp@lion ~]$ cat /proc/mdstat 
Personalities : [raid1] 
md1 : active raid1 sdc3[0] sda3[1]
      482213888 blocks super 1.2 [2/2] [UU]
      bitmap: 0/4 pages [0KB], 65536KB chunk

md0 : active raid1 sdc2[0] sda2[1]
      115175424 blocks super 1.2 [2/2] [UU]
      bitmap: 1/1 pages [4KB], 65536KB chunk

unused devices: <none>

From the information above we see that the two drives /dev/sda and /dev/sdc are used for the raid volumes /dev/md0 and /dev/md1 set up on different partitions of the hard disks. Let’s check how they are partitioned:

Mar 292014

The Raspberry Pi colocation costs 36 EUR incl. VAT per year, see here. If you spend this amount of money for energy only, it’s:

Yearly Energy = 36 EUR/year / 0.27 kWh/EUR * 1000 Wh/kWh = 133 333 Wh / year
# to enter it more quickly in your calculator:
36  / 0.27 * 1000

If you consume these 133 333 Wh per year as smoothly and continuously as possible:

Electrical Power = (133333 Wh/year) / (365 days/year) / (24 hours/day) = 15.22 W
# to enter it more quickly in your calculator:
133333 / 365 / 24

So you could use continuously 15.22 W to spend the same amount of money.

Mar 282014


ip addr
ethtool enp1s0f0
ethtool enp1s0f1
ethtool -s enp1s0f0 wol g
ethtool enp1s0f0

What the g or the other options mean is stated here (source):

p Wake on phy activity u Wake on unicast messages m Wake on multicast messages b Wake on broadcast messages a Wake on ARP g Wake on MagicPacket(tm) s Enable SecureOn(tm) password for MagicPacket(tm) d Disable (wake on nothing). This option clears all previous options.

Permanently enable WOL by creating the file /etc/systemd/system/wol@.service as root with the following content:

Mar 202014

If you encounter problems like these:

dhcpcd[13577]: eth0: broadcasting for a lease
dhcpcd[13577]: eth0: offered from
dhcpcd[13577]: eth0: reject NAK via

Online you will find a lot of old threads suggesting things like commenting out the line require dhcp_server_identifier in the file dhcpcd.conf. Didn’t help in my case.

I was doing this on a udoo micro computer and I previously used a different operating system with it (Debian vs. Arch). By changing the micro-SD card the hostname changed as well. My FritzBox didn’t like this however. So I removed the hostname/IP entry on the router (“Fritz!Box 7490″) website. Now everything was back to normal.

Mar 192014

Horizontal Dimensions

The width of 19″ equipment is obviously 19 inches = 482.6 mm. However, the question is: what distance is that? Wikipedia helps us: The 19 inch are “including edges or ears that protrude on each side which allow the module to be fastened to the rack frame”. So for most devices, it is the width of their front panel.

The distance between the screws is defined to be: 18 5/16 in = 465.14 mm.

The clearance is 71/4 in = 450.85 mm.

Vertical Dimensions

1 height unit is: 1.75 inches (44.45 cm).
Front panels are usually about 1/32 inch (0.787 mm) smaller than that.

Mar 052014

This blog post describes my project to control a cheap wireless power switch from the German electronics distributor Pollin (Funksteckdosen-Set mit 3 Steckdosen, order no. 550666, 9,95 €) via the Arduino / the RPi.

How The System Works

It uses the common chip HX2262. The RF module sends on 433.92 MHz.

The encoder chip is quite similar to the LP801B, HX2262, PT2262 and M3E. The datasheet of the PT2262 explains the wireless protocol.

How to use it with the Arduino

Get the library rc-switch, install it and use it like this:

Pollin Wireless Power Sockets with the Arduino
Feb 282014

Product Information

The Agilent U1273A is a handheld digital multimeter (DMM) with OLED Display. It has the following capabilities and specifications:

  • Voltage Measuring Range DC: 30mV to 1kV
  • Voltage Measuring Range AC: 30mV to 1kV
  • Current Measuring Range DC: 300µA to 10A
  • Current Measuring Range AC: 300µA to 10A
  • Resistance Measuring Range: 30ohm to 300Mohm
  • Frequency Measuring Range: 99.999Hz to 999.99kHz
  • Capacitance Measuring Range: 10nF to 10mF
  • Temperature Measuring Range: -200°C to +1372°C
  • No. of Digits: 4-1/2
  • DMM Response Type: True RMS
  • DMM Functions: AC/DC Current, AC/DC Voltage, Capacitance, Continuity, Diode, Frequency, Resistance, Temperature
Jan 302014

Geizhals.at/de | vendor product site chipset: Intel 82571GB (supported by e1000e driver)

Instead of this one I would buy an Intel ET Server, 2x 1000Base-T, PCIe x4 for 130 EUR inlcuding SR-IOV support this time. (Also see 1, 2 and 3)


Intel PRO/1000 PT Dual-Port-Server-Adapter (PCIe x4)
Aug 032013

To deploy a web app on Arch Linux, I do the following (the virtualenvwrapper stuff is optional but it’s best practice):

# Update the system
pacman -Syyu

# Install git
pacman -S git

# Set up virtualenvwrapper
pacman -S python-virtualenvwrapper
# see Arch Wiki on Virtualenvwrapper
# https://wiki.archlinux.org/index.php/Python_VirtualEnv#Virtualenvwrapper

# Create a new group (if it doesn't exist) and a user account
groupadd webapp
useradd -m -g webapp -s /bin/bash whatsmyip

su whatsmyip
cd ~/
git clone git://github.com/pklaus/WhatsMyIP.git
mv WhatsMyIP app

# Prepare virtualenvwrapper
cat << EOF >> ~/.bashrc
export WORKON_HOME=~/.virtualenvs
source /usr/bin/virtualenvwrapper.sh
# Activate new .bashrc :
source ~/.bashrc
# Create the virtual environment "whatsmyip-3.3"
mkvirtualenv -p $(which python3.3) whatsmyip-3.3

# Then create a systemd startup script to run your web server:
# http://goo.gl/jj3zN

If you need the script to run on a port like 80, create the file ~whatsmyip/app/run.py like this one: start-and-drop-privs.py. and start it as root: