Tag Archives: Raspberry

The Pi Cam

Last weekend my Pi Cam arrived, on sunday I started some experiments, took some pictures and shot some video, but somehow I managed to screw up the installation after installing netcat and mplayer to bring up a Iive video stream from the Raspberry PI to my PC.

I’ll need to do some more experimenting before I can post a new image that provides streaming video from the raspberry to a windows pc.

Also I’ve started a Pyton programming course at codecademy.com. I want to combine an Arduino with my Raspberry to add some functions, like temperature reading. Communications should go via I2C. The whole setup should take a timelapse pictures of our garden, measure the water temperature, operate the water pump, stream music and switching the lights on and off, and I can probaly think of some more really not necessary things ūüėČ

Fortunately Dropbox has enabled access to my public dropbox again ūüôā

Happy downloading!

How to play Quake 3 on your Raspberry Pi

Today, I figured, it would be nice to do some old school fragging ūüôā It is time to get my Raspberry Pi to run Quake 3. There are quite a few tutorials, but it took me a couple of tries to find a combination that worked for me.¬†

For you, the quick way to get Quake 3 running on your Raspberry Pi is to download the Quake 3 SD card image for a 4GB SD Card from my public dropbox. You will find it under Images\Quake3\Quake3_4GB_autostart.zip In my previous posts I have explained how to mount an image on the SD Card by using Win32DiskImager. The image auto-starts Quake 3 on boot. In case you don’t want that, just use the following command after logging in:

sudo update-rc.d -f  quake3 remove 

Which removes Quake 3 from the start-up sequence. You can start the game by navigating to the directory where the game is located and start the game from there:

cd /home/pi/quake3/build/release-linux-arm
sudo ./ioquake3.arm

In case you insist in making your own image, this is how I got it to work:

Before you start, you need a 4GB SD Card with Raspbian Wheezy installed. Run sudo update and sudo upgrade. Start sudo raspi-config and expand the root partition to fill the SD card. Memory split should be configured with 64MB video memory. Reboot.

Step 1:

Log in to your Pi and then type at the command prompt:

sudo apt-get install git gcc build-essential libsdl1.2-dev

These tools are needed to install the Quake 3 source code!
Step 2:

Obtain the source code with this command:

git clone https://github.com/raspberrypi/quake3.git

Change to the Quake3 directory:

cd quake3
Step 3:

Edit the script that does the compilation:

nano build.sh
The first line (8) you are looking for starts with ARM_LIBS, change it so it says this:

ARM_LIBS=/opt/vc/lib
You also need to change the line (16) that starts with INCLUDES, change it to this:

INCLUDES=”-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads”
The final line (19) to change starts CROSS_COMPILE:

# CROSS_COMPILE=bcm2708-
Save the file by pressing Ctrl-X followed by Y and finally return.
Step 4:

Now you can begin the compilation process by typing:

./build.sh

the process takes approximately 60 minutes!
Step 5:

Once that has finished you need to download the pak files. This lets the game function!

Type:

cd
cd quake3/build/release-linux-arm
wget https://dl.dropboxusercontent.com/u/36774536/Images/Quake3/Q3DemoPaks.zip
unzip Q3DemoPaks.zip

The directory tree should look like this (using the default Pi user):

home
– pi
– – quake3
– – – build
– – – – release-linux-arm
– – – – – baseq3

and in the directory ‘baseq3’ there should be your PAK files.
Step 6:

Running the game: In order for you to run the game you have to be in the right directory, to get there type these commands:

cd
cd quake3/build/release-linux-arm
Start your game with this command:

sudo ./ioquake3.arm

In case you want Quake 3 to boot at start up follow the additional steps below:

Step 1:

sudo nano /etc/init.d/quake3

make the content of the file look like this:

#! /bin/sh
# /etc/init.d/quake3

### BEGIN INIT INFO
# Provides:          quake3
# Required-Start:    $remote_fs $syslog
# Required-Stop:     $remote_fs $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Simple script to start quake3 at boot
# Description:       A simple script from https://raspberrypi4dummies.wordpress.com
### END INIT INFO

# If you want a command to always run, put it here
cd /home/pi/quake3/build/release-linux-arm
sudo ./ioquake3.arm

# Carry out specific functions when asked to by the system

exit 0

Save the file by pressing Ctrl-X followed by Y and finally return.

The last two commands complete the job of starting Quake 3 on boot:

sudo chmod 755 /etc/init.d/quake3
sudo update-rc.d quake3 defaults

HAPPY FRAGGING!

foto 4

Thin Client software for your Raspberry Pi with Wlan support.

RPiTC

