OpenWRT vs DD-WRT

Discussion about my Wifi Radio project at http://mightyohm.com/wifiradio/ or my WL-520gU talk at NOTACON.
nedix
Posts: 11
Joined: Tue Jan 07, 2014 1:10 am

OpenWRT vs DD-WRT

Post by nedix »

Hi,
Did anyone try DD-WRT instead of OpenWRT? I had an old bricked Linksys and I managed to revive last night and I flashed it with DD-WRT. At a glance, it has a nice web interface but it seems that the name of the files differs. I started with the configuration according to the tutorial and from the very beginning is different: opkg.conf in OpenWRT is ipkg.conf in DD-WRT. I didn't get to the point where I have to install the USB and the rest of the packages. Does anyone know if they are compatible with DD-WRT? Shall I expect any other issues down the road?

PS: perhaps I should've started by saying I am a newbie in this Linux/UNIX/flashing business so I tend to take the information literally. In other words, if the tutorial is saying go there and type this command and get this result and I don't get that result then I have a problem :)
User avatar
gerben
Posts: 164
Joined: Sat Oct 16, 2010 8:41 am
Location: Netherlands

Re: OpenWRT vs DD-WRT

Post by gerben »

DD-WRT is more of an all in one solution. Most used features are already installed. Also the whole filesystem is read-only (by default). You can enable a read-write filesystem by enabling JFFS. But since DDWRT has so many stuff already in it there isn't a whole lot of flash memory space left. Unless you have a device that has at least 8MB flash.
OpenWRT is a lot more light weight. And you can use the remaining space to install software to fit your needs.

Next. DD-WRT doesn't provide a software repository. It is actually using that of OpenWRT. See the irony here?

My personal conclusion is that; DD-WRT is a great if you are only using the features that it has build into it, which there are a lot of. It also has a very user friendly web-interface.
OpenWrt is a lot more flexible, but therefor also less user friendly.

I would ditch the DD-WRT, and install OpenWrt onto it.
nedix
Posts: 11
Joined: Tue Jan 07, 2014 1:10 am

Re: OpenWRT vs DD-WRT

Post by nedix »

Hi, thanks for the response.
Since I have only 4MB on the router then it means I don't have enough room to move around so it seems I will have to go with OpenWRT.

The thing is that the instructions were not too clear for me in terms of which distribution to install and where to get it from. I will have to give it another round of reading and see if it clears up.
nedix
Posts: 11
Joined: Tue Jan 07, 2014 1:10 am

Re: OpenWRT vs DD-WRT

Post by nedix »

Of course I made a mistake and flashed Attitude Adjustment! My "Windows" brain said "go ahead, it's the latest version, it should be the best, go ahead". It took me an evening and a morning to finally flash it with Kamikaze. Now it's working fine (as a router) but I receive errors when I try installing the kmod-usb-audio and mpd packages:
1. kmod-usb-audio
- when installing via LuCI - error (code 3584)
- installing via WinSCP console - error occured, return value 14
2. mpd
- via LuCI -
- via WinSCP console - package not available - the src is mightyohm and I did run opkg update first. I can even see it in the package list in /var/opkg-lists

Any thoughts?
User avatar
gerben
Posts: 164
Joined: Sat Oct 16, 2010 8:41 am
Location: Netherlands

Re: OpenWRT vs DD-WRT

Post by gerben »

What router model do you have? Your router might have a different chip than the WL520GU. Packages compiled for the WL520GU will in that case not run/install op your router.

Why did you not try Attitude Adjustment? I know the instruction of Jeff dictate the use of his own build of Kamikaze, but that was because, at that time, MPD was too large a package to fit next to the default OpenWrt install. MPD is a smaller on Attitude Adjustment (if I recall correctly). So it might just work, whereas Kamikaze will only work if you use Jeffs image. And that image is (probably) only for the WL520GU.

PS return code 14 is a Dependencies error
nedix
Posts: 11
Joined: Tue Jan 07, 2014 1:10 am

Re: OpenWRT vs DD-WRT

Post by nedix »

