Make an OpenWRT WebRadio with Wr703n: Difference between revisions

From lechacal
Jump to navigation Jump to search
Line 38: Line 38:
=Setup Mpd=
=Setup Mpd=


Run these commands below:
Edit the /etc/mpd.conf file. (Sound quality will be poor if not using alsa)


  $ cd /root
  $ vi /etc/mpd.conf
$ mkdir .mpd
$ mkdir music
$ mkdir .mpd/playlists


Now edit the /etc/mpd.conf file
Uncomment the lines to use alsa. These can be found at line 208. The text should look as this below:


  $ /etc/mpd.conf
  # 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
}
#

Revision as of 19:34, 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
}
#