The guys from the RPiTC project have released a new Raspberry Pi optimized image. The image is much quicker and supports WLAN out-of-the-box.

You can download the image from my dropbox. Extract the image from the RAR file with e.g. 7-ZIP and save it on a local drive of your PC. Write the image to an SD card as described in one of my previous posts with Win32Diskimager.

Start your Raspberry Pi with the prepared SD Card and with monitor, mouse and keyboard attached.

The Desktop shows the various pre-installed Thin Client applications like RDP, VMWare, Citrix, X2Go, xFreeRDP, Ice Weasel with ICA etc. I use Ice Weasel with ICA mostly.

You will have to connect either a LAN cable or setup a WiFi connection for a USB dongle.

WiFi is supported out-of-the-box for my Edimax WLAN Hi-Speed USB 2.0 EW-7811Un Nano.

WLAN configuration is done like this:

Right-click on the desktop and select LX-Terminal from the application menu. A Window with the command prompt will open. To get the WiFi working only one config file needs to be created and another needs to be modified.

STEP 1)

At the command promt type:

nano /etc/wpa.conf

The nano editor will open, make the contents look like this:

network={
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
ssid=‚ÄĚYOUR-SSID‚ÄĚ
psk=‚ÄĚWPA-PASSWORD‚ÄĚ
}

press ctrl-x and y to save

STEP 2)

At the command promt type:

nano /etc/network/interfaces

The nano editor will open, make the contents look like this:

auto lo
iface lo inet loopback
# auto eth0
# iface eth0 inet dhcp
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa.conf

press ctrl-x and y to save

reboot & you are good to go!

Using my Raspberry Pi as a Citrix Client

A few weeks ago I came accross The Raspberry Pi Thin Client project (RPiTC). You can find its website here: http://rpitc.blogspot.nl/

I like to use the IceWeasel Citrix Client that it has onboard. Which works very well! In case you are a user of VMWare, Windows Remote Desktop etc, it also provides ready support for that.

Out of the box, the image works via the onboard Ethernet connection. But I wanted to use the RPiTC via a Wifi connection (Edimax ew-7811un). The RPi can be powered from the USB of my TV screen. I have the HDMI cable, USB WLAN and USB wireless HTPC keyboard connected to the RPI to make the setup complete and ready for work.

This is how I got it to work.

1) connect via SSH

2) logon using the following standard credentials

user: root

password: raspberry

you have to install the following tools:

aptitude install wireless-tools

apt-get install wpasupplicant
configure the wlan settings
nano /etc/wpa.conf
the file should look like this:
network={
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
ssid=”YOUR-SSID”
psk=”WPA-PASSWORD”
}
ctrl-x and Y
Configure your network interfaces
nano /etc/network/interfaces
the file should look like this:
auto lo
iface lo inet loopback
# auto eth0
# iface eth0 inet dhcp
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa.conf
ctrl-x and Y
reboot
For anyone that just wants an SD-card image, the original and the one with wlan support can be found in my public dropbox. (Files are currently being uploaded)
If you use the WLAN image you will have to edit the WLAN settings.

1) connect via SSH

2) logon using the following standard credentials

user: root

password: raspberry

configure the wlan settings
nano /etc/wpa.conf
by changing the following lines
ssid=”YOUR-SSID”
psk=”WPA-PASSWORD”
ctrl-x and Y
reboot
PS: note that the original image¬†RPiTC06022013.IMG fits on a 1GB card (the unpacked image is 1000MB).¬†The¬†RPiTC06022013-WLAN.IMG was made on my 4GB SD card (I didn’t have any smaller SD-cards), therefor this image is much bigger, despite the fact that the software doesn’t need all that space.
Enjoy!

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.

https://www.dropbox.com/sh/cjrcfw49sfc7h8b/SQSjpp8DJG

————————————————————————————————————————————–
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 http://www.logilink.eu/showproduct/UA0053.htm
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.https://www.dropbox.com/sh/cjrcfw49sfc7h8b/SQSjpp8DJG

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

ready!

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‚ÄĚ
wpa-psk ‚ÄúYOUR PASSWORD‚ÄĚ
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
ready!
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
cd

 

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 https://github.com/njh/perl-net-sdp.git perl-net-sdp
cd perl-net-sdp
perl Build.PL
./Build
./Build test
./Build install
cd

 

Install Shairport iOS6 version
git clone https://github.com/hendrikw82/shairport.git shairport
cd shairport
make

 

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:

DAEMON_ARGS=‚ÄĚ-w $PIDFILE -a¬†AirPi‚ÄĚ

 

ctrl-x and Y to save and close

To start the AirPi immediately 
./shairport start

or

reboot

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.

Win32DiskImager

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.