Prerequisites
- Some kind of *nix machine (Mac OS X is a *nix machine).
- Perl, plus the DB_File and MP3::Info Perl modules.
- A DHCP server.
- A machine to run the provided SSDP server on.
- An NFS server.
- Some kind of web server, e.g., Apache.
Sorry about having such long installation instructions and not
having an automated way to do an install, i.e., "make install",
but there are just too many pieces that can be configured in
too many ways.
Perl
All the code is written in Perl 5 (tested with 5.6). The
DB_File and MP3::Info Perl modules are required.
The DB_File module requires the db and db-devel packages
(available from your nix distribution). (If, during building
of the DB_File module, you get an error about the file db.h not
being found, then you need to install the db-devel packages.)
DHCP Server
The Rio Receiver obtains its IP address via DHCP. You can use
dhcpd. There is a sample configuration file in:
./etc/dhcpd.conf
Read the comments about installation.
Alternatively, if you have a home router box that is also a
DHCP server (many are), you can use that instead. However, it
MUST either be able to:
1. Assign a hostname to a client.
OR
2. Assign a fixed IP address for given MAC address.
The comments in the sample dhcpd.conf file explain all this.
SSDP Server
The Rio Receiver uses SSDP (Simple Service Discovery Protocol)
to obtain the IP addresses for both an NFS and web server.
Such a server is provided in:
./sbin/rio-ssdp
It can either be run stand-alone or via inetd(8). Note that
xinetd(8), as least up to an including version 2.3.9,
apparently has a bug in dealing with "wait" UDP servers. If
you get error lines like:
file descriptor of service ssdp-rio has been closed
select reported EBADF but no bad file descriptors
in your syslog, then xinetd(8) has the bug. It doesn't happen
right away, but, once it does, xinetd will no longer respond to
SSDP requests and needs to be HUP'd. In this case, try inetd
or simply run the server stand-alone.
In any event, you should probably copy it somewhere:
cp ./sbin/rio-ssdp /usr/local/sbin
If you run the server stand-alone on a System-V-like system
(e.g., Linux) and you want it started automatically at system
boot:
cp ./etc/init.d/ssdpd /etc/init.d
vi /etc/init.d/ssdpd # edit config
chkconfig --add ssdpd
If you don't have chkconfig on your system, then you can add
symlinks manually:
cd /etc/rc.d/rc3.d
ln -s ../init.d/ssdpd S99ssdpd
cd /etc/rc.d/rc5.d
ln -s ../init.d/ssdpd S99ssdpd
If you run the server stand-alone on a BSD-like system, simply
add a rio-ssdp command-line to the /etc/rc.local file (or
equivalent).
FYI: you can test the SSDP server with the provided test
utility:
./sbin/test-ssdp
NFS Server
The Rio Receiver NFS-mounts its root filesystem and boots Linux
from it. The Rio's filesystem (as made by SONIC|blue) is in a
tar file called receiver.arf that, when the Windows server
software is installed, is located at:
C:\Program Files\Audio Receiver\receiver.arf
(The reason it doesn't have a "tar" suffix is so that, on
Windows systems, WinZip doesn't mess with it.)
Since you apparantly aren't interested in running the Windows
server, I'll save you the trouble of having to use a Windows
machine to install the server on just to copy receiver.arf off.
You can download it from:
http://homepage.mac.com/pauljlucas/software/yarrs/receiver.arf
(It's not clear that I can make this available for download;
however, I'm not making something available that every Rio
Receiver owner doesn't already have.)
To prepare the Rio's filesystem, as root:
mkdir -p /tftpboot/rio # see note below
cd /tftpboot/rio
tar xfBp /path/to/receiver.arf
Note: see the comments in dhcpd.conf about the name of the
mountpoint directory. There is a sample nfsd configuration
file in:
./etc/exports
Read the comments about installation.
Web Server
The Rio Receiver issues music database query requests as well
as stream music via HTTP. Unfortunately, it uses URLs of the
form:
http://server/command?args
i.e., it assumes that its commands are directly under the
document root. If you don't care about mixing the Rio server's
CGI scripts with the rest of your document root and don't care
about them being accessible to whoever the rest of your
document root is, fine.
If you do care, then you need to set up a virtual web host.
There is a sample configuration file in:
./etc/rio-httpd.conf
Read the comments about installation. Note that, at the very
least, you need the AliasMatch directives.
Copy the htdocs directory to the Rio's virtual host document
root:
cp -r ./htdocs /home/www/rio
Copy the cgi-bin directory to the Rio's virtual host cgi-bin:
cp -r ./cgi-bin /home/www/rio
then edit the settings in the destination Rio/Config.pm file.
Building your Music Database
Issue a command like (line split because it wouldn't fit):
rio-builddb \
-c /home/www/rio/htdocs/content \
-d /home/www/rio/db \
mp3dir1 mp3dir2 ...
When done, make SURE the entire path up to and including both
the content directory and the database directory can be read by
the user the web server is running as.
Personally, I have this command as a cron job. The job also
makes sure the permissions on all the directories and files are
correct. I have included a copy of the cron script in:
./cron/rio-build-fix
Playing some music
Finally, turn on the Rio Receiver. You can do a "tail -f" on
the various log files on your server(s) to see what's going on
and watch for errors.
Try selecting a music track and playing it. Have fun!
- Paul J. Lucas <pauljlucas@mac.com>
Manual Pages
By the way, all the commands have manual pages. To generate
them:
cd ./man
make
You can also make plain text, PostScript, and PDF versions:
make text
make ps
make pdf
