AVForums South Africa

Tutorials => PC and related tutorials => Topic started by: lanties on July 29, 2013, 04:17:18 PM

Title: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: lanties on July 29, 2013, 04:17:18 PM
This may help someone. A combination of info from the web that I have used to get squeezelite working on ubuntu 12.04 on the wandboard. Please note you need to have basic knowledge of Linux to understand what I have put together here.

There is absolutely nothing wrong with the CSOS image. I just simply prefer Ubuntu to Fedora and also like to select what I install. I am not using my wandboard as a Logitech Media Server. I only use it for playback. Controlling it is done through the normal web and android interfaces. I may write my own little web interface to allow me select and set different OS and player parameters a a later stage. Again notching wrong with the CSOS web interface except very slow and it requires a number of 3rd part apps to run. There are lots of merits doing things either way. This is just my preferred way.

Ok so here it goes:

Use the latest Ubuntu image from Wandboard.org to install. I used 12.04

You will need

1. Monitor with HDMI connector and cable
2. Network connection
3. USB keyboard

After the install do the following

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install openssh-server

from here you can connect with something like putty. No more monitor or keyboard required.

Make sure these are installed

sudo apt-get install libfaad2
sudo apt-get install libmad0

To Install a copy of squeezelite

cd

mkdir squeezelite
cd squeezelite

wget https://squeezelite.googlecode.com/files/squeezelite-armv6

sudo mv ./squeezelite-armv6 /usr/bin/squeezelite # Rename at the same time
sudo chmod ug+x /usr/bin/squeezelite

squeezelite -l should now give you a listing of audio devices

*****************************************************************************************************************

To compile your own version - My preferred way

cd

git clone https://code.google.com/p/squeezelite/

This will create a subdirectory squeezelite in your home directory

sudo apt-get install libflac-dev
sudo apt-get install libmad0-dev
sudo apt-get install libfaad-dev
sudo apt-get install libmpg123-dev

There maybe some additional packages that you need to install as well

cd squeezelite
make

If you have any problems install the packages that are short.

once you have succesfully compiled the latest version for squeezelite you can do the following

sudo cp ./squeezelite /usr/bin

squeezelite -l should now give you a listing for all devices

*****************************************************************************************************************
To automatically start squeezelite from a boot

Create this file /etc/init.d/squeezelite

Code: (This is my /etc/init.d/squeezelite script) [Select]
#!/bin/sh
### BEGIN INIT INFO
# Provides:          squeezelite
# Required-Start:    $syslog
# Required-Stop:     $syslog
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Script to start squeezelite
# Description:       Service script for squeezelite, command line squeezebox player
### END INIT INFO
#Define some variables.  LMS is the IP of your Logitech Media Server.  Output device can be found by running squeezelite -l

USER=linaro
OUTPUT=sysdefault # Change this to the correct parameters for your audio device
OUTPUT=hw:CARD=Series,DEV=0 #  Audiolab 8200 Series, USB Audio - Direct hardware device without any conversions
NAME=iWand2SqueezeYou
LMS=192.168.50.45

case "$1" in
  start)
    echo "Starting Squeezelite" | logger
    start-stop-daemon --start --quiet -b -m -p /var/run/squeezelite.pid --chuid $USER --exec /usr/bin/squeezelite -- -z -o $OUTPUT -n $NAME $LMS
  ;;
  stop)
    echo "Stopping Squeezelite" | logger
    start-stop-daemon --stop --quiet --pidfile /var/run/squeezelite.pid
    rm -f /var/run/squeezelite
  ;;
  *)
    echo "Usage: /etc/init.d/squeezelite {start|stop}"
    exit 1
  ;;
esac
exit 0

and then finally

sudo update-rc.d squeezelite defaults


Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: fdlsys on July 29, 2013, 04:19:37 PM
:notworthy:
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: GearSlave on July 29, 2013, 04:24:01 PM
Johan, we need to talk  ;)

Excellent, excellent guide! CSOS is a little top heavy so I like the compactness of this. The new Fedora 19 images of CSOS needs an 8GB SD Card :Ooooooh:
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: scrarfussi on July 29, 2013, 09:13:06 PM
i so wanna do this
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: BigAl on August 03, 2013, 10:54:01 PM
Is there a local supplier for the Wandboard and accessories?
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: Rotten Johnny on August 11, 2013, 05:15:27 PM
Looks like Mouser Electronics has local rights. 

I installed the Community Squeeze OS (Fedora) build on a dual wandboard today, disabled it as a player and enabled Logitechmediaserver with a powered USB drive attached.  Performance as a LMS host is very, very good.  Beats the crap out of a Pi as a LMS host.
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: lanties on August 11, 2013, 05:19:29 PM
How many clients are connected, streaming at the same time?
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: Rotten Johnny on August 11, 2013, 05:28:21 PM
Only one, built it for my folks to replace the Pi they were using.  It's very snappy, if you were connected to a library on a LAN I'm pretty sure it'd comfortably handle multiple players concurrently.  Using USB as the interface to a HDD USB would be the bottleneck, but I reckon it'd still comfortably stream to 2-3 clients.

