PDA

View Full Version : Trying to change WPA key on Duet receiver



steinarb
2016-03-28, 08:47
Hi,

I have changed the WPA key in my home network and am trying to change
the WPA key on my Duet receiver (the Duet hand control is long dead.
I've controlled it with smartphone and tablet apps, and the web
interface of my local squeezecenter).

Here's what I've done so far:
- Installed Net::UDAP on a debian "jessie" machine (did a "git clone https://github.com/robinbowes/net-udap.git")
- Installed the necessary perl packages:
- Installed those that were provided in debian with:
apt-get install libterm-shell-perl libio-interface-perl
- Installed the Log::StdLog perl module manually (not provided by
debian):
- Downloaded the Log-StdLog-v0.0.3.tar.gz file from http://search.cpan.org/~dconway/Log-StdLog-v0.0.3/lib/Log/StdLog.pm
- Unpackaged the tar.gz file and ran the following commands as root:
perl Build.PL
./Build install
- Started the Net::UDAP shell application as a non-root user in a terminal window:
cd ~/git/net-udap
./scripts/udap_shell.pl
- Tried to set up the new WPA-code using this setup: http://projects.robinbowes.com/Net-UDAP/trac/wiki/SampleUsage#WirelessWPA1DHCP
(same command, just different wireless_SSID, wireless_wpa_psk, and squeezecenter_address)

This is what I've seen after running the commands:
- The MAC address on the receiver fills up the Access Point's log with
messages like this:
20 hour(s) 33 min(s) 06 sec(s) after system power on : Wireless MAC address 00:04:20:17:45:C8 has connected with the device
(this is the same MAC address as can be found printed on the
underside of the SB Duet receiver)
- There are no DHCPREQUEST messages with this MAC address in the
DHCP-server's log
- The Duet receiver has not shown up in SqueezeCenter again (it just
shows my SB Radio, which also is in the same LAN. The SB Radio could
configure the new WPA key using the GUI on the Radio itself, so it
has been working all the time)

Does anyone know what I could do to debug this further?

I got an awful lot of error messages about "uninitialized value" from
"Net::UDAP" when doing the configuration commands, so I don't know how
well it worked (my current perl version is 5.20.2).

However, the fact that I saw the MAC address in the Access Point's log,
seems hopeful...?

Thanks!


- Steinar

w3wilkes
2016-03-28, 08:53
A couple of basic questions...

Do you have the receiver Ethernet attached? This is required.
Did you factory reset the receiver after you Ethernet attached it? To factory reset hold the front button until you get a fast red blink.
Once these have been done you should be able to start and use Net::UDAP to configure your receiver.

I've used the Windows Net::UDAP a couple of times and it worked fine provided I started with the receiver being Ethernet attached and being in the factory reset state.

steinarb
2016-03-28, 10:25
>>>>> w3wilkes <w3wilkes.7dat7z (AT) no-mx (DOT) forums.slimdevices.com>:

> A couple of basic questions...

> Do you have the receiver Ethernet attached? This is required.

Yep.

> Did you factory reset the receiver after you Ethernet attached it?

No. I didn't know how.

> To factory reset hold the front button until you get a fast red blink.

Now I know how...! Thank you! :-)

I have plugged in the RJ45 cable, plugged the power out and back in, and
pressed the plug until the front light blinks red.

Then I started Net::UDAP shell, ie.
cd ~/git/net-udap
./scripts/udap_shell.pl

Then I did the following commands in the UDAP shell:
discover
conf 1
set interface=0 wireless_mode=0 wireless_region_id=14 wireless_SSID=MySSID wireless_wpa_on=1 wireless_keylen=1 wireless_wpa_psk="Top Secret!" lan_ip_mode=1 squeezecenter_address=192.168.1.150
save_data
reset
(this time I got no error messages)

But the status is still the same :-/ :
- The MAC of the SB Duet receiver repeatedly connects to the Access Point
- There are no entries for the MAC of the DB Duet receiver in the DHCP server log
- The SB Duet Receiver does not show up in my SqueezeCenter