I have a WRT54G v2.2 and as far as I understood Attitude Adjustment is pretty big for its flash; it's more for the new generations which have a bigger (than 4MB) flash. After I flashed AA it worked extremely slow and I've spent (again) almost 2 days to get it working again. I finally reverted to DDWRT which is working smooth. The downside right now is that it is build on Whiterussian and if I try installing the usb packages it returns a kernel dependency error. I looked for the kernel package but I didn't find it in whiterussian.
So now I'm trying to make it work with Kamikaze; I managed to fix the ipkg file and it is getting the packages correctly. However, even if it starts installing the usb packages and even if it "sees" the kernel package, it still returns a dependency error (on kernel).
At this point I will try to manually copy on the flash the usb packages and see where it returns an error and try installing or adding those packages. Other options would be to "point" the opkg/ipkg.conf to Mightyohm's packages folder and run an update there.
nedix
Posts: 11
Joined: Tue Jan 07, 2014 1:10 am

Re: OpenWRT vs DD-WRT

Post by nedix »

In the end, after countless times of bricking the router, I managed to flash the .trx in the tutorial and install all the packages. However, now I have 2 problems:

Problem #1. Network configuration (the Internet "comes" via another Belkin router which is connected with the provider. This Belkin is wireless and I will refer to it as "home-router" or "home-network")
- before the Wireless chapter I had:
a. Internet connected to the router's Internet port
b. LAN on DHCP
c. Wireless disabled
d. Internet working fine, I was able to communicate with the router on the default IP: 192.168.1.1

- after Wireless configuration:
a. Wireless enabled but not connected; the Wireless LED is lit but it's not getting an IP address
b. LAN on DHCP
c. Internet connected to one of the LAN ports NOT the old WAN/Internet port
d. my PC is getting an IP address from the "home-network" and I can access the router via telnet using an WAN IP (given by the Belkin router)

Network configuration:
root@OpenWrt:~# vi /etc/config/network

#### VLAN configuration
config switch eth0
option vlan0 "1 2 3 4 5*"
option vlan1 "0 5"

#### Loopback configuration
config interface loopback
option ifname "lo"
option proto static
option ipaddr 127.0.0.1
option netmask 255.0.0.0

#### LAN configuration
config interface lan
option type bridge
option ifname "eth0.0"
#option proto static
option proto dhcp
option ipaddr 192.168.1.1
option netmask 255.255.255.0

#### WAN configuration
config interface wan
option ifname "eth0.1"
option proto dhcp


Wireless configuration:

root@OpenWrt:~# vi /etc/config/wireless

config wifi-device wl0
option type broadcom
option channel 5

# REMOVE THIS LINE TO ENABLE WIFI:
#option disabled 1

config wifi-iface
option device wl0
option network lan
option mode ap
option ssid Nedix
#option encryption none
option encryption psk2
option key xxxxxxxxx

The question is: What settings are needed for using the router in a similar way as before? I would like to have it working as a router as before + wireless enabled and for it to get its IPs depending on what is connected (wireless or WAN).

Problem #2: MPD configuration: in the MPD config file I didn't find any audio_output section

Any suggestions?
User avatar
gerben
Posts: 164
Joined: Sat Oct 16, 2010 8:41 am
Location: Netherlands

Re: OpenWRT vs DD-WRT

Post by gerben »

I don't get what you are trying to achieve. Do you want to use the linksys as a radio and wireless-accesspoint at the same time? Or do you want the linksys to connect to your home-router via wired or wireless depending on the situation?
In case of the latter you should at least change "option mode ap" to "option mode sta"

As to the mpd question. My entire OUTPUT section is commented out, so not sure if you need it. Here is the entire contents of my mpd.conf

Code: Select all

# An example configuration file for MPD
# See the mpd.conf man page for a more detailed description of each parameter.

######################## REQUIRED PATHS ########################
music_directory                 "~/music"
playlist_directory              "~/.mpd/playlists"
db_file                         "~/.mpd/mpd.db"
log_file                        "~/.mpd/mpd.log"
error_file                      "/tmp/mpd.error"
################################################################