One thing to note - I placed the LMS cache folder (ie its databases) on the USB drive.
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: lanties on August 11, 2013, 05:33:08 PM
Very good to know. Distributed LMS. Time to consider a forum music repository in the cloud.
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: Rotten Johnny on August 11, 2013, 05:51:24 PM
Ampache...
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: Rotten Johnny on August 11, 2013, 06:05:42 PM
Pity there's no Ubuntu server build for the Wandboard... yet.
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: lanties on August 11, 2013, 06:13:02 PM
Pity there's no Ubuntu server build for the Wandboard... yet.

It is a huge pity. Maybe there is someone out there in the www working on something.
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: BWS on August 12, 2013, 07:57:09 AM
Pity there's no Ubuntu server build for the Wandboard... yet.

You're the Linux NERD, you do it :point:
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: GearSlave on August 12, 2013, 08:56:37 PM
^^^ He tried :BWAHAHAH:
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: lanties on August 12, 2013, 09:00:21 PM
^^^ :ROFLMAO: :ROFLMAO:
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: Rotten Johnny on August 12, 2013, 11:00:45 PM
I did, quit when it was time to get an LMS build installed :tongue:
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: scrarfussi on August 22, 2013, 07:07:02 PM
if only i had known you had one of these when i came over
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: lanties on August 23, 2013, 01:33:24 PM
Just a quick update.

I have this desire to have a minimalistic Ubuntu distro on Wandboard for pure playback via squeezelite. The current distro's tries and cater to configure the wandboard for everybody's needs. Simply too much unnecessary stuff for my requirements.

I have managed to put together my own Ubuntu distro based on  Ubuntu 13.04 Core RFS  (https://wiki.ubuntu.com/Core) I have added network and ALSA support, as well as all packages required by squeezelite. The Kernel 3.035 and u-boot was downloaded from the wandboard site (SDK) and x-compiled. I then added squeezelite including autostart on startup with default parameters (o = default:CARD=sgtl5000audio ) for the Wandboard. It instantly detected my HiFiMedia DAC as well. Unfortunately the Vivere is doing the rounds but I know it will also work.

All working perfect, new player instantly registered with my LMS server and all done from original sources without the need for 3rd party patches etc.

Next I will write a little web-based configuration program and add into the distro. Again lightweight an no need for Apache or Tomcat etc.

I will make the image available to forum members once done and 100% sure all is working perfectly.

Everything is currently based on the Wand-Dual. I will look at the Wand-Quad at a much later stage. I have no interest at present to add LMS to my distro. Again I will look at this at a much later stage when I look at the Wand-Quad.

For those patient enough I should be able to release this within the next four weeks.
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: Rotten Johnny on August 23, 2013, 02:02:03 PM
bakgat! :notworthy: :notworthy:
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: GearSlave on August 23, 2013, 07:48:46 PM
Holding thumbs! The CSOS is getting real bloated now and takes forever to boot, Id love a sleek, trimmed down disti
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: BWS on August 23, 2013, 09:40:11 PM
Id love a sleek, trimmed down disti

You are so shallow, does your missus know this?
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: lanties on August 23, 2013, 10:34:11 PM
Holding thumbs! The CSOS is getting real bloated now and takes forever to boot, Id love a sleek, trimmed down disti

Currently still <300mb total disk usage and <30 seconds to boot. Should not be much bigger and slower when done. I have included net-tools and apt-get as well so it is a bit bigger than the 25mb where I started but at least it is also a bit more usable. Should easily fit on a 2 GB sdcard.
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: Rotten Johnny on September 29, 2013, 11:35:53 AM
Please include LMS, samba and NFS if not already included  ;D
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: lanties on September 29, 2013, 04:11:43 PM
Please include LMS, samba and NFS if not already included  ;D

Soon you will need some something like a Intel Core i7-4960X Extreme Edition.

Not much happening as I have been preoccupied for a few weeks. Can you believe it. Two out of three kids with appendix issues in three weeks.  One burst and one almost burst appendix.  It is almost like it is contagious in our house. I have kept the 3rd child locked in the garage for the last week feeding him through a small trap door. He knows it is because we love him and want to protect him.

Then there is always some work that needs to be  done just to make sure the cash flow stays positive.

Anyway things are coming on slowly but surely. My web front-end is starting to take shape. Things that can be done from the front-end.

1. Select squeezelite device from dropdown list. (Easy to read stuff)
2. Change squeezelite player name
3. Select LMS server or leave blank for auto-detect
4. Change hostname,
5. Change IP address
6. Change Gateway
7. Select between wired and wireless interfaces. Although working the wireless interface is still very unstable. This must be something to do with my kernel compile or the firmware I am using. Still working on this.
8. Select WiFI access point from drop down. (This is still only working on channels 1-10. I think I have a fix for 11-13 but not 100% on this yet.
9. Enter SSID.
10. Auto configure amixer for max volume.
11. Whole bunch of other background stuff to make it easy to work
12. Most graphics - Still playing around with colours.

The above is working well besides issues listed. Next up

a) Full control of player - Yes I know this can be done from a remote but I want to do it to.
b) Some system info presented so that MS-minded people can also understand.
c) LMS server
d) NFS-client
e) CIFS-client

