Make an OpenWRT WebRadio with Wr703n: Difference between revisions
Line 63: | Line 63: | ||
} | } | ||
# | # | ||
Now restart mpd | |||
$ /etc/init.d/mpd restart | |||
=Play the stream= | |||
Make sure the usb-audio dongle is connected. | |||
Then run these two command below: | |||
$ mpc add http://media-ice.musicradio.com:80/ClassicFM | |||
$ mpc play |
Revision as of 19:37, 13 January 2019
Overview
This will build a small webradio that plays a radio from the web as soon as powered up.
We will play this radio below for the example.
http://media-ice.musicradio.com:80/ClassicFM
More radios addresses can be obtained from these sites below.
http://www.listenlive.eu/
https://www.internet-radio.com/
Hardware
1
WR703N Note the unit must have 16MB flash. Default factory units won't work.
1 USB to audio adaptor
Operating System
We will use OpenWRT LEDE 17.01.
Network setup will not be covered here. We assume the unit has access to the internet.
Install Packages
First run
$ opkg update
Then install packages
$ opkg install kmod-usb-audio mpc mpd
todo: are kmod-sound-core kmod-usb-ohci alsa-utils needed?
Setup Mpd
Edit the /etc/mpd.conf file. (Sound quality will be poor if not using alsa)
$ vi /etc/mpd.conf
Uncomment the lines to use alsa. These can be found at line 208. The text should look as this below:
# Audio Output ################################################################ # # MPD supports various audio output types, as well as playing through multiple # audio outputs at the same time, through multiple audio_output settings # blocks. Setting this block is optional, though the server will only attempt # autodetection for one sound card. # # An example of an ALSA output: # audio_output { type "alsa" name "My ALSA Device" device "hw:0,0" # optional ## mixer_type "hardware" # optional ## mixer_device "default" # optional ## mixer_control "PCM" # optional ## mixer_index "0" # optional } #
Now restart mpd
$ /etc/init.d/mpd restart
Play the stream
Make sure the usb-audio dongle is connected.
Then run these two command below:
$ mpc add http://media-ice.musicradio.com:80/ClassicFM $ mpc play