Quantcast
Channel: Squeezebox : Community : Forums - Linux / Unix
Viewing all articles
Browse latest Browse all 1518

Plastic Box Which Plays Noises

$
0
0
Thank you Castella for the name. (What do you mean, it was a joke? ;))

Here is my first release of the Plastic Box Which Plays Noises image. It's a SDHC card image for the dual Wandboard based on Fedora 18 ARM. It's a 4GB image, so you'll need a 4GB card to extract it to. About 2.7GB of the space is used, so it's not a light image like the previous one I made based on a ubuntu minimal rootfs. X is installed. It should be possible to run a xfce desktop if you change the default runlevel, although I have not done so myself. (More on that later.)

Before talking techy, I figure this needs to be said. The next release will have a Web gui that will allow you to configure the network and squeezelite. If you're not comfortable with getting dirty, ssh'ing into the board and editing a text file or two, please wait for the next release, which the wind blowing in the right direction, should be packaged and ready next weekend.

Software Repo
My reason for switching from ubuntu to Fedora 18 is that it allows me to leverage the work I've already done on packaging LMS and client software for Fedora. The ARM repo is located here. (This initial image includes the software already installed, so you don't need to manually install it.)

(Note: My Vacuumtube repo depends on the Rpmfusion repo. That's where the "non-free" codec dependencies, (ie. mp3), are pulled from, rather than me being in the position of needing to re-distribute them.)

User
The default user is "fedora" and the password is "fedora". The root password is "fedora". The "fedora" user belongs to the wheel group, which means you can just use "sudo" everytime you need to run a command as root without having to provide a password.

Network
The first time you run you'll need to plug in an ethernet cable, get given an address via DHCP, and have some way to find out from you router what address it was given so you can ssh into it. If you wan't to enable wireless....
Code:

cd /etc/syconfig/network-scripts
The two files that you need to edit, ifcfg-wlan0 and keys-wlan0.

In the ifcfg file, you'll need to just change the ESSID for your network.

Code:

$ cat /etc/sysconfig/network-scripts/ifcfg-wlan0

DEVICE=wlan0
ESSID="*** YOUR_ESSID_HERE ***"
MODE=Managed
KEY_MGMT=WPA-PSK
TYPE=Wireless
BOOTPROTO=dhcp
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
NAME="wlan0"
UUID=2396f7bd-4ad5-41de-8b0b-9adfed9942ac
ONBOOT=yes
IPV6_PEERDNS=yes
IPV6_PEERROUTES=yes
IPV6_PRIVACY=rfc3041
PEERDNS=yes
PEERROUTES=yes
ZONE=trusted

In the keys file, assuming you are using a PSK, just set the password there.
Code:

$ cat /etc/sysconfig/network-scripts/keys-wlan0

WPA_PSK='*** YOUR_PSK_HERE ***'

Then....

Code:

sudo ifdown wlan0
sudo ifup wlan0
ifconfig

And hopefully the wireless interface will have connected to your router and be given an address via dhcp.

Bluetooth
The firmware and loader is RPM packaged, (brcm_patchram_plus-1.0-2.fc18.armv7hnl.rpm), installed, and working. It is currently loaded on boot from /etc/rc.d/rc.local. (On my TODO list, a systemd service file.)

Code:

$ cat /etc/rc.d/rc.local

##
## Load the Broadcom bluetooth firmware
##
brcm_patchram_plus\
 --timeout=6.0\
 --patchram /lib/firmware/brcm/bcm4329.hcd\
 --baudrate 921600\
 --use_baudrate_for_download\
 /dev/ttymxc2 && hciattach /dev/ttymxc2 any 921600 &

Systemd
If used to traditional Unix rc.d or upstart, systemd, which is used to run the services may take a little getting used to. Here's the 10 second dummies guide.
Code:

sudo systemctl enable <service_name>.service
Code:

sudo systemctl disable <service_name>.service
Code:

sudo systemctl start <service_name>.service
Code:

sudo systemctl stop <service_name>.service
Code:

sudo systemctl restart <service_name>.service
I really don't think I need to describe what each one does. ;)

Squeezelite
Squeezelite is packaged as a rpm, squeezelite-1.0-5.fc18.armv7hnl.rpm. It runs as a systemd service. By default I have disabled it. If you want to run it as a service, before enabling it, edit /etc/sysconfig/squeezelite, the options file. eg. what I'm using. (You'll need to change for your setup.)
Code:

