New wrtradio v0.2 firmware!

Discussion about my Wifi Radio project at http://mightyohm.com/wifiradio/ or my WL-520gU talk at NOTACON.
Post Reply
ilinux
Posts: 55
Joined: Mon Jul 06, 2009 2:36 am

New wrtradio v0.2 firmware!

Post by ilinux »

I make a new release of wrtradio firmware.

The firmware is here: http://www.sandrofabbro.com/wrtradio/v0.2/

The image size is 3.3 MB and include all the need for this project.

The serial interface and other configuration is readymade.

For access to box you have to use ssh and use the default password "wrtradio"

For configure the box you have to edit the file in the /root directory and no other file ;)

/root/startup : For enable lcd, interface, disable wifi (will turn off wifi if you use cable on wan)
/root/lcd: For setup lcd (you have to edit)
/root/interface: For setup knot (you have to edit)
/root/radio: For add radios streams (read the comment in file)

The mpd will autostart and play the radio into /root/radio file. For add radios to /root radio file use this syntax:

mpc_pls http://www.example.com/radio.pls
mpc_pls_multi http://www.example.com/radio.pls (multiple different radio into playlist)
mpc_m3u http://www.example.com/radio.m3u

For add di.fm or sky.fm premium use winamp 256k streams:
TIP: With di.fm or sky.fm premium you can edit playlist online. Edit "My station" playlist ;)

For normal playlist:
mpc_pls http://username:password@www.sky.fm/lis ... xxxxxxxxxx

For My Station playlist:
mpc_pls_multi http://username:password@www.sky.fm/lis ... xxxxxxxxxx

And after restart mpd: /etc/init.d/mpd restart

If you want to use a usb device (keyboard,mouse,game controller) install cmdpad and configure the file /etc/cmdpad.conf
opkg update
opkg install cmdpad

If you have openwrt into box make a backup of your configuration and use mtd for flash:

cd /tmp
wget http://www.sandrofabbro.com/wrtradio/v0 ... uashfs.trx
mtd unlock linux
mtd -r write openwrt-brcm-2.4-squashfs.trx linux

The box will update and reboot. Please wait until finish.

If you don't have openwrt installed use tftp procedure

NOTE: The firmware repo don't include usb thumb or network mount tools. If you want to reflash or opdate with mtd you have to install with this commands:
opkg update
opkg install mtd
NelsonPJ
Posts: 13
Joined: Sun Jun 28, 2009 7:31 am

Re: New wrtradio v0.2 firmware!

Post by NelsonPJ »

I tried installing this, and I'm a bit confused. I've been working on my WiFi radio since last year, but yesterday I finally built the ATMEGA168 LCD interface as Jeff designed it. Previously I had been trying to do it with an Arduino, but I couldn't parse/buffer the text quickly enough, and the interface would eventually lock up. So I bought a USBTiny ISP, breadboarded an ATMega168, and got it to work! So since my radio was working for about 24 hours, I was brave and decided to try this the new firmware!

I first tried installing the TRX file using wget and mpd as in the above post, but that didn't work. I eventually reflashed the router using an FTDI cable (same method as Jeff gave to flash his original TRX).

After rebooting and SSH'ing into 192.168.1.1 with an ethernet cable connection, I edited /etc/config/wireless with my home network's info (same as I did for the previous firmware). And I rebooted again, and eventually I heard a music station play. It seems to take a lot longer to boot - but hey, it works!

Unfortunately I've found during my tinkering that sometimes when I reboot the router, I don't get ANY music playing. I wonder if the one PLS file that's loaded by default is somewhat flaky, and doesn't load sometimes?

There also doesn't appear to be any scripts for the LCD and tuner knob. From your description we're supposed to edit the "lcd" and "interface" files in the root directory (these files are mostly blank), and then uncomment the appropriate lines in the "startup" file? I tried copying Jeff's "display2.sh" file into "lcd" and running that to see if it would display the current song, but that didn't work. I also tried running parts of Jeff's "interface.sh" as the "interface" file, but I couldn't get that to work either. Hmmm... I'm puzzled.

ilinux - have you successfully interfaced with an LCD and tuner knob the same way Jeff did? Is the serial port setup the way Jeff did in your TRX install?
NelsonPJ
Posts: 13
Joined: Sun Jun 28, 2009 7:31 am

Re: New wrtradio v0.2 firmware!

Post by NelsonPJ »

As a followup, I rebooted my router again, and didn't hear music. I then SSH'ed into the router, logged in, and then typed "mpc". I got this response, which I guess indicates the station from the default PLS is a bit flaky?

root@wrtradio:~# mpc
volume: 99% repeat: off random: off single: off consume: off
ERROR: problems decoding "http://scfire-ntc-aa03.stream.aol.com:80/stream/1009"
root@wrtradio:~#


This is from this PLS file in the "radio" file:

mpc_pls http://www.di.fm/mp3/lounge.pls

Opening up that PLS file manually gives:

Code: Select all