Not sure if we need NSF and SAMBA server side stuff

Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: Rotten Johnny on September 29, 2013, 04:32:10 PM
Your missus is too kind to say it so let me: stop cooking for the kids, you're going to kill them.

NFS and SAMBA will be necessary if using Wandboard as a standalone with HDD attached (guess you could always unplug the drive and plug it in elsewhere to add tracks (but in a networked home why would you). I presume SSH is already part of the build :winkwink:
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: lanties on September 29, 2013, 04:49:20 PM
Your missus is to kind to say it so let me: stop cooking for the kids, you're going to kill them.

NFS and SAMBA will be necessary if using Wandboard as a standalone with HDD attached (guess you could always unplug the drive and plug it in elsewhere to add tracks (but in a networked home why would you). I presume SSH is already part of the build :winkwink:

You can not believe it but " what the hell are we feeding our kids ? "  have gone through my mind a few times. The only positive answer I have found so far " At least we are feeding our kids" 

SSH is in. NFS and SAMBA will be in. I will also provide a web upload (drag and drop of files)

Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: Rotten Johnny on October 13, 2013, 04:33:28 AM
:whistler:
Title: Re: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: lanties on October 13, 2013, 06:15:20 AM
:whistler:
It is taking a bit longer because I sometimes sleep and it is hard to find inspiration to do all the little nice things without a DAC:'(
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: Rotten Johnny on October 13, 2013, 06:20:37 AM
It is taking a bit longer because I sometimes sleep and it is hard to find inspiration to do all the little nice things without a DAC :'(
Touché.  If it makes you feel any better neither Gert, Costa or I have a finished product.  Nou nie meer lank nie. :thumbs:
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: Rotten Johnny on November 02, 2013, 01:59:36 PM
 :coffee:
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: I Shot Tupac!!! on November 02, 2013, 02:26:14 PM
:coffee:

+1

 :whip: :whip: :whip: :whip: :whip: :whip: :whip: :whip:
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: lanties on November 02, 2013, 03:07:54 PM
Need my Vivere in order to give this priority again. My distro is working perfect for me. It is you guys that wants all the bells and whistles.
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: Rotten Johnny on November 02, 2013, 03:28:03 PM
Newsflash:  Vivere deliveries to Protea Valley are halted indefinitely pending appearance of Ubuntu Server 13.10 builds for Wandboard Dual and Quad incorporating LMS, SAMBA, NFS & Squeezelite. :baseball:
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: lanties on November 02, 2013, 03:30:16 PM
Newsflash:  Vivere deliveries to Protea Valley are halted indefinitely pending appearance of Ubuntu Server 13.10 builds for Wandboard Dual and Quad incorporating LMS, SAMBA, NFS & Squeezelite. :baseball:

 :sulky:
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: I Shot Tupac!!! on November 02, 2013, 03:38:47 PM
 :ROFLMAO: :ROFLMAO: :ROFLMAO: :ROFLMAO: :ROFLMAO:
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: Rotten Johnny on November 06, 2013, 11:35:15 AM
Ok, here's a compromise: Server 13.04 Armhf image (https://groups.google.com/forum/#!topic/wandboard/GFq_KjtMTmc)
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: GearSlave on November 06, 2013, 06:37:27 PM
Is it any good?
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: Rotten Johnny on November 06, 2013, 07:08:55 PM
Dunno yet, have written the card, not had time to try it, but will tonight.  Hoping to add LMS, SAMBA, NFS and Squeezelite for an all in one box that can serve a local or network library.  Lightning = revert to local library.
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: Rotten Johnny on November 11, 2013, 08:48:54 PM
Ok, here's a compromise: Server 13.04 Armhf image (https://groups.google.com/forum/#!topic/wandboard/GFq_KjtMTmc)
Scrap this - kak idea, doesn't work.  I've created a Debian Wheezy server image, installed LMS and squeezelite.
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: Rotten Johnny on November 11, 2013, 08:50:01 PM
...

and then finally

sudo update-rc.d squeezelite defaults

before you do that you need to run this:
Code: [Select]
chmod ug+x /etc/init.d/squeezelite
You also need to install build-essential if you want to roll your own.
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: Johan on November 11, 2013, 09:29:43 PM
What went wrong with Ubuntu Server?
Title: Re: Wandboard with Ubuntu 12.04 and Squeezelite
Post by: Rotten Johnny on November 11, 2013, 09:41:10 PM
What went wrong with Ubuntu Server?
That image I referenced above doesn't seem to boot.  I set about a Debian install thereafter.  Could just as well try doing the same with Ubuntu server using netinstall.  If it works for Debian it'll work for Ubuntu.