$ cat /etc/sysconfig/squeezelite

OPTIONS="-n SqueezeliteWAND -m 00:1f:7b:b2:02:85 -a 40::: -r 384000 -o hw:CARD=Amanero,DEV=0 -f /var/log/squeezelite/squeezelite.log 192.168.0.54"

After you have done that.
Code:

sudo systemctl enable squeezelite.service
sudo systemctl start squeezelite.service

Squeezelite should start and it will start automatically from now on.

LMS

This is a build of 7.8.0 trunk and is split across 3 RPM packages, logitechmediaserver-7.8.0.34034-16.fc18.noarch.rpm, logitechmediaserver-vendor-7.8.0.34034-9.fc18.armv7hnl.rpm and logitechmediaserver-CPAN-7.8.0.34034-6.fc18.armv7hnl.rpm. It has been compiled with optimisation, (note the package platform name, armv7hnl == ARMV7, hard-float and the 'n', optimised for NEON), specifically for the Wandboard. I've been running this for days. Triode's Spotify plugin works just fine. Aside from that, my library is mostly flac so it hasn't had much testing with anything else.

What you need to know.

1. The options file. /etc/sysconfig/squeezeboxserver

Code:

$ cat /etc/sysconfig/squeezeboxserver

# Edit this to suit your setup
SQUEEZEBOX_USER="squeezeboxserver"
SQUEEZEBOX_HOME="/usr/libexec"
SQUEEZEBOX_CFG_DIR="/var/lib/squeezeboxserver/prefs"
SQUEEZEBOX_LOG_DIR="/var/log/squeezeboxserver"
SQUEEZEBOX_CACHE_DIR="/var/lib/squeezeboxserver/cache"
SQUEEZEBOX_CHARSET="utf8"
SQUEEZEBOX_PID_FILE="/var/run/squeezeboxserver/squeezeboxserver.pid"
SQUEEZEBOX_OPTIONS="--noimage --novideo --noupnp --nosb1slimp3sync"

The only thing you might want to fiddle with is commenting out the last line. I prefer lean and mean, disabling what I won't be using.

2. Log files. /var/log/squeezeboxserver/{server,scanner}.log

3. Enable and start. (If you want to run LMS on the Wandboard.)

Code:

sudo systemctl enable squeezeboxserver.service
sudo systemctl start squeezeboxserver.service

4. Music files.

I've been mounting my vortexbox music library via nfs (/mnt/storage) and also used a library on a USB hard drive. The kernel is built with support for most filesystems. CIFS might be useful to you if you are wanting to mount your library from a M$ Windows box, although I haven't tested it myself.

5. Point your browser.

http://wandboard_ip:9000. Set the location(s) for your music files and playlists and start a scan.

6. You might want to stop squeezelite, edit the options file if you set an ip address for the server it should use and restart it to use the local server.

7. Speed

Actually, it's rather nippy. The biggest performance hit is having the LMS sqlite library database on the memory card. I've mounted a drive under /var/lib/squeezeboxserver/cache. Having done so, it is neck and neck between the Wandboard and my dual core Atom board running Vortexbox 2.2. If you aren't constanly adding to, or changing library files, and needing to rescan, it isn't an issue.

I'll reserve the next post for some more info I'll provide later. But I think that is enough for now. ;) The image is just compressing. When done, I'll post the link.

Have fun!

Viewing all articles
Browse latest Browse all 1518

Trending Articles