######################## OPTIONAL PATHS ########################
#
# If you wish to use mpd --kill to stop MPD, then you must
# specify a file here in which to store MPD's process ID.
#
#pid_file                        "~/.mpd/mpd.pid"
#
# If specified, MPD will save its current state (playlist,
# current song, playing/paused, etc.) at exit.  This will be
# used to restore the session the next time it is run.
#
#state_file                      "~/.mpd/mpdstate"
#
################################################################


######################## DAEMON OPTIONS ########################
#
# If started as root, MPD will drop root privileges and run as
# this user instead.  Otherwise, MPD will run as the user it was
# started by.  If left unspecified, MPD will not drop root
# privileges at all (not recommended).
#
#user                            "nobody"
#
# The address and port to listen on.
#
#bind_to_address                 "any"
#port                            "6600"
#
# Controls the amount of information that is logged.  Can be
# "default", "secure", or "verbose".
#
#log_level                       "default"
#
################################################################


########################### ZEROCONF ###########################
#
# If yes, service information will be published with Zeroconf.
#
#zeroconf_enabled                "yes"
#
# The service name to publish.  This name should be unique on
# your local network.
#
#zeroconf_name                   "Music Player"
#
################################################################


########################## PERMISSIONS #########################
#
# MPD can require that users specify a password before using it.
# You may specify one ore more here, along with what users who
# log in with that password are allowed to do.
#
#password                        "password@read,add,control,admin"
#
# Specifies what permissions a user who has not logged in with a
# password has.  By default, all users have full access to MPD
# if no password is specified above, or no access if one or
# more passwords are specified.
#
#default_permissions             "read,add,control,admin"
#
################################################################


########################## AUDIO OUTPUT ########################
#
# MPD supports many audio output types, as well as playing
# through multiple audio outputs at the same time.  You can
# specify one or more here.  If you don't specify any, MPD will
# automatically scan for a usable audio output.
#
# See <http://mpd.wikia.com/wiki/Configuration#Audio_Outputs>
# for examples of other audio outputs.
#
# An example of an ALSA output:
#
#audio_output {
#        type                    "alsa"
#        name                    "My ALSA Device"
#        device                  "hw:0,0"     # optional
#        format                  "44100:16:2" # optional
#}
#
# An example of an OSS output:
#
#audio_output {
#        type                    "oss"
#        name                    "My OSS Device"
#        device                  "/dev/sound/dsp"   # optional
#        format                  "44100:16:2" # optional
#}
#
# An example of a shout output (for streaming to Icecast):
#
#audio_output {
#        type                    "shout"
#        name                    "My Shout Stream"
#        host                    "localhost"
#        port                    "8000"
#        mount                   "/mpd.ogg"
#        password                "hackme"
#        quality                 "5.0"
#        bitrate                 "128"
#        format                  "44100:16:1"
#        user                    "source"                # optional
#        description             "My Stream Description" # optional
#        genre                   "jazz"                  # optional
#        public                  "no"                    # optional
#}
#
# Force all decoded audio to be converted to this format before
# being passed to the audio outputs.
#
#audio_output_format             "44100:16:2"
#
# If MPD has been compiled with libsamplerate support, this
# specifies the sample rate converter to use.  Possible
# values can be found in the mpd.conf man page or the
# libsamplerate documentation.
#
#samplerate_converter            "Fastest Sinc Interpolator"
#
################################################################


############################# MIXER ############################
#
# MPD needs to know what mixer settings to change when you
# adjust the volume.  If you don't specify one here, MPD will
# pick one based on which ones it was compiled with support for.
#
# An example for controlling an ALSA mixer:
#
#mixer_type                      "alsa"
#mixer_device                    "default"
#mixer_control                   "PCM"
#
# An example for controlling an OSS mixer:
#
#mixer_type                      "oss"
#mixer_device                    "/dev/mixer"
#mixer_control                   "PCM"
#
# If you want MPD to adjust the volume of audio sent to the
# audio outputs, you can tell it to use the software mixer:
#
#mixer_type                      "software"
#
################################################################


