Hi!
Today I made a music player out of my Asus RT-n66u and that's how I did it:
1) Compiled Merlin's firmware to get appropriate kernel modules for sound support;
2) Loaded those modules;
3) Connected USB speakers (with integrated sound card of course);
4) Installed and configured MPD;
5) Profit!
ATTENTION: You would need entware to do this!
But, I guess if you have some linux experience, then you could do it with optware too.
And that's how you could do it:
1) Download extra modules which I compiled for Merlin's FW here:
- For RT-N66U
- For RT-AC68U
2) Place this archive to the root of your USB/HDD/MMC where entware is installed (let's assume it's /tmp/mnt/sda1) and unpack it.
3) Then you need to create script, which would load sound modules on routers startup:
4) Paste next content into this file:
5) Plug in your USB sound card or USB speakers.
6) Now run this script to load modules:
7) Install mpd and mpc:
8) Now open /opt/etc/mpd.conf and uncomment next lines:
9) Also you could change some other settings, for example - location of your music folder:
playlist directory:
and mpd database:
10) Now you could run it:
11) and find mpd client for yourself. You could take a look at list of clients here: http://mpd.wikia.com/wiki/Clients
I'm using auremo for Windows.
Hope that guide would be useful for someone. If anyone could make it more user-friendly - I'll appreciate that.
Today I made a music player out of my Asus RT-n66u and that's how I did it:
1) Compiled Merlin's firmware to get appropriate kernel modules for sound support;
2) Loaded those modules;
3) Connected USB speakers (with integrated sound card of course);
4) Installed and configured MPD;
5) Profit!
ATTENTION: You would need entware to do this!
But, I guess if you have some linux experience, then you could do it with optware too.
And that's how you could do it:
1) Download extra modules which I compiled for Merlin's FW here:
- For RT-N66U
- For RT-AC68U
2) Place this archive to the root of your USB/HDD/MMC where entware is installed (let's assume it's /tmp/mnt/sda1) and unpack it.
Code:
cd /tmp/mnt/sda1
tar -xzf ./extras.tar.gz
Code:
touch /opt/etc/init.d/S80load_sound_modules
chmod +x /opt/etc/init.d/S80load_sound_modules
Code:
#!/bin/sh
SCRIPTPATH="`dirname \"$0\"`"
DRIVENAME=`readlink -f $SCRIPTPATH | sed "s/\/tmp\/mnt\///g" | sed "s/\/.*//g"`
PATHTO="/tmp/mnt/$DRIVENAME/extras"
if [ -e $PATHTO ]; then
insmod $PATHTO/soundcore.ko
insmod $PATHTO/snd.ko
insmod $PATHTO/snd-timer.ko
insmod $PATHTO/snd-page-alloc.ko
insmod $PATHTO/snd-hwdep.ko
insmod $PATHTO/snd-pcm.ko
insmod $PATHTO/snd-seq-device.ko
insmod $PATHTO/snd-seq.ko
insmod $PATHTO/snd-seq-midi-event.ko
insmod $PATHTO/snd-rawmidi.ko
insmod $PATHTO/snd-seq-midi.ko
insmod $PATHTO/snd-mixer-oss.ko
insmod $PATHTO/snd-pcm-oss.ko
insmod $PATHTO/snd-usb-lib.ko
insmod $PATHTO/snd-usb-audio.ko
fi
starttime=`date +%s`
diffr=0
while [ ! -e /dev/dsp ] && [ $diffr -le "600" ]; do
sleep 15
curtime=`date +%s`
let "diffr = curtime - starttime"
done
if [ -e /dev/dsp ]; then
chmod +w /dev/dsp
fi
6) Now run this script to load modules:
Code:
/opt/etc/init.d/S80load_sound_modules
Code:
opkg install mpd mpc
Code:
audio_output {
type "oss"
name "My OSS Device"
device "/dev/dsp" # optional
mixer_type "hardware" # optional
mixer_device "/dev/mixer" # optional
mixer_control "PCM" # optional
}
Code:
music_directory "/tmp/mnt/RouterHDD/Media/Music"
Code:
playlist_directory "/tmp/mnt/RouterHDD/Media/.mpd/playlists"
Code:
db_file "/tmp/mnt/RouterHDD/Media/.mpd/database"
Code:
/opt/etc/init.d/S89mpd start
I'm using auremo for Windows.
Hope that guide would be useful for someone. If anyone could make it more user-friendly - I'll appreciate that.
Last edited: