Time to open up a Terminal window and get to work…
In short we will do the following:
- Write Raspbian image to SD card
- Logon to the Raspbian Operating System
- Setup a Wireless connection to your AccessPoint
- Finalize the Raspberry Configuration
- Install rpi-update and update the Raspberry Pi firmware
- Install the Squeezelite player
- Edit the Squeezelite config file to prevent crackles from sound
- Adjust the sound volume of your Raspberry Pi
Write raspbian image to SD card
There is an excellent description on how to install Raspbian, have a look here. I used gparted to remove the old partitions from my SD card. After that I was ready to install a fresh copy Raspbian Jessie Lite.
$ cd Downloads/Raspbian
$ dd bs=4M if=./2016-05-27-raspbian-jessie.img of=/dev/sde
When ready you can connect the Raspberry Pi with the UTP cable to your network and power it up. I used Zenmap to figure out the IP -address of the Raspberry Pi.
Logon to the Rasbian Operating System
$ ssh pi@ip-address
Setup Wireless a connection to your AccessPoint
I've been using the TL-WN725N Wireless-N USB adapter from TP-LINK on all my Raspberry Pi projects. If you want to use WiFi, you need to configure your WPA settings (assuming you use WPA2 on your Access Point).
$ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
add following lines:
Finalize the Raspberry Configuration
By using the raspi-config script it is easy to configure several things on your Raspberry Pi without digging too much into the OS.
$ sudo raspi-config
– expand filesystem
– change hostname
– change password
You need to reboot the Raspberry Pi to complete the configuration. You can now disconnect the your Pi from the UTP cable. It's quite likely that your IP address changed during the reboot, so you might need to figure out the new IP address (see above). Logon to the Raspberry Pi again using ssh (also, see above).
Install rpi-update and update the Raspberry Pi firmware
You might want to update the Raspberry Pi firmware, to be able to do that you need to install rpi-update.
$ sudo apt-get install rpi-update
$ sudo rpi-update
Install Squeezelite player
Next thing up, is installing the Squeezelite player and some extra codecs...
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install squeezelite
$ sudo apt-get install libflac-dev
Edit the squeezelite config file to prevent crackles from sound
The Raspberry Pi is not the fastest computer around, so you need to help it a bit. You can help your Pi by increasing the ALSA buffer size.
$ sudo nano /etc/default/squeezelite
Edit following line:
and change it into (be aware of losing the hashtag!):
Adjust the sound volume of your Raspberry Pi
Make sure you have the right audio volume level on your Raspberry Pi. Ensure that the playback level has zero gain => PCM [db gain: 0.00]. Tweak the gain-level by using the arrow keys up and down, in the end you will reach the zero db gain :-)
You can now reboot your Raspberry Pi and enjoy your music!
Suggestions for improving this article are welcome, please let me know and