[playlist]
NumberOfEntries=8
File1=http://scfire-ntc-aa03.stream.aol.com:80/stream/1009
Title1=D I G I T A L L Y - I M P O R T E D - Lounge - sit back and enjoy the lounge grooves!
Length1=-1
File2=http://scfire-ntc-aa04.stream.aol.com:80/stream/1009
Title2=D I G I T A L L Y - I M P O R T E D - Lounge - sit back and enjoy the lounge grooves!
Length2=-1
File3=http://scfire-mtc-aa02.stream.aol.com:80/stream/1009
Title3=D I G I T A L L Y - I M P O R T E D - Lounge - sit back and enjoy the lounge grooves!
Length3=-1
File4=http://scfire-ntc-aa02.stream.aol.com:80/stream/1009
Title4=D I G I T A L L Y - I M P O R T E D - Lounge - sit back and enjoy the lounge grooves!
Length4=-1
File5=http://scfire-dtc-aa03.stream.aol.com:80/stream/1009
Title5=D I G I T A L L Y - I M P O R T E D - Lounge - sit back and enjoy the lounge grooves!
Length5=-1
File6=http://scfire-dtc-aa01.stream.aol.com:80/stream/1009
Title6=D I G I T A L L Y - I M P O R T E D - Lounge - sit back and enjoy the lounge grooves!
Length6=-1
File7=http://scfire-dtc-aa02.stream.aol.com:80/stream/1009
Title7=D I G I T A L L Y - I M P O R T E D - Lounge - sit back and enjoy the lounge grooves!
Length7=-1
File8=http://scfire-mtc-aa01.stream.aol.com:80/stream/1009
Title8=D I G I T A L L Y - I M P O R T E D - Lounge - sit back and enjoy the lounge grooves!
Length8=-1
Version=2
ilinux
Posts: 55
Joined: Mon Jul 06, 2009 2:36 am

Re: New wrtradio v0.2 firmware!

Post by ilinux »

Sorry,

A bug into the built in script.

Download this version fixed with this commands

wget http://www.sandrofabbro.com/wrtradio/scripts/mpc_pls -O /usr/bin
chmod +x /usr/bin/mpc_pls

and reboot.

Sorry I'm in wrong.

I will rebuild the image and upload this night.

Thanks for use my firmware ;)
NelsonPJ
Posts: 13
Joined: Sun Jun 28, 2009 7:31 am

Re: New wrtradio v0.2 firmware!

Post by NelsonPJ »

No problem - I'm happy to debug your new build. I'll update tonight with your new script and see if I can get it working.

Thanks for all the work you're putting into this, ilinux (and also thanks to Jeff, obviously!). This has been a fun project to work on.
NelsonPJ
Posts: 13
Joined: Sun Jun 28, 2009 7:31 am

Re: New wrtradio v0.2 firmware!

Post by NelsonPJ »

ilinux - I loaded your new mpc_pls script, and also added a few more addresses to my playlist. I notice, however, that the streams are "skipping" a lot. I added some various Shoutcast streams - not just from di.fm - but they all seem to have the same problem. Most of the time the radio doesn't play at all, although mpc reports that it's trying to play. I see the green light flashing on the USB music adapter, although I don't remember if it flashed so much before with the original firmware.

I manages to get Jeff's "interface.sh" script running in your new firmware, editing out the parts where it adds to the mpc playlist. That seems to work - and I've seen the LCD update - but with all the skipping, it's not usable as a radio. Most of the time the LCD displays a song title but nothing plays on the speakers.

Everything worked really well before flashing your new firmware - so I don't think it's a problem with my setup, router, internet speed, etc. I've built pretty much exactly what Jeff described in his articles (same ASUS WL-520GU router, same USB music adapter, ATMEGA168 LCD interface, etc). Let me know if you want any debugging info from my setup.
ilinux
Posts: 55
Joined: Mon Jul 06, 2009 2:36 am

Re: New wrtradio v0.2 firmware!

Post by ilinux »

I use different hardware brand and model but they are similar:

My router is wl500gp2
My audio is a c-media standard adapter http://www.amazon.co.uk/LINDY-USB-2-0-A ... B000QY2G2U
My internet is a standard 8MB/s in download and 512 in upload
I don't have any lcd monitor for the moment.
For test I use di.fm and sky.fm free streams but now I use the "vips" :D
I don't have any problem with the streaming uppper and lower 128 Kb/s.Have you test pls on pc how it works?
I use ethernet cable as wan interface and not wireless. Try to test this router closer to wifi ap.

I will test update script again in my router and let you know.
NelsonPJ
Posts: 13
Joined: Sun Jun 28, 2009 7:31 am

Re: New wrtradio v0.2 firmware!

Post by NelsonPJ »

I've got the Syba audio adapter that Jeff used:
http://www.amazon.com/gp/product/B001MS ... hs_product

I've got a cable modem (6MB/s downstream, I believe) and an Apple Airport Extreme (the older round version with only 802.11g, not the newer square model with 802.11n). My WiFi Radio router is using a wireless connection to play the streams, not a hardwired connection.

I've tried listening to the same streams that worked with Jeff's firmware. For some reason your version 0.2 build skips a lot when playing the streams.

Has anybody else tried the new build by ilinux?
ilinux
Posts: 55
Joined: Mon Jul 06, 2009 2:36 am

Re: New wrtradio v0.2 firmware!

Post by ilinux »

In my release I use alsa and not oss maybe is this the problem.
bbf
Posts: 11
Joined: Thu Nov 11, 2010 8:42 am

Re: New wrtradio v0.2 firmware!

Post by bbf »

hi!

Does this release decode AAC streams?

Cheers!
Post Reply