Squeezeslave on the WL-520GU

Discussion about my Wifi Radio project at http://mightyohm.com/wifiradio/ or my WL-520gU talk at NOTACON.

Squeezeslave on the WL-520GU

Postby Braklet » Tue Dec 20, 2011 11:54 am

After building Jeff's WiFi radio as described in his recipe, I decided to attempt better integration with my Logitech Squeezebox network by running Squeezeslave on the router. Got it working although it isn't particularly stable; sometimes it'll play for 30 minutes, sometimes it'll play for 30 seconds and lock up requiring power cycle. I'm still debugging it but suspect that Squeezeslave taps out memory resources on the 520GU. (I plan to try a refurb 500W with twice the memory and a faster processor, but that can wait for another thread.)

You can find prebuilt Squeezeslave binaries for many platform here:

http://code.google.com/p/squeezeslave/downloads/list

The one you want is:

http://code.google.com/p/squeezeslave/downloads/detail?name=squeezeslave-oss_1.1-r281_brcm47xx.ipk&can=2&q=

[i.e. the Squeezeslave linked to the OSS libraries, for the brcm47xx target]

You CAN NOT use Jeff's OpenWrt kamikaze firmware as it's built for the brcm-2.4 target! You CAN NOT use the openwrt.org prebuilt brcm47xx firmware as the default configuration breaks wireless on the WL-520GU! Your only choice is to build your own OpenWrt kernel.

If you need basic information on building OpenWrt, see http://wiki.openwrt.org/doc/howto/buildroot.exigence. I used the stable backfire stream with backported fixes, i.e.

Code: Select all
svn checkout svn://svn.openwrt.org/openwrt/branches/backfire


When you run "make menuconfig," choose Broadcom BCM947xx/BCM953xx as your target system. Choose Broadcom BCM43xx WiFi as your target profile. Select Kernel Modules -> Wireless Drivers -> kmod-b43 and hit Enter. Select Configuration -> b43 firmware version. Make sure you select "Firmware 410.2160 from driver 4.150.10.5 (stable)" otherwise the WL-520GU wireless will lock up when enabled! Select your other configuration items as described in Jeff's recipe. Build your firmware.

Load the resulting openwrt-brcm47xx-squashfs.trx on your router, telnet in and configure wireless to tap into your WLAN. You may be able to use the default openwrt.org package directory although I just set up my own HTTP server to point at the new packages directory produced during my OpenWrt build. Update opkg on your router ("opkg update").

Use wget to pull the Squeezeslave binary onto the router filesystem, e.g.

Code: Select all
wget http://<your HTTP server>/squeezeslave-oss_1.1-r281_brcm47xx.ipk


Install Squeezeslave:

Code: Select all
opkg install squeezeslave-oss_1.1-r281_brcm47xx.ipk


That should pull any required dependencies as well.

You can invoke Squeezeslave from the telnet shell:

Code: Select all
/usr/bin/squeezeslave --retry <squeezebox server IP>


It works for me, other than stability issues.
Braklet
 
Posts: 14
Joined: Tue Dec 20, 2011 10:44 am

Re: Squeezeslave on the WL-520GU

Postby gerben » Tue Dec 20, 2011 1:15 pm

You CAN NOT use the openwrt.org prebuilt brcm47xx firmware as the default configuration breaks wireless on the WL-520GU!

Is this the cause of the problem this guy is having?
viewtopic.php?p=2236#p2232
User avatar
gerben
 
Posts: 163
Joined: Sat Oct 16, 2010 8:41 am
Location: Netherlands

Re: Squeezeslave on the WL-520GU

Postby Braklet » Tue Dec 20, 2011 2:02 pm

gerben wrote:Is this the cause of the problem this guy is having?


Possible I suppose; it has been a while since I tried to run the prebuilt backfire on my 520GU so I don't remember all of the symptoms other than "it don't work."

Once you get over the curve and build your first kernel, it is a lot easier to run experiments changing configuration. I think I got the tip to change the embedded wireless firmware back to the stable version in this forum, in fact.
Braklet
 
Posts: 14
Joined: Tue Dec 20, 2011 10:44 am

Re: Squeezeslave on the WL-520GU

Postby Braklet » Tue Dec 20, 2011 2:14 pm

I'm running another experiment: reconfigured my 520GU to access my Squeezebox Server via wired Ethernet instead of wireless. Has stayed up playing a random song stream for 75 minutes now, longer than any wireless attempt.

If it stays up overnight, then there is some nasty interaction between the b43 wireless driver and Squeezeslave.
Braklet
 
Posts: 14
Joined: Tue Dec 20, 2011 10:44 am

Re: Squeezeslave on the WL-520GU

Postby Braklet » Tue Dec 20, 2011 2:20 pm

Braklet wrote:If it stays up overnight, then there is some nasty interaction between the b43 wireless driver and Squeezeslave.


Scratch that, I just checked and it died somewhere around the 80-85 minute mark. sigh

I can ping the static IP connection I left on the wireless interface, but I can't ping the DHCP address pulled by the Ethernet. Also can't telnet in to any address.
Braklet
 
Posts: 14
Joined: Tue Dec 20, 2011 10:44 am

Re: Squeezeslave on the WL-520GU

Postby dr_parky » Thu Dec 22, 2011 8:34 pm

Hi,