######################### NORMALIZATION ########################
#
# Specifies the type of ReplayGain to use.  Can be "album" or
# "track".  ReplayGain will not be used if not specified.  See
# <http://www.replaygain.org> for more details.
#
#replaygain                      "album"
#
# Sets the pre-amp used for files that have ReplayGain tags.
#
#replaygain_preamp               "0"
#
# Enable on the fly volume normalization.  This will cause the
# volume of all songs played to be adjusted so that they sound
# as though they are of equal loudness.
#
#volume_normalization            "no"
#
################################################################


########################### BUFFERING ##########################
#
# The size of the buffer containing decoded audio.  You probably
# shouldn't change this.
#
#audio_buffer_size               "2048"
#
# How much of the buffer to fill before beginning to play.
# Increase this if you hear skipping when changing songs.
#
#buffer_before_play              "10%"
#
# Similar options for the HTTP stream buffer.  If you hear
# skipping while playing HTTP streams, you may wish to increase
# these.
#
#http_buffer_size                "128"
#http_prebuffer_size             "25%"
#
################################################################


########################### HTTP PROXY #########################
#
# Specifies the HTTP proxy to use for playing HTTP streams.
#
#http_proxy_host                 "proxy.isp.com"
#http_proxy_port                 "8080"
#http_proxy_user                 "user"
#http_proxy_password             "password"
#
################################################################


############################# LIMITS ###########################
#
# These are various limits to prevent MPD from using too many
# resources.  You should only change them if they start
# restricting your usage of MPD.
#
#connection_timeout              "60"
#max_connections                 "5"
#max_playlist_length             "16384"
#max_command_list_size           "2048"
#max_output_buffer_size          "8192"
#
################################################################


###################### CHARACTER ENCODINGS #####################
#
# If file or directory names do not display correctly, then you
# may need to change this.  In most cases it should be either
# "ISO-8859-1" or "UTF-8".  You must recreate your database
# after changing this (use mpd --create-db).
#
#filesystem_charset              "ISO-8859-1"
#
# The encoding that ID3v1 tags should be converted from.
#
#id3v1_encoding                  "ISO-8859-1"
#
################################################################


######################### OTHER OPTIONS ########################
#
# Try disabling this if you have MP3s which appear to end
# abruptly.  If this solves the problem, it is highly
# recommended that you fix your MP3s with vbrfix (available from
# <http://www.willwap.co.uk/Programs/vbrfix.php>), at which
# point you can re-enable support for gapless MP3 playback.
#
#gapless_mp3_playback             "yes"
#
# Enable this if you wish to use your MPD created playlists in
# other music players.
#
#save_absolute_paths_in_playlists "no"
#
# A list of tag types that MPD will scan for and make available
# to clients.
#
#metadata_to_use                  "artist,album,title,track,name,genre,date,composer,performer,disc"
#
################################################################
nedix
Posts: 11
Joined: Tue Jan 07, 2014 1:10 am

Re: OpenWRT vs DD-WRT

Post by nedix »

What I am trying to achieve is indeed option 2; option 1 is quite a nonsense given the project but I haven't realized that until I put on paper. However, if I go for option 2, will the bridge with LAN work with psk2 encryption? As far as I understood it works only with WEP and I don't want to change the encryption of the main router.
As for the mpd.conf, I don't know by what chance the audio section did appear but I wasn't able to change anything due to space issues. I erased jffs and started from the beginning on a clean installation so I will keep the forum posted on the progress.
Thanks for the tips.
nedix
Posts: 11
Joined: Tue Jan 07, 2014 1:10 am

Re: OpenWRT vs DD-WRT

Post by nedix »

Finally it worked! At least the installation... in the end I had to use everything from this forum, the .trx and the MightyOhm's package selection, otherwise I've ran out of space in any combination. I didn't enable wireless yet, I want to see it working wired first and then to play with wireless.
The "thing" now is that nothing is being created in .mpd/playlists nor in the music folder. I don't receive any error when I execute "mpc add <station>" or "mpc play" but I do have the following error in mpd.error:

Jan 01 00:10 : Error opening OSS device "/dev/sound/dsp": No such file or directory
Jan 01 00:10 : problems opening audio device while playing "http://relay3.slayradio.org:8000/"

Also, when I try controlling the mpd via an MPD client under Windows then the client returns "Error: problems opening audio device"

Could it be because I didn't connect yet the USB-Audio converter?
Post Reply