Personal tools
You are here: Home Linux I/O Squeeze Box Receiver (SBR) configuration using Net-UDAP
 

Squeeze Box Receiver (SBR) configuration using Net-UDAP

Howto configure a sqeezebox receiver (SBR) on CentOS

The overall aim is to configure the squeezebox receiver to use it's wired ethernet port.

Residual: This procedure wasn't entirely reproducible. Getting the udap_shell.pl script to reliably detect the SBR didn't always happen.

Download, compile and install Net-UDAP

$ wget 'http://projects.robinbowes.com/Net-UDAP/trac/changeset/129/tags/RELEASE_1.1.0?old_path=%2F&format=zip'
$ mv 'RELEASE_1.1.0?old_path=%2F&format=zip' Net-UDAP-1.1.0.zip

Note: To extract the zip archive the 'unzip' package must be installed.

The following prerequisites must be installed

# rpm -Uhv http://apt.sw.be/redhat/el5/en/x86_64/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.x86_64.rpm
# yum install make perl-version perl-Perl-Critic perl-Test-Perl-Critic perl-IO-Interface unzip

As per the README instructions:

unzip Net-UDAP-1.1.0.zip
cd tags/RELEASE_1.1.0/src/Net-UDAP/
perl Makefile.PL
make
make test
make install

Note: The perl module doesn't compile/test without errors. However, ignoring those errors, it is possible to run the software.

Firewall

The machine running the UDAP perl script must be able to send and receive udp port 17784.  Add a firewall rules to allow this traffic

-A udpOut -p udp -m udp --dport 17784 -m state --state NEW -j ACCEPT
-A udpIn  -p udp -m udp --dport 17784 -m state --state NEW -j ACCEPT

Configuration

As per the instructions, press the button on the front of the squeezebox receiver (SBR) for 3 seconds (when it should flash red), so the SBR is in 'init mode'.

Run the perl script 'udap_shell.pl' (Note: The scripts extracted above are not executable, so explicitly run perl).

$ perl udap_shell.pl

Look at the sample usages of Net-UDAP. For this setup I wanted a wired DHCP configuration. The configuration commands used are:

discover
conf 1
set interface=1 lan_ip_mode=1
save_data
reset

Links

Appendices

Net-UDAP-1.1.0.zip

tags/RELEASE_1.1.0/doc/Notes on Receiver nvram params.txt
tags/RELEASE_1.1.0/doc/SBC configure msgs.txt
tags/RELEASE_1.1.0/scripts/decode_msgs.pl
tags/RELEASE_1.1.0/scripts/find_if.pl
tags/RELEASE_1.1.0/scripts/udap_shell.pl
tags/RELEASE_1.1.0/scripts/broadcast_test.pl
tags/RELEASE_1.1.0/scripts/test_module.pl
tags/RELEASE_1.1.0/src/Net-UDAP/t/00.load.t
tags/RELEASE_1.1.0/src/Net-UDAP/t/perlcritic.t
tags/RELEASE_1.1.0/src/Net-UDAP/t/pod.t
tags/RELEASE_1.1.0/src/Net-UDAP/t/pod-coverage.t
tags/RELEASE_1.1.0/src/Net-UDAP/MANIFEST
tags/RELEASE_1.1.0/src/Net-UDAP/lib/version.pm
tags/RELEASE_1.1.0/src/Net-UDAP/lib/Log/StdLog.pm
tags/RELEASE_1.1.0/src/Net-UDAP/lib/Class/Accessor/Faster.pm
tags/RELEASE_1.1.0/src/Net-UDAP/lib/Class/Accessor/Fast.pm
tags/RELEASE_1.1.0/src/Net-UDAP/lib/Class/Accessor.pm
tags/RELEASE_1.1.0/src/Net-UDAP/lib/version/vpp.pm
tags/RELEASE_1.1.0/src/Net-UDAP/lib/Net/UDAP.pm
tags/RELEASE_1.1.0/src/Net-UDAP/lib/Net/UDAP/Shell.pm
tags/RELEASE_1.1.0/src/Net-UDAP/lib/Net/UDAP/Constant.pm
tags/RELEASE_1.1.0/src/Net-UDAP/lib/Net/UDAP/MessageIn.pm
tags/RELEASE_1.1.0/src/Net-UDAP/lib/Net/UDAP/MessageOut.pm
tags/RELEASE_1.1.0/src/Net-UDAP/lib/Net/UDAP/Util.pm
tags/RELEASE_1.1.0/src/Net-UDAP/lib/Net/UDAP/Client.pm
tags/RELEASE_1.1.0/src/Net-UDAP/lib/Net/UDAP/Log.pm
tags/RELEASE_1.1.0/src/Net-UDAP/lib/Term/Shell.pm
tags/RELEASE_1.1.0/src/Net-UDAP/Makefile.PL
tags/RELEASE_1.1.0/src/Net-UDAP/Changes
tags/RELEASE_1.1.0/src/Net-UDAP/.cvsignore
tags/RELEASE_1.1.0/src/Net-UDAP/README