I've hacked the Asus as per the instructions on the site as well.
I love the idea of using this as a squeezebox - so was very interested in your posts.
I was wondering if anyone has tried a workaround of using shoutcast and the winamp DSP plugin to take the output from the softsqueeze player running on a PC and broadcast that as a stream to the asus - you would control it via the computer or smart phone. (I've been using the Iphone app - which works very nicely) , I got tunein and slacker setup and running fine on the PC , but there is a long delay from the broadcast starting on the PC and the stream playing on the router.

Has anyone else tried this approach ? (I've been playing with my main pc to get things up and running - but I have a Sage TV server hooked up in the basement that I can use if needs be) - it feels a bit kludgy - so if you figure out the issue with the router - I would love to know how !

Cheers

Mark
dr_parky
 
Posts: 2
Joined: Thu Dec 22, 2011 5:37 pm

Re: Squeezeslave on the WL-520GU

Postby Braklet » Fri Dec 23, 2011 10:01 am

dr_parky wrote:I was wondering if anyone has tried a workaround of using shoutcast and the winamp DSP plugin to take the output from the softsqueeze player running on a PC and broadcast that as a stream to the asus - you would control it via the computer or smart phone.


You can use your 520GU as a simple Squeezebox by just pointing mpd at the regular old Squeezebox Server web streaming interface (http://<server>:9000/stream.mp3). I do this via /etc/init.d/mpd init script and when I use Jeff's older Kamikaze firmware it is rock solid. That solution seems simpler than using another Squeeze player as a proxy, although I'm sure your technique can work.

However, using mpd instead of squeezeslave as your player means you give up things like volume control in Squeezebox Server, and multiple player synchronization which I've grown to really like.

I believe the player delay you experience is a direct result of mpd buffering. You can tune the audio buffering values in /etc/mpd.conf; I played with that a little bit and it definitely makes a difference.

I pretty much gave up on getting squeezeslave to run reliably on my 520GU, the system seems to crash when CPU taps out and I got tired of wrestling with its limited memory. I just loaded Jeff's binaries on it and use it as described above, works great except no remote volume control and no sync.

I got a refurbished ASUS WL-500W with 2x the memory and a slightly faster processor to play with; at present I'm wrestling with the USB audio card.
Braklet
 
Posts: 14
Joined: Tue Dec 20, 2011 10:44 am

Re: Squeezeslave on the WL-520GU

Postby dr_parky » Sat Dec 24, 2011 8:44 pm

Thx Braklet,

I was looking at the shoutcast solution because I didnt think Slacker and Pandora worked on the webstreaming ?

It would be great if you could post any updates you have on your latest attempt with the new hardware - in the meantime - I'll have a play with mpd.conf and see if I can get rid of the annoyting delay !

Thanks and merry Christmas.

cheers

Mark
dr_parky
 
Posts: 2
Joined: Thu Dec 22, 2011 5:37 pm

Re: Squeezeslave on the WL-520GU

Postby Braklet » Fri Dec 30, 2011 11:24 am

Results from my WL-500W:

http://mightyohm.com/forum/viewtopic.php?f=2&t=314&p=2289#p2289

Copied here:

In case anybody Googles the WL-500W and hits this thread, I was able to stream audio on mine using the latest Backfire brcm-2.4 target. I ended up building my own although you could probably use the openwrt.org binaries as well.

You must load the "kmod-brcm-wl-mimo" driver to get wireless working on the 500W.

You must load the "kmod-usb-uhci," "kmod-usb-uhci-iv" and "kmod-usb2" drivers to get USB working on the 500W. This platform doesn't need the "kmod-usb-ohci" driver.

I ended up having to use ALSA, so load "kmod-alsa" and you'll find "alsa-utils" and "alsa-lib" useful.

"kmod-usb-audio" and "kmod-alsa" seem to conflict on the brcm-2.4 target. I didn't unload "kmod-usb-audio," I just commented out the "audio" invocation in /etc/modules.d/60-usb-audio and that allowed all programs that default to ALSA to work again. I believe OSS programs will work fine as well, since /dev/sound/* is populated as expected.

The version of MPD built in latest Backfire still causes trouble; it doesn't handle HTTP MP3 streaming correctly despite listing support for both in "mpd --version." So I had to use the following command to stream audio from my Squeezebox Server:

wget http://<squeezebox server>:9000/stream.mp3 -O - | madplay -

No remote volume control or player synchronization but this is better than nothing.
Braklet
 
Posts: 14
Joined: Tue Dec 20, 2011 10:44 am

Re: Squeezeslave on the WL-520GU

Postby Braklet » Tue Jan 10, 2012 1:59 pm

I swapped out the stock Broadcom 4321 radio that came on my WL-500W for the only Mini PCI wireless adapter currently available at Newegg, the TP-LINK TL-WN861N. This card has an Atheros AR922x chip which is fully supported by the ath9k driver available with the OpenWrt Backfire brcm47xx target (i.e. kernel 2.6.x).

Once I had that working properly, I could load the prebuilt Squeezeslave available here:

http://code.google.com/p/squeezeslave/downloads/detail?name=squeezeslave-oss_1.1-r281_brcm63xx.ipk&can=2&q=

Long story short, it runs Squeezeslave beautifully with the full compliment of Squeezebox functionality like player sync and volume control.
Braklet
 
Posts: 14
Joined: Tue Dec 20, 2011 10:44 am


Return to Wifi Radio Project / Hacking the Asus WL-520gU

Who is online

Users browsing this forum: Google [Bot] and 1 guest