Tag Archives: Raspberry pi

Adding Squeezelite to SqueezboxServer on Rpi

Our squeezebox classic has died for as yet unidentified reasons.  I have already rebuilt it once using my original post as a guide after my dodgy self made RPi case rebooted it once too often.

To get spotify on my RPi (armel) version I used this with some tweaks:

[Tutorial] Squeezelite up and running on Raspbian Wheezy HF:

  • I had to download  the armel version of the binary
  • wget http://squeezelite.googlecode.com/files/squeezelite-armv6hf

  •  I think that there is a bug in the start/stop script – I had to remove the ” — $DAEMON” line from the start command for some reason before it would work.

SOLVED: rPi, samba, usb disk and read only frustrations.

We’re leaving for holiday tomorrow, so *of course* I decided that it was the *ideal* time to fix the album art in our music connection.  Don’t ask.

I found that I couldn’t access the windows (samba) share on my Raspberry Pi without it being read only.  Two hours of testing later I worked out that it was switching to read only when I tried to edit a file on it from the Windows machine.  Much googling later I worked out that it was probably a self defence mechanism of the disk switching to read-only because it had problems.

I knew it had problems but had ignored them.

A little googling later and I had downloaded dosfstools, unmounted the disk and run

sudo dosfsck -r /dev/sdsa1

repeatedly until it had no errors.  Then it worked perfectly.

Raspberry Pi as squeezebox server (logitech media server) with Spotify

Please note that this is now obsolete – see

http://thomas.w-p.me.uk/blog/2013/10/adding-squeezelite-to-squeezboxserver-on-rpi/

For a better way.  The below is left for reference.

========================================================

I tried this once, but fell down when I got to the spotify bit because I had the wrong version of debian.   This post is just personal notes of how I progressed the second time.

  1. Downloaded and sent the armel version of Raspbian Wheez (torrent) to the SD CARD for my Raspberry Pi.
  2. It didn’t boot.  I did some research and found that I probably needed to change the start.elf file in /boot for the version in the non armel version.  I used this post to mount the img file I had used the time I got stuck and pulled the start.elf out of it.
  3. It then booted.  I left it running and did the rest using teraterm.  ALT+V to paste and TeraTerm copes nicely with multiple lines of commands.
  4. Followed this guide for installing, which was simply these commands in order, some (particularly the dist-upgrade in step 1) take a long time.  Thank you very much mystery poster (you may not need the commands in red, see later*):
  • sudo apt-get update && sudo apt-get dist-upgrade 
  • sudo apt-get install libjpeg8 libpng12-0 libgif4 libexif12 libswscale2 libavcodec53 
  • wget http://downloads.slimdevices.com/LogitechMediaServer_v7.7.2/logitechmediaserver_7.7.2_all.deb
  • sudo dpkg -i logitechmediaserver_7.7.2_all.deb  
  • sudo service logitechmediaserver stop
  • wget http://allthingspi.webspace.virginmedia.com/files/lms-rpi-raspbian.tar.gz
  • tar -zxvf lms-rpi-raspbian.tar.gz 
  • sudo mv arm-linux-gnueabihf-thread-multi-64int /usr/share/squeezeboxserver/CPAN/arch/5.14/ 
  • sudo mv libmediascan.so.0.0.0 libfaad.so.2.0.0 /usr/local/lib 
  • sudo mv /usr/share/squeezeboxserver/Bin/arm-linux/faad /usr/share/squeezeboxserver/Bin/arm-linux/faad.old 
  • sudo mv faad /usr/share/squeezeboxserver/Bin/arm-linux 
  • sudo ln -s /usr/local/lib/libmediascan.so.0.0.0 /usr/local/lib/libmediascan.so 
  • sudo ln -s /usr/local/lib/libmediascan.so.0.0.0 /usr/local/lib/libmediascan.so.0 
  • sudo ln -s /usr/local/lib/libfaad.so.2.0.0 /usr/local/lib/libfaad.so
  • sudo ln -s /usr/local/lib/libfaad.so.2.0.0 /usr/local/lib/libfaad.so.2
  • sudo ldconfig
  • The logitech media server was now up and running, but with no music.  I had to mount my music from a windows machine next.
  • sudo mkdir /mnt/music
  • sudo nano /etc/fstab
  • I then added the following to my /etc/fstab with my server IP.
  •  //192.168.0.6/music     /mnt/music      cifs    username=user,password=xxxxxx,workgroup=HOME,users,auto,user_xattr 0 0
  • (then CTRL-X followed by Y to save the file) 
  • It didn’t work.  It turns out that the windows server needed some registry tweaks and a reboot.
    • In HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management, set the LargeSystemCache key to 1 (hex).
    • In HKLM\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters, set the Size key to 3 (hex).’
  • It was all working now, I set up Logitech Media Server, it scanned the folder on the network and now music plays on my squeezebox.
  • I logged in to the settings and disabled nearly all the services since I hardly use any.  I left Extension Downloader and added the third party add on for Spotify in addition to the official spotify one (I also have a Squeezebox Radio). The 3rd party plugin took ages to appear.
  • Next I wanted to get the spotify to work.  This was where I had come to a halt last time, but it was as easy as installing the 3rd Party plugin and entering my username and password for spotify premium.  Easy.
  • Now I wanted to have my cake and eat it, and install the Pi as the squeezebox player too.  The All Things Pi blog has instructions for that too, but there are some small errors and one step I didn’t need to do.  I didn’t need
  • apt-get install alsa-base 
  • because the alsa-base was already installed.
  • All  the remaining commands worked fine but only if I prefaced them with “sudo”. But the player did not appear right away.  It turned out that I needed an armel version.  I used it to replace the one in /usr/local/sbin/ and it came up right away.
  • *The BBC iPlayer did not initally work.  With a nudge from “bpa” I tried replacing the new faad file with the faad.old, and BBC iPlayer worked right away.  I wonder how many of the steps I could take out.

Raspberry Pi, OpenElec and xmbc

So, I got a Raspberry Pi for Christmas.  I have had some fun and games with it, not least when I broke the mount for the SD card whilst custom making a case.  Stupid error.  I’d cut a slot and left the card in whilst slipping the Pi in to the case.  I must have levered it somehow.  It was fixed by cutting a piece of plastic or two from a yoghurt pot lid and screwing the Raspberry Pi firmly down against some plastic casing from a house wiring box.  I had cut the plastic using my new dremel. 

The box had contained some buttons.

I am running OpenElec at the moment which is a fast booting xmbc implementation.  Without much effort I have it working as music player, BBC iPlayer, Spotify player (Spotimc)  and TV Catchup (I had to read the installation instructions for this one since the zip is a repository, not the add-on).

It even works with my Samsung TV remote using libCEC though this needed activating on the TV (which took me some time to work out).

Running BBC iPlayer in HD

The little box is powered by the TV and when I have a WiFi adapter for it will sit behind the TV and quietly work its magic.  I am very impressed by the little guy.  My wife suggests that cardboard and wood are not ideal case materials, and I agree, but it is different, and all I had lying around.

The next project is to (maybe) get another and make it do the same but with a squeezeserver on top so I can free up my Dell Zino, which I don’t really take full advantage of where it is.  I might sell it on if I can do that.