Category Archives: Raspberry

Blogppost related to the Raspberry Pi

Download your AirPi SD Card image here

*** update – the files have been updated and fit on a 2GB SD cards now ***

The new files can be found in my public Dropbox in the \Images\Airpi directory.

I’ve just published a second image for the AirPi. Last month I published an image to get your AirPi working on your Raspberry Pi with a Logilink UA0053 USB soundcard. Now I’ve added on request an image that works with the onboard 3,5mm. For everyone that wants to save the time, you can download the image for a 4GB SD card directly from my public dropbox.Both images are based on Rasbian Wheezy and configured with:
– SSH enabled
– User = pi
– Password = raspberry
– locale = en_US.UTF8
– timezone = Europe.BerlinIt has auto login for user pi enabled
It’s broadcast name is AirPi
Pick the image of your choice. The 2013-03-19-wheezy-airpi image uses the onboard audio jack. The 2013-02-19-wheezy-airpi-UA0053 image is configured to use the USB audio Logilink UA0053 soundcard
Write the image to an 4GB SD card with Win32DiskImager.Plug it into the raspberry and hook the raspberry up to your network (and Logilink UA0053 soundcard) and soundsystem. It’ll work like a charm on iOS 6.Enjoy!The files can be found in my public Dropbox.

The broadcast name of the Raspberry AirPi can easily by changed, at the command prompt type:nano /etc/init.d/shairportlook for the following lineDAEMON_ARGS=”-w $PIDFILE -a AirPi”and change AirPi in what ever you like.

ctrl-x and Y to save changes

sudo reboot


How to change the WLAN settings
WLAN configuration can be set using the following command:
sudo nano /etc/network/interfaces
look for the lines with
wpa-ssid “YOUR SSID”
and replace YOUR SSID with the SSID of your network and replace YOUR PASSWORD with the password of your network.
ctrl-x and Y to save changes
sudo reboot
If there is no WLAN connection the Raspberry Pi will use the LAN connection if available.

Turning your Raspberry Pi into an AirPi with iOS6 support

There are several posts on the internet describing how to turn your Raspberry Pi into an Airpi. The install assumes working from a clean Raspbian Wheezy setup as decribed here.

This is how I did it:


Become root

sudo su


Update & upgrade Raspbian Wheezy

aptitude update

aptitude upgrade


Divert sound from HDMI to 3,5mm onboard sound jack

amixer cset numid=3 1


Get required libraries
aptitude install git libao-dev libssl-dev libcrypt-openssl-rsa-perl libio-socket-inet6-perl libwww-perl avahi-utils


Install Perl
aptitude install libmodule-build-perl
git clone perl-net-sdp
cd perl-net-sdp
perl Build.PL
./Build test
./Build install


Install Shairport iOS6 version
git clone shairport
cd shairport


Load shairport automatically at boot

make install

cp shairport.init.sample /etc/init.d/shairport

cd /etc/init.d

chmod a+x shairport

update-rc.d shairport defaults


Set the name of AirPi :

nano shairport


look for the DAEMON_ARGS line and amend accordingly:



ctrl-x and Y to save and close

To start the AirPi immediately 
./shairport start



You can also add Wlan support and USB Sound support.

How to create your Raspberry Raspbian “Wheezy” SD card

When you want to operate your Raspberry Pi, you need an SD card with an “OS”. I like using Raspbian Wheezy, a Linux Debian distro tailored for the Raspberry Pi.

What do you need:

1) atleast a 2GB SD card (I prefer using class 10 SD Card with 4GB or more)

2) an SD Card reader

3) The Raspian Wheezy OS

4) Win32DiskImager

Download & unpack the Raspbian Wheezy OS.

Pu the SD card in the card reader and connect it to your PC.

Card Reader

Download & install Win32DiskImager (you only have to create a directory which includes all the files from Win32DiskImager)

Run win32diskimager.exe

Select the previously download Image File

Select the Card Reader with the SD Card as Device

Hit the Write button, wait for the write process to finish.


PS: In case you want to make a back-up of your SD-Card you can create an Image File, select the Device (Card Reader) and press Read. This will create an image file of the SD card in the card reader.

PS2: in case you want to format your SD Card the HPUSDDisk.exe tool might come in handy, as it formats the SD Card regardless of size, OS and / or file system.



Connect to the Raspberry Pi via SSH / Putty

I find that I prefer working on my Raspberry Pi via SSH. This is how it is done.

1) Make sure that SSH is enabled on your Raspberry Pi

