May 032013
 

Der Raspberry Pi kann in einen Airplay Empfänger verwandelt werden.

Voraussetzung: der RasPi muss mit dem Internet verbunden sein.

(den Roten Text in die Konsole vom Raspberry entweder reinschreiben oder kopieren)

  1. Vorbereitung
    Ihr müsst den Raspberry so einstellen, dass er sich automatisch anmeldet
    sudo raspi-config
    beim Punkt “Start Desktop on Boot” ja auswählen
  2. Update des Systems
    sudo apt-get update
    sudo apt-get upgrade
  3. Shairport installieren:
    sudo apt-get install git libao-dev libssl-dev libcrypt-openssl-rsa-perl libio-socket-inet6-perl libwww-perl avahi-utils libmodule-build-perl
  4. Update vom Shairport (Modul fürs iOS 6)
    git clone https://github.com/njh/perl-net-sdp.git perl-net-sdp 
    cd perl-net-sdp 
    perl Build.PL 
    sudo ./Build 
    sudo ./Build test 
    sudo ./Build install 
    cd ..
  5. Installation vom Modul
    git clone https://github.com/hendrikw82/shairport.git
    cd shairport
    make
  6. Shairport einschalten (AirPi ist der Name des Airplay Empfängers)
    ./shairport.pl -a AirPi
  7. Automatischer Start vom AirPi
    cd shairport 
    make install
    cp shairport.init.sample /etc/init.d/shairport
    cd /etc/init.d
    chmod a+x shairport
    update-rc.d shairport defaults
  8. Autostart-Datei öffnen
    sudo nano shairport
  9. Autostart-Datei bearbeiten (mit “#” kann eine Zeile kommentiert werden)
    Die vorhandene DAEMON_ARGS Zeile auskommentieren und folgende Zeile einfügen:
    DAEMON_ARGS=”-w $PIDFILE -a AirPi”
  10. Neustart
    sudo reboot

Voila, euer neuer Airplay-Empfänger funktioniert.

Wenn euer Airplay-Empfänger aktiviert ist, bekommt ihr in iTunes dann ein neues Symbol:

13_05_04_airplay1

Man kann auch unter Systemeinstellung/Ton die Standartausgabe auf Airplay legen. Damit werden die Multimediaknöpfe auch auf dem Airplay-Empfänger funtionieren.

Eine Abkurzüng: “alt” halten und mit der linken Maustaste auf das Tonsymbol bei der Uhr drücken.

Für Filme ist Airplay leider etwas ungeeignet, da der Ton ein paar Sekunden später in den Lautsprächern zu hören ist.
Das störende Knacken kann auch behoben werden, dazu schaut euch den Beitrag: “USB-Soundkarte” an

Quelle:

http://lifehacker.com/5978594/turn-a-raspberry-pi-into-an-airplay-receiver-for-streaming-music-in-your-living-room

 Posted by at 1:31 pm
May 022013
 

What is this about?

This is a small tutorial, which will show you how to set up a local Raspberry to serve as a so-called SOCKS 5 proxy-server for your local network. The Raspberry itself will connect to a remote server, which will then make the requests to other Internet servers with it’s own IP, thus masquerading the original requestor’s.

All computers on your local network can be configured to connect to the Raspberry, so they all can share the same connection to the remote server.

plug-in-raspberry-socks

Usage #1: Unblocking

As we all know, many sites ban IPs outside of certain contries (* cough Hulu YouTube Pandora Grooveshark cough*) or severely limit the usage. YouTube for instance will block most (> 60 %) “copyrighted” content here in Germany … also Google will index some pages, according to German laws, etc. Other examples will be easily found by the astute reader.

Well what about the obvious case of a US citizen being abroad and wanting to access these and other services? Or a British citizen trying to access the BBC iPlayer?

All you need is a US / British IP address. If you also happen to own a US / British VPN (if not, we recommend Hostigation for US VPSes – affiliate link), then you’re set. If you happen to be a US citizen, that is. If not, well … probably you should not read on Winking smile

 

Usage #2: Security & privacy

If you don’t trust your direct upstream connection, i.e. unsecure WiFi hotspot / sharing Internet through the neigbour’s connection, you might want to forward all traffic from your browser through a safe tunnel.

 

Usage #3: Advanced filtering

If you want to do some advanced filtering on your Internet traffic, i.e. rewriting some JavaScripts / CSS on the fly, logging and analysing the traffic, injecting automatic commands, for instance to log you in automatically and securely on some websites, etc., this solution might also work for you (with an additional “proxy” application on the Raspberry between the actual SOCKS proxy port and the browsers / apps you are serving). The Raspberry then could forward the traffic on through localhost, i.e. your regular Internet upstream service. We will not discuss advanced filtering in this post, but maybe in some upcoming posts.

Set up remote server

On your server / VPS in the remote location (i.e. USA), we recommend to add a new user for SOCKS / SSH forwarding with regular (i.e. non-root) privileges. This is done for security measures, should someone obtain control of your Raspberry. (Many Raspberries are left with the pi / raspberry default login).

adduser socks-foo

Linux will ask you for a password for this new user (in our example the username is “socks-foo”, pick your own), and some other questions, which can be safely accepted in their default values.

If you have OpenSSH server running, which you would need to log (“SSH”) into the remote location in the first place, -that’s it – you’re finished with the server.

If you access your “remote” machine directly or via some other means, please set up the OpenSSH server for this tutorial to work.

Consider setting up private key authentication and taking other security precautions which may be necessary, but outside the scope of this article. Please have a look at this article, for instance.

Set up Raspberry

We will have a Raspberry local server forwarding to the remote server(s). If in doubt, use the commands as root user / sudo them.

We will introduce you to an “instant on” solution first, and discuss in some more depth how it can be made more permanent in another article in this blog (coming soon).

Easy setup / test

In the easiest setup, you could start your SOCKS server simply by the following command

ssh -o ServerAliveInterval=60 -D0.0.0.0:8888 socks-foo@example.com

This will connect to the server example.com (you can also simply use it’s IP), with the user socks-foo, and set up dynamic forwarding on the port 8888 for all network interfaces on the Raspberry Pi. The ssh client will log into your example.com machine at this point, if you close the connection (exit), then the SOCKS proxy obviously will also stop working.

The 0.0.0.0 is important – without it, the Raspberry will open the port, but only on localhost – you will not be able to connect from other computers on your network to it.

You can verify that the port is indeed open (from another console) by

netstat -tlnp

This will show you a list of opened ports, and which IP adresses and services they are bound to.image

Also you can try to use curl to fetch content through socks (on another console logged into your Pi):

curl --socks5 localhost:8888 blog.pi3g.com

This should show you some HTML code.

 

Advanced Setup

In this simple test setup above, you need to connect to the Raspberry and enter the password to the remote server every time you want to use it. We will be looking at setting up a private / public key authentication method and installing the SOCKS proxy as a service in a future post.

Setting up your browser

Next, you can set up your browser to use the new SOCKS 5 proxy. We will demonstrate this with Firefox. A good idea is maybe to use a special browser just for connecting to the proxy, especially if the traffic on the remote server you are using is metered.

Open Firefox’ connection preferences:

Firefox > Options > Options > Advanced > Network > Settings …

image

Set up the IP of your Raspberry as SOCKS Host, the port you opened on the Raspberry Pi as SOCKS proxy port. Choose SOCKS v5, click OK.

DNS Setup

To direct DNS requests through the SOCKS proxy, we will have to modify another value:

Enter about:config as URL in Firefox, and press enter to navigate to the page.

image

Click on “I’ll be careful, I promise!”, and find the setting network.proxy.socks_remote_dns and set it to true.

image

You can use the search to find this advanced setting more easily.

That’s it! Your browser will now use the new SOCKS 5 proxy you just set up on your Raspberry Pi.

Browser-Plugins, like Flash, will automatically use the new SOCKS 5 proxy.

Please note, that your console to the Raspberry Pi has to be open for the connection to work (if you close it, the connection to the remote server will be disconnected and your proxy will be defunct.) We will show you in an upcoming article how to make it permanent.

 

References

May 012013
 

1.0 von 5 Sternen Für Raspberry Pi ungeeignet., 25. April 2013

Von 

-FX-

Von Amazon bestätigter Kauf(Was ist das?)

Rezension bezieht sich auf: Steckernetzteil Micro-USB 5V 1200mA für Raspberry Pi (Elektronik)

Leider ist dieses Netzteil trotz entsprechendem Titel NICHT für ein Raspberry Pi geeignet, da die Stromstärke von 1200mA nicht für die Versorgung des Ethernet Ports ausreicht.
Dieser konnte nur dann verwendet werden, wenn die Gegenstelle (Switch, Router) PoE (Power over Ethernet) unterstützt – was bei einer FritzBox z.B. nicht der Fall ist.”

Diese Amazon Bewertung bezieht sich auf ein Netzteil (das wir im übrigen NICHT in unseren Produkten einsetzen).

PoE hat mit der Stabilität / dem Betrieb des Ethernet Port des Raspberry Pis nichts zu tun – der Raspberry kann kein PoE “nackt” nutzen, da er kein PoE fähiges Gerät ist (es gibt diese Geräte durchaus, sie sind aber deutlich seltener als normale Geräte und auch entsprechend teuerer). Im besten Fall sollte einfach gar nichts passieren, da die PoE Endstelle (besagter Switch) erst die Spannung (48 V, nicht 5 V!) aufschaltet, wenn die Gegenstelle durch eine Aktivierungssequenz andeutet, dass sie PoE fähig ist. Mal den Wikipedia Artikel bemühen, wenn Sie weitere Infos brauchen.

Die Aussage dass man also PoE braucht und sonst das Netzteil zu schwach ist rührt vom mangelnden Verständnis der Technologie des Kommentarautors her. Ob das Netzteil allerdings wirklich zu schwach ist weiß ich nicht,da ich es nicht einsetze.

Leider konnte ich diese Antwort wohl nicht direkt im Amazon Store posten, aber hier vielleicht als Warnung dass nicht alle Kommentare wirklich von Experten verfasst werden …

Optimization WordPress Plugins & Solutions by W3 EDGE