Building a Wifi Radio – Part 2, Choosing an Embedded Platform

This is the second part of an ongoing series about building a low cost, open source streaming internet radio.  if you haven’t already, check out part one for some background about the project.


In part one, I discussed the merits of streaming internet radio and the motivations for my Wifi Radio project.  Now it’s time to start looking at what hardware can make this project a reality.  Before we get started, let’s review the requirements list from last time.


  • Wireless connectivity through existing Wifi network
  • Audio output (preferably 44kHz, 16 bit stereo)
  • An integrated amplifier and speaker(s)
  • Shoutcast/MP3 streaming audio decode
  • Several builtin station presets
  • A display to indicate the station and currently playing song
  • Simple user interface, using standard radio controls (volume, tune, etc)
  • 110VAC operation

There are two additional requirements that I implied in the first post but forgot to include explicitly:

  • Cheap, priced below a commercial streaming radio – target < $100.
  • Small size so it can be portable (no desktop PC’s allowed!)

Selecting the hardware:

How do these requirements translate into hardware?  Let’s take a stab at what features we’d like in an embedded platform.

  • A wireless interface
  • Audio output
  • Sufficient system resources (CPU, memory, etc.) to decode MP3s
  • Some extra IO for a control panel and display
  • Low cost
  • Small size
  • Ease of development

The size and cost aspects pushed me towards an embedded system instead of a small form factor PC like any of Shuttle’s XPC offerings or a nano-ITX board.  To me, “Ease of development” equals Linux, so I wanted something well supported by Linux and an active open source development community.

There are quite a few embedded Linux platforms out there, with a wide variety of prices and features.  I looked at a few of them, including:

  • The Tin Can Tools Hammer – very impressive ARM9-based board with USB, lots of RAM and flash, lots of IO, and best of all the footprint of a 40-pin DIP package (breadboard compatible!).  No wireless and relatively steep pricetag ($160).

  • TI‘s Beagle Board – Incredible featureset including DVI output and a 600MHz ARM Cortex core.  No wireless and price is stunning for what you get, but overkill for this project ($150).  (Must keep in mind for future projects!)

    ASUS WL-520gU Wireless Router

  • Consumer wireless routers like the Asus WL-500gP v2 and WL-520GU – builtin wireless (yay!), USB, 240MHz Broadcom 5354 core, decent RAM and flash, cheap. Newegg has the WL-520GU for an incredible $26 after rebate (normally $50). The higher end WL-500g has more memory and flash and an integrated USB 2.0 hub (2 external ports).  Newegg has the WL-500g Premium V2 for $50 after rebate (normally $80). Both versions are a steal for what you get.

Tiny, under $50 and with built-in wireless, the Asus WL-520GU is the clear winner for this project.  The downside?  Since this router was never intended to do anything other than, well, route, we’re going to have to crack it open, modify it, and void the warranty.  In addition, there is no tech support and we’re going to have to spend some extra time hacking around to get it to do what we want.

Here it is in all it’s glory:

Asus WL-520GU Wireless Router Asus WL-520GU Wireless Router

Here’s a sneak peak of the inside:

Asus WL-520GU Wireless RouterAsus WL-520GU Wireless Router

This router is supported by OpenWRT, an open source Linux distribution for small embedded devices.  Ignore the work-in-progress designation, it works, trust me!

Although the router lacks builtin audio, that is easily solved with an $8 SYBA SD-CM-UAUD USB Stereo Audio Adapter. There have been reports that the WL-520GU only supports USB 1.1 reliably, but USB audio doesn’t require USB 2.0 so it’s not an issue for us.  For full USB 2.0 support, look at the WL-500gP v2 instead.

So far we have $58 into the project ($38 if you are lucky enough to get the rebate) and we have an embedded Linux computer, a wireless interface, and an audio output.  Not bad!

That’s it for part two!  In part three I’ll install a serial port on the router and get ready to reflash the stock firmware with OpenWrt.  At that point we’ll be able to start listening to some tunes!

Update: I posted detailed specs for the WL-520GU and a couple more photos here.

Update 2: I posted some images of the $8 USB-Audio Adapter I am using as well.

Update 3: Part three is now available.

Update 4: There is a new Wifi Radio Discussion Forum, hop over there to ask questions about the project or see what other people are working on!  (4/12/09)