2) Find out the IP address of your Raspberry. I usually scan my network with Fing to find the Raspberry. In case you have access to the console you can also type the following command:

sudo ifconfig

it will show the network adapters and the assigned ip-address.


3) Download & Install Putty. It is not really an Install as you can run the putty.exe directly.

4) The Putty window opens


Enter the Raspberry Pi IP address, select SSH as connection type and under the menu item “Window” –> “Translation” select UTF-8


Click “Open” and you’re ready to log on.

Standard user = pi

Standard password = raspberry

First time configuration of my Raspberry Pi

The first time you startup your Raspberry Pi with the Wheezy image on the SD-Card you are automatically guided to the Raspberry Setup menu.

In case you want to return to the menu at a later stage you can access the menu do the following.

boot up your Raspberry Pi

Logon with user: pi (standard)

Password: raspberry (standard)

enter the following commands on the commandline:

sudo su


Logon on and Rasp config


then you arrive in the menu below

Raspi Config

I take the following steps:

  1. update
  2. expand_rootfs
  3. ssh [enable]
  4. change_locale [us-UTF8]
  5. change_time-zone [GMT+1]

When you’re done select finish


How to enable USB Sound on a Raspberry Pi

When I converted my Raspberry Pi into an AirPi the sound from the 3,5mm onboard sound jack wasn’t great. So I decided to add a USB soundcard to my Raspberry Pi. This post describes what I did to get it to work.

I bought a cheap USB Sound Card from Ebay, the Logilink UA0053.

First you have to redirect the sound from the HDMI to the 3,5mm onboard sound jack with the following command:

amixer cset numid=3 1

Secondly make sure that the sound is properly configured

sudo nano /etc/modprobe.d/alsa-base.conf


# the content of the file should look like this

# autoloader aliases
install sound-slot-0 /sbin/modprobe snd-card-0
install sound-slot-1 /sbin/modprobe snd-card-1
install sound-slot-2 /sbin/modprobe snd-card-2
install sound-slot-3 /sbin/modprobe snd-card-3
install sound-slot-4 /sbin/modprobe snd-card-4
install sound-slot-5 /sbin/modprobe snd-card-5
install sound-slot-6 /sbin/modprobe snd-card-6
install sound-slot-7 /sbin/modprobe snd-card-7
# Cause optional modules to be loaded above generic modules
install snd /sbin/modprobe –ignore-install snd && { /sbin/modprobe –quiet snd-ioctl32 ; /sbin/m$
install snd-rawmidi /sbin/modprobe –ignore-install snd-rawmidi && { /sbin/modprobe –quiet snd-s$
install snd-emu10k1 /sbin/modprobe –ignore-install snd-emu10k1 && { /sbin/modprobe –quiet snd-e$
# Keep snd-pcsp from beeing loaded as first soundcard
options snd-pcsp index=-2
# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-usb-audio index=-2
# Prevent abnormal drivers from grabbing index 0
options bt87x index=-2
options cx88_alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2


ctrl – x and Y to save

The last thing you have to do is to redirect the sound to the USB port.

sudo nano /etc/asound.conf


# you have to make the content of the file look like this

pcm.!default {
type hw
card 1
device 0


ctrl – x and Y to save
sudo reboot

How to setup a USB wlan connection on a Raspberry Pi

A little while ago I got myself a Raspberry Pi to tinker around. I didn’t know anything about Linux / Debian / Wheezy but I was inspired by the many different kind of applications of the Raspberry Pi that I read about on the internet.

In the meantime I’ve managed to turn the Raspberry into an Airpi. It took me some time to figure everything out, but I finally got there.

Every time I want to change/add some functionality I find myself spending lots of time Google-ing for the right solution. The solutions that work I’ll share on this blog so you can save some time achieving the same.

Today I figured out how to setup and enable the USB wlan connection on the Raspberry Pi and make it connect to my wireless network.

update, I’ve also posted an alternative solution: How to setup a USB wlan connection on a Raspberry Pi – alternative method

I got two usb wlan adapters which I both tested and seemed to work with this method:

Edimax WLAN Hi-Speed USB 2.0 EW-7811Un Nano

WLAN 11n USB Micro Stick US300EX Lite

First you need to configure the network adapter interface

sudo nano /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them.
# The loopback network interface
auto lo
iface lo inet loopback
# the LAN network interface
auto eth0
iface eth0 inet dhcp
# the WLAN network interface
auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp


Then you need to set the wlan parameters

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
ssid=”put your SSID here”
pairwise=CCMP TKIP
psk=”put your psk here”

Then you need to reboot

sudo reboot