I have tried powering off and on the SB Duet receiver (plugging the
power out and back in) with the RJ45 cable disconnected, but the SB Duet
receiver still hasn't shown up in the DHCP logs or in SqueezeCenter,
unfortunately.

After powering the SB Duet receiver on, the light first goes red, and
then goes white.

Was it supposed to end up in a different colour? Green, perhaps?

> I've used the Windows Net::UDAP a couple of times and it worked fine
> provided I started with the receiver being Ethernet attached and being
> in the factory reset state.

Yes, when I tried the commands
conf 1
set interface=0 wireless_mode=0 wireless_region_id=14 wireless_SSID=MySSID wireless_wpa_on=1 wireless_keylen=1 wireless_wpa_psk="Top Secret!" lan_ip_mode=1 squeezecenter_address=192.168.1.150
save_data
reset
after having reset the Duet receiver using the front button, there were
no error messages containing the text "Uninitialized value ...".

So I guess it was the missing reset of the SB Receiver rather than perl
version that caused the error messages.

But thanks for taking me a bit further! :-)

I will read the Net::UDAP documentation more closely to see if there was
a step I've missed.

steinarb
2016-03-28, 13:26
>>>>> Steinar Bang <sb (AT) dod (DOT) no>:

> I will read the Net::UDAP documentation more closely to see if there was
> a step I've missed.

Ok, I did that, and now it's working! :-)

I reconnected the Duet receiver to the cabled network, disconnected and
reconnected the power plug, pressed the button on the front panel until
the light started blinking rapidly red, and then followed the
instructions on the "getting started" page
http://projects.robinbowes.com/Net-UDAP/trac/wiki/GettingStarted
with the actual "set" command picked from
http://projects.robinbowes.com/Net-UDAP/trac/wiki/SampleUsage#WirelessWPA1DHCP
(using my own values for wireless_SSID, wireless_wpa_psk, and squeezecenter_address)

Thanks! :-)

To summarize what I did to get things working, with Net::UDAP running on a debian "jessie" computer (for someone discovering this while googling for a solution):

1. Get the Net::UDAP source on the "jessie" computer:
mkdir -p ~/git
cd ~/git
git clone https://github.com/robinbowes/net-udap.git

2. Get the missing debian-provided perl modules, as root do the following commands:
apt-get install libterm-shell-perl libio-interface-perl

3. Manually install the Log::StdLog perl module (not provided by debian as far as I could tell):
1. Download and unpack the Log-StdLog-v0.0.3.tar.gz file from http://search.cpan.org/~dconway/Log-StdLog-v0.0.3/lib/Log/StdLog.pm
cd /tmp
wget http://search.cpan.org/CPAN/authors/id/D/DC/DCONWAY/Log-StdLog-v0.0.3.tar.gz
tar zxf Log-StdLog-v0.0.3.tar.gz
2. As root, build and install the Log::StdLog perl module:
cd /tmp/Log-StdLog-v0.0.3
perl Build.PL
./Build
./Build test
./Build install

4. Connect the Duet receiver to the same ethernet segment as the debian computer, using a cabled network connection

5. Power on the Duet receiver with the cabled connector plugged in

6. Press the button on the front of the Duet receiver until the light starts blinking _rapidly_ red (it blinks slowly red at first, but keep the button pressed a little longer)

7. Follow the instructions on the Net::UDAP Getting Started page: http://projects.robinbowes.com/Net-UDAP/trac/wiki/GettingStarted
Replace the "set " command with the desired network configuration fetched from this page: http://projects.robinbowes.com/Net-UDAP/trac/wiki/SampleUsage
(See the "Complete Examples" section for something that fits)

And that's it. After this the Duet receiver will connect to the Wi-Fi
network, request and get a DHCP lease and connect to the SqueezeCenter.

w3wilkes
2016-03-28, 21:19
Glad you got it working! You're right, holding the front button long enough to get the fast (rapid) red blink is required for factory reset and is the key to being able to access the receiver from Net::UDAP.