23 thoughts on “Building a Wifi Radio – Part 2, Choosing an Embedded Platform”

  1. Hi.

    I would like to do something similar but I want to input audio to the router from an external audio source (such as a cd player or something). Then I want to broadcast that audio input through my lan.

    Is it possible to input audio instead of outputing it.

    Thanks a lot.

  2. Hi Jeff: Only one couple of question, If this mod can be used for streaming alive voice and music via internet from point to point ? and if instead of sound adapter one can use a “usb speaker” that is cheaper than usb audio adaptor? And if you may send one email for another consultation. Thanks

    1. kabukicho2001 –

      You could use this for point to point streaming if you set up a Shoutcast audio server on the transmitting end (a PC). I have used Nicecast to do this before, with acceptable results:

      Unfortunately the link would only be one direction, from the PC to the router, not vice versa.

      I have no idea if the USB speaker will work, it depends on the chipset used and whether it is supported by OpenWrt. The only adapter I have tested is the SYBA adapter I link to in the tutorial. I have no experience with other USB-audio adapters.


  3. Nice series of articles. Would be even better if you learned that “it’s” should not be spelled with an apostrophe, except when you mean “it is.”

  4. Now i think there is a more suitable patform, the nanostation routerstation (50 € aprox.)
    more powerful and kamikaze installed by default, with 1 usb port, 32MB SDRAM, 8MB Flash, cpu Atheros AR7131 MIPS 680MHz.

    The minor incovenient is that it comes without case.

    And i have a question ¿do you know another usb sound adapters?, i wish to know if conceptronic usb sound adapter (CSOUNDU) works on openwrt.


  5. Buddy, about the speech output:
    Look at the discussion thread in part 8.
    i’ve implemented a simple user interface using the red button of the WL-520GU,
    and I’ll try to add playlist/folder navigation using espeak.
    I’m not sure wether espeak will fit into the internal flash, but I’ll try it.
    Any contribution will be welcomed.

  6. Nice project, although I think I’ll forego the serial port (I’m all thumbs). One thing that’s kept me from a streaming Internet radio (besides the price) is that they’re woefully inaccessible to blind users…so I’ve been interested in a project like this. I’d like to see controlling it with a USB numeric keypad and having speech output (say, using espeak). And I like my WL-520GU so much, I do think I’ll buy one just to play with for this project. Router+USB sound dongle+USB hub, I already have a numeric keypad.

  7. Wow, thanks for posting this! I was just about to buy the router and audio interface from newegg, to build my own, but the tiny $8 interface adds $7 to the shipping, which convinced me to look for cheaper options.

    Any idea if this will work:

    The description make it look almost the same, but I can’t find the chipset anywhere.
    If anyone is interested, DX has a slightly more expensive one with a volume control, and the same chipset as the newegg one:

    But I’d rather go cheap if possible 🙂

  8. Foo –

    Part three is up now. The post was getting long so I decided to break OpenWrt into part 4, but this should get you started.

    To complete this project you’ll need soldering skills and some level of comfort hacking around with Linux and/or a willingness to learn. I can’t promise you won’t have to write a line of code but I plan to post everything I create for this so you can at least use my work as a starting point.

  9. Very excited about this project, I have been looking at the options out there, but just couldn’t justify the money.
    Question: Am I going to be able to copy your project from an experience point of view? I am fairly handy at soldering, modify equipment physically doesn’t scare me, but rewriting code or coming up with my own, not so much. If I can make the electronics connections, will you have source code to download?
    Also, hurry up and get part 3 up! My router and usb wil be here from newegg tomorrow! 🙂
    BTW, router is down to $26 with rebate.

  10. Z –

    I’m using OpenWRT, which sets up a full cross compiler when you install it. It will run on Linux or OS X (although it’s more painful on the Mac). I’ve been able to port a couple simple programs although I am not an expert by far – I found that almost everything I needed was already included as an addon package to the main OpenWRT distribution.


  11. If you could please give a detailed rundown of how to setup a cross compile environment, that would be huge! I’ve never quite been able to get one setup well enough to compile applications, and I want the exact same thing you do, a cheap streaming radio bridge for my garage. You might also want to look at a Sondingo unit, had whitelabel versions from C-Media, the OEM, for sale, and they’ve got audio outs built right in.


  12. “Me” – sorry I missed your comment earlier. I added the serial port so I could see the stock firmware boot messages, watch the reflash process status, and eventually I’ll be using it to connect an LCD display and the rest of the user interface. It’s also really nice to have a reliable terminal that doesn’t rely on proper network configuration.

    Craig/Chris – I’m planning to add an LCD display and a tuning control. A webserver for configuration would be great. At a minimum, mpd (the linux music player I am planning to use) supports many clients, including the iphone, for network control.

  13. I’ll ask a dumb question. How do you control it? I’m guessing through a web browser using a computer on your network. It’s a cool idea.

  14. Matt – Absolutely. I have had OpenWRT running for a couple weeks without any major issues, and I am currently using mpd to play streaming music. There is not much of a user interface, yet. My next post will cover the OpenWRT install (and I’ll provide a flash image), hopefully I’ll have it up later this week.

  15. Hey, very cool! I’ve been looking for a cheap, USB host router for a long time after I fried my WGT634U :-(. I’ll have to give the ASUS a try! Have you gotten OpenWRT up on it yet?

  16. I’m curious about why you’re installing the serial port… you can flash these guys via the LAN by using the Asus firmware utility. I flashed mine with DD-WRT, which also works great.

  17. Ulf –

    I had not heard of the Overo before. I will be very curious to see what the price is when it comes out of beta. Integrated wireless would be a huge plus.

    Thanks for the link!

Leave a Reply