Wireless Router Audio Player
What is this?
This is a wireless audio device, created from a cheap wireless router, capable of playing internet radio streams or music on its USB flash drive. It requires only a 12v power source so power consumption is very low. A custom web page controls the music and volume. Perfect for daily office music or for listening at night while sleeping (since there are no moving parts to add noise).
The parts and pieces...
- Belkin SHARE MAX N300 - $22 at the time Expansys.com (or any compatible router)
- USB audio adapter (3D 5.1) - $2 – eBay
- 2GB USB drive - $5 - You probably have one in a junk drawer
- Speakers - this will vary in price, any will do but quality is king when selecting speakers.
The Belkin SHARE MAX N300 routers have a lot of nice features for the money. Gig ports, wireless 802.11 BGN, 2 USB 2.0 ports - all for $22 shipped. Any Broadcom based router that can run the Mega build of DD-WRT should work though. I bought the USB audio adapter on Ebay and it was less than $2 shipped! I was concerned about the quality but I am pleasantly surprised. I used an old 8GB drive I had laying around, but 2GB should be plenty if you have a spare. For speakers, you can spend a lot or a little. Quality usually follows that scale also. I had an old broken BOSE Sound Dock that I gutted (sounds really nice). I also had to remove the USB from the plastic case to get it to fit with the audio adapter. You could use a USB hub though and just tape it to the exterior of the router if you want.
Overviw of the setup...
Here are the steps needed to convert the router into a mini music player.
- Convert the router's OS to DD-WRT
- Add Optware The Right Way (OTRW) which adds even more features to DD-WRT
- Configure USB audio device with the needed software
- Load the web page for audio controls (setup and download soon)
Start the process of converting to DD-WRT by download the following files:
W A R N I N G - before you start... The files below are for the Belkin ShareMax N300 wireless router - not not use any other firmware. *****YOU RISK BRICKING IF THE FIRMWARE DOESN'T MATCH YOUR ROUTER!****
Once you have both files, log into the Belkin router at 192.168.2.1 and set the factory defaults. Once that is done do a 30/30/30 reset (Hold reset button for 30 seconds, unplug power with reset button still held in for 30 seconds and plug power back in while still holding the reset button for 30 more seconds.)
Once that is done, make double sure that your PC is plugged into one of the four LAN ports on the back of the Belkin router and you set your PC's static IP address to 192.168.2.8 with subnet 255.255.255.0 If your using a NOTEBOOK make sure your DISABLE the WIFI radio before attempting this!
If you double checked and it's right refresh your browser at 192.168.2.1. You should now see a CFE Web Browser page that tells you to browse for a file.
Browse for the file and point it to the dd-wrt.v24-18946_NEWD-2_K2.6_mini_f7d3301.bin file first. Click upload it should tell you that it received the upload and it's now rebooting. *VERY IMPORTANT* DON'T DO ANYTHING ELSE FOR THE NEXT 5 to 10 minutes and make sure you don't reset the router etc. Don't wait for it to finish, just give it a good 10 minutes!
Once done, change the static IP address on your PC to 192.168.1.8 with the same subnet of 255.255.255.0
Now open your browser and go to 192.168.1.1 You should now see DD-WRT firmware. Now change the root password make sure you save it and then from the administration tab click on firmware upgrade. Point it to the file dd-wrt.v24-18946_NEWD-2_K2.6_mega.bin and click upgrade. This will take another 6 or so minutes roughly, so let it do it's job and come back in 10 minutes!
Once this completes you should be in eko's new mega build! Open up your browser to 192.168.1.1 and start using DD-WRT. For those who are going to use this router as a client bridge or repeater bridge, if your primary router is on 192.168.0.1 for example, you need to change the Belkins IP address to coincide with your primary router's network setup, so change it to 192.168.0.2 or something along the same path of 192.168.0.x..
NOTE: It takes about a minute for this sucker to boot and even show a first light. Don't worry if you plug it in and it appears dead, give it a while before you see the light come on.
Decide on how you want to connect your router. You could simply plug your router into your current network with a patch cable or you could setup a client bridge using the wireless radio of the router. This is the way I went. Now I can locate the router anywhere in the house. Don't forget to change the default IP address from 192.168.0.1 (if this is your default router's IP address).
Load Optware The Right Way (OTRW):
Follow this Format and Partition Guide to setup the USB HDD with the correct partitioning, correct order, and file-system formats for OTRW. I setup my partition table as follows:
- Optware (512MB) – ext3
- SWAP (64MB) - swap
- Data (remaining space) – ext3
From the DD-WRT web interface, select the Services tab, and then the USB service tab. Enable all the USB options, and select /opt in the drop down list for the Disk Mount Point. Click [Apply]
Plug in the USB drive and then plug in your USB audio device. ***Remember to also connect a set of speakers/headphones at some point as well.
Telnet to the router using the username and password you setup during the firware update.
At the prompt, run the following command (minus the # prompt):
# wget -O /tmp/prep_optware http://wd.mirmana.com/prep_optware
# sh /tmp/prep_optware
This process will take 20 or so minutes later and then the install will complete. Wait 3 minutes more then type reboot. This time when the router boots it will load the OTRW from the USB drive after its normal startup. Optware (like any addon) needs 2-3minutes to load completely after the routers network comes back online. Be patient
Setup the USB audio adapter and software:
Telnet to the router and turn on the sound modules:
# service soundmodules on
# service soundmodules start
Verify the sound drivers worked. You should see the LED light on the USB sound adapter. Also, you can run dmesg and look for snd-usb-audio to verify the sound is loaded.
Run the following commands to load the audio libraries and applications (minus the # prompt):
# ipkg-opt install flac
# ipkg-opt install libid3tag
# ipkg-opt install libmad
# ipkg-opt install libsndfile
# ipkg-opt install libvorbis
# ipkg-opt install speex
# ipkg-opt install alsa-lib
# ipkg-opt install alsa-utils
# ipkg-opt install mpg123
Load custom soundcore and alsa modules from DD-WRT user Gregd72002:
# cd /tmp
# wget http://www.penguinbyte.com/downloads/kmod-usbsound_184.108.40.206_mipsel.ipk
# ipkg install kmod-usbsound_220.127.116.11_mipsel.ipk
Reload the router and wait the customary 3 minutes to let the USB drive load all the needed files.
Test the audio
By default, the audio volume for the USB adapter is set to 150 when the router boots. The scale for the volume is from 0 to 150. To test, set the volume at 50 (about 33%). Run the following to adjust the volume: amixer set Speaker 50
At this point you should be able to play music. If you have music on the disk, you could play it form there like mpg123 /path/to/file. I use SHOUTcast and will be streaming music. Here is example to stream from the internet: mpg123 http://ice.somafm.com/groovesalad
The RAP audio player software is still a work in progress. I mainly use the player to kick off at night to start playing music so I can sleep. But I also use the GUI to kick off music during the day. If you are interested in the software shoot me an email and I will share the code.
Here is a screenshot of the current player: