hard float, so I had it running on Debian Wheezy Soft Float. Debian Wheezy Soft Float is a bit harder to work with then Raspian Wheezy hardfloat, but I got it running, which I
described in this thread.
But then (just after I got it running) it was offered for Raspian Wheezy Hard Float too! So I switched back to Hard Float.
In this thread I will describe how I got it running, and there's a video demonstration at the end...
Squeezelite is a software version of the Logitech Squeezebox. A squeezebox can connect to a Logitech Media Server (LMS). This server streams music to the players.
Internet radio, MP3's and I believe even Spotify is possible.
Also it's possible to synchronize playes, to create a multi room sytem. Which is my goal actually. I want a player in the living room and in the kitchen and synchronize these two.
Currently I own one Raspberry, and I've ordered two more raspberries. But I am still waiting on them..
In the meantime I am running squeezelite on this one raspberry, which I turned into a portable squeezelite player with retro looks (see this thread).
This is the forum thread about squeezelite: Thread: Announce: Squeezelite - a small headless squeezeplay emulator for linux (alsa only).
The developer (thanks again Triode, you're doing an excellent job!!) is on there too.
This is the google code homepage: http://code.google.com/p/squeezelite
First create a SD card with the Debian Wheezy Hard Float image on it. Connect it to a network cable and log in using SSH (Putty is my favorite SSH client).
Run the config tool:
- Code: Select all
sudo raspi-config
Enlarge the SD card, enable SSH (probably not necessary), set locale and timezone to your liking and run the update (takes a long time).
Changing the Hostname (optional)
I then changed the hostname:
- Code: Select all
sudo nano /etc/hosts
Change the name "raspberrypi" into something you like (I just "blueberry" this time).
Then open the next file, and put the same name behind "127.0.1.1":
- Code: Select all
sudo nano /etc/hostname
Get WiFi up and running (optional)
Then to get Wifi working (I have a Logilink WiFi dongle. RTL8188CUS based), I had to modify this file:
- Code: Select all
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
And make it look like this:
- Code: Select all
ctrl_interface=/var/run/wpa_supplicant
network={
proto=RSN
scan_ssid=1
key_mgmt=WPA-PSK
pairwise=CCMP TKIP
group=CCMP TKIP
ssid="your network ID in quote marks"
psk="your network password in quote marks"
}
}
I had to add the network={ ... } stuff, and change the ssid and psk.
After restarting I used ifconfig and saw that there was a IP address assigned to the wlan.
I unplugged the network cable and I got wireless network up and running.
Installing Squeezelite
First set the sound level:
- Code: Select all
sudo alsamixer
Use the F6 key to select the right soundcard (I am using an USB soundcard), and then set the volume.
I also set the microphone volume to zero, to make sure it will not cause interference.
Install some libs:
- Code: Select all
sudo apt-get install libflac-dev
(answer Y to the question)
- Code: Select all
sudo apt-get install libfaad2
Did this too, but it turned out it was allready installed on Raspbian:
- Code: Select all
sudo apt-get install libmad0
Create a squeezelite "work" directory:
- Code: Select all
mkdir squeezelite
cd squeezelite
Now get squeezelite:
- Code: Select all
wget http://squeezelite.googlecode.com/files/squeezelite-armv6hf
Move it to the usr directory, and make it executable:
- Code: Select all
sudo mv squeezelite-armv6 /usr/bin
cd /usr/bin
sudo chmod u+x squeezelite-armv6
Because I use a USB soundcard, so I had to tell squeezelite which sound device to use.
First list all the devices:
- Code: Select all
squeezelite-armv6hf -l
The result:
- Code: Select all
#Output devices:
null - Discard all samples (playback) or generate zero samples (capture)
sysdefault:CARD=ALSA - bcm2835 ALSA, bcm2835 ALSA - Default Audio Device
sysdefault:CARD=Set - C-Media USB Headphone Set, USB Audio - Default Audio Device
front:CARD=Set,DEV=0 - C-Media USB Headphone Set, USB Audio - Front speakers
surround40:CARD=Set,DEV=0 - C-Media USB Headphone Set, USB Audio - 4.0 Surround output to Front and Rear speakers
surround41:CARD=Set,DEV=0 - C-Media USB Headphone Set, USB Audio - 4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Set,DEV=0 - C-Media USB Headphone Set, USB Audio - 5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Set,DEV=0 - C-Media USB Headphone Set, USB Audio - 5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Set,DEV=0 - C-Media USB Headphone Set, USB Audio - 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=Set,DEV=0 - C-Media USB Headphone Set, USB Audio - IEC958 (S/PDIF) Digital Audio Output
I wanted to use only the front speakers, so I had to tell squeezelite to use "front:CARD=Set,DEV=0" .
Now to start Squeezelite I had to run (ip address is the address of the LMS server):
- Code: Select all
./squeezelite-armv6hf -o front:CARD=Set,DEV=0 192.168.2.4
And it worked!
Starting without the IP address for the LMS server:
- Code: Select all
./squeezelite-armv6hf -o front:CARD=Set,DEV=0
Without the IP address squeezelite uses auto discovery to determine the IP address of the LMS server.
Starting Squeezelite on startup
It was working well, so now I wanted to have it started on startup. So, to automate things, I made a daemon start script to start Squeezelite.
I made the script available through my website, it's my very first linux daemon script, so use at your own risk!
Do the next commands to automate startup:
- Code: Select all
cd /home/pi/squeezelite
sudo wget http://www.gerrelt.nl/RaspberryPi/squeezelitehf.sh
sudo mv squeezelitehf.sh /etc/init.d/squeezelite
cd /etc/init.d
sudo chmod u+x squeezelite
sudo update-rc.d squeezelite defaults
In the script the name of the squeezelite client is set to "Framboos" which is the dutch word for Raspberry.
To change it, run:
- Code: Select all
sudo nano squeezelite
Search for the word "Framboos" and change it to your liking.
Now you have to set the soundcard here too.
Search for this line (same line as where "Framboos" is):
- Code: Select all
SLOPTIONS="-o front:CARD=Set,DEV=0 -n Framboos"
Change "front:CARD=Set,DEV=0" to the one you selected earlier.
Save and close the script file.
This is how you test the script:
- Code: Select all
sudo ./squeezelite start
The command prompt should return immediately. Now check if the squeezelite process is up:
- Code: Select all
ps -A |grep squeeze
It should return something like this (the number will be different):
- Code: Select all
2324 ? 00:00:01 squeezelite-arm
To stop squeezelite:
- Code: Select all
sudo ./squeezelite stop
And that's it, if you now reboot the raspberry (sudo shutdown -r now), squeezelite should be started automatically.
See this video for a demonstration: CLICK FOR YOUTUBE DEMO
Greetings,
Gerrelt.