yum install perl-Perl-Critic

Dependencies Resolved

=============================================================================================
 Package                           Arch         Version                 Repository      Size
=============================================================================================
Installing:
 perl-Perl-Critic                  noarch       1.082-2.el5.rf          rpmforge       777 k
Installing for dependencies:
 perl-B-Keywords                   noarch       1.08-1.el5.rf           rpmforge        10 k
 perl-Class-Data-Inheritable       noarch       0.08-1.el5.rf           rpmforge        12 k
 perl-Clone                        x86_64       0.29-1.el5.rf           rpmforge        33 k
 perl-Config-Tiny                  noarch       2.12-1.el5.rf           rpmforge        21 k
 perl-Devel-StackTrace             noarch       1.1902-1.el5.rf         rpmforge        26 k
 perl-Exception-Class              noarch       1.24-1.el5.rf           rpmforge        32 k
 perl-IO-String                    noarch       1.08-1.2.el5.rf         rpmforge        12 k
 perl-List-MoreUtils               x86_64       0.22-1.el5.rf           rpmforge        98 k
 perl-Module-Pluggable             noarch       3.8-1.el5.rf            rpmforge        26 k
 perl-PPI                          noarch       1.201-1.el5.rf          rpmforge       402 k
 perl-Params-Util                  noarch       0.31-1.el5.rf           rpmforge        28 k
 perl-Readonly                     noarch       1.03-1.2.el5.rf         rpmforge        19 k
 perl-String-Format                noarch       1.14-1.2.el5.rf         rpmforge        11 k

Transaction Summary
=============================================================================================
Install     14 Package(s)
Update       0 Package(s)
Remove       0 Package(s)

Total download size: 1.5 M

Default Configuration

The configuration of the squeezebox receiver (SBR) prior to configuration is shown below. The setting of interface=0 disables the wired LAN interface.

UDAP> list
 #    MAC Address    Type       Status
== ================= ========== ===============
 1 00:04:20:16:82:26 squeezebox init
UDAP> configure 1
UDAP [1] (squeezebox 168226)> list
             bridging: 0
             hostname: Lounge Receiver
            interface: 0
          lan_gateway: 192.168.0.254
          lan_ip_mode: 1
  lan_network_address: 192.168.0.108
      lan_subnet_mask: 255.255.255.0
          primary_dns: 192.168.0.18
        secondary_dns: 0.0.0.0
       server_address: 192.168.0.22
squeezecenter_address: 192.168.0.22
(▒ squeezecenter_name: teal▒l@▒▒▒
        wireless_SSID: Ruby-Squeeze
     wireless_channel: 6
      wireless_keylen: 0
        wireless_mode: 0
   wireless_region_id: 7
   wireless_wep_key_0: 00000000000000000000000000
   wireless_wep_key_1: 00000000000000000000000000
   wireless_wep_key_2: 00000000000000000000000000
   wireless_wep_key_3: 00000000000000000000000000
      wireless_wep_on: 0
  wireless_wpa_cipher: 3
    wireless_wpa_mode: 2
      wireless_wpa_on: 1
     wireless_wpa_psk: ****DELETED****

Enabling the wired interface

UDAP [1] (squeezebox 168226)> set interface=1 lan_ip_mode=1
UDAP [1] (squeezebox 168226)> save_data
info: <<< Broadcasting set_data message to MAC address 00:04:20:16:82:26 on 255.255.255.255
UDAP [1] (squeezebox 168226)> list
             bridging: 0
             hostname: Lounge Receiver
            interface: 1
          lan_gateway: 192.168.0.254
          lan_ip_mode: 1
  lan_network_address: 192.168.0.108
      lan_subnet_mask: 255.255.255.0
          primary_dns: 192.168.0.18
        secondary_dns: 0.0.0.0
       server_address: 192.168.0.22
squeezecenter_address: 192.168.0.22
(▒ squeezecenter_name: teal▒l@▒▒▒
        wireless_SSID: Ruby-Squeeze
     wireless_channel: 6
      wireless_keylen: 0
        wireless_mode: 0
   wireless_region_id: 7
   wireless_wep_key_0: 00000000000000000000000000
   wireless_wep_key_1: 00000000000000000000000000
   wireless_wep_key_2: 00000000000000000000000000
   wireless_wep_key_3: 00000000000000000000000000
      wireless_wep_on: 0
  wireless_wpa_cipher: 3
    wireless_wpa_mode: 2
      wireless_wpa_on: 1
     wireless_wpa_psk: ****DELETED****

Net-UDAP crash

When running the udap_shell.pl script they following error occurs. The workaround appears to be to restart the script.

UDAP> discover
info: <<< Broadcasting adv_discovery message to MAC address 00:00:00:00:00:00 on 255.255.255.255
ucp_method invalid or not defined. at /root/Net-UDAP-1.1.0/RELEASE_1.1.0/scripts/../src/Net-UDAP/lib/Net/UDAP/Shell.pm line 150
Document Actions