in hardware

HOWTO Installation of OpenWRT on a WGT634U usb router

NetGear WGT634U with OpenWRTBefore the 7.06 stable version of OpenWRT there were many problems for making USB audio working on this exceptional router (the only one I know with a USB port). Problems with kernel version 2.4/2.6, problems with alsa, problems with USB not working (usb2), etc. Take a look at the forums, and see all horrible, painful modifications/patches you needed to apply to make it working.
I have to say that the OpenWRT developers/contributors (and the forum members) did a wonderful job and corrected every known problems. So with this version, the installation is really straightforward!

Please read the following to get all the details.

I take no responsibility if you damage your router.

This installation procedure has been done with OpenWRT v. 7.06 (stable).

These requirements are not really requirements, but are the tools/material I used to make it work. So with these, you’re sure to make it work, like me :-)

Hardware Requirements

  • A PC with a serial port
  • A breadboard
  • A serial cable that you can unwire
  • A network cable
  • A USB sound adapter

Software requirements

  • A connection to Internet
  • A Linux OS (I use Gentoo, but any will be OK)
  • A TFTPd server
  • A DHCP server
  • Screen software

Serial updates

WGT634U plugged on a breadboard First thing to do is build a serial connexion to the WGT634U to be able to flash it. Read the infos about the serial console on this page. I choose to get a normal serial cable, remove one side of the cable and plug it on my breadboard, which is itself linked to the 3 pins on the NetGear.

Install TFTPd, and set it to get its files from /tftproot (for example). Put the OpenWRT binary file for WGT634U in it (get it from openWRT’s download section).

Run the following command to catch everything from your Linux ttyS0 port:

screen /dev/ttyS0 115200

Put a network cable on the WAN port of your Netgear, and connect it on your network (which should be linked to Internet):

Back of the router, network on WAN

Here, the yellow network cable is plugged in the WAN port (right).

Unplug and replug the power supply cable, and at the same time press Ctrl-C several times.

You should get a CFE> prompt.

ifconfig eth0 -auto
flash -noheader flash0.os

This will ask the DHCP server on the network for an ip address to set on the NetGear WAN interface
(you can verify that the link is OK by pinging your TFTPd server: ping and then upload the OpenWRT image to the NetGear.
When done, type reboot.

Wait a few minute, for the flash to be reinitialized, then hit enter to get a console.
Set a password for root (which will activate the SSH daemon): passwd root.
Edit the file /etc/firewall.user and uncomment the two lines that allow SSH (port 22) connections to the WAN interface:

### Open port to WAN
# — This allows port 22 to be answered by (dropbear on) the router
iptables -t nat -A prerouting_wan -p tcp –dport 22 -j ACCEPT
iptables -A input_wan -p tcp –dport 22 -j ACCEPT

Then reboot.
You should now be able to log in remotely without using the serial cable!

OpenWRT Logon

Logon and type:

ipkg update
ipkg install kmod-soundcore
ipkg install kmod-usb-core
ipkg install kmod-usb-ohci
ipkg install kmod-usb-audio

Verify that everything is OK by looking into the /dev directory. There should be a /dev/control* and a /dev/pcm* file:

root@OpenWrt:~# ls /dev/pcm* /dev/cont*
/dev/controlC0 /dev/pcmC0D0c /dev/pcmC0D0p

If yes, cool! Otherwise, take a look at the kernel logs (dmesg) for any problem.
Now, your USB soundcard should be activated. But that’s not sufficient to make it work. You’ll have to add some symlinks to make alsa work correctly.
First install alsa utilities:

ipkg install alsa-utils
ipkg install alsa-lib

Then create the symlinks:

mkdir /dev/snd
ln -s /dev/controlC0 /dev/snd/controlC0
ln -s /dev/pcmC0D0c /dev/snd/pcmC0D0c

Now run alsamixer. You should get an ASCII vertical bar that allows you to set the volume:

alsamixer on openwrt

That’s all for now. You now have a working WGT63U router which can play sound.

Next part will be about configuring Wifi as a client, and installing mpd ( Music Player Daemon) and linking it to a server to allow direct play from a remote server!


Don’t forget to visit the second part!

  1. Hi Lior, thanks a lot for the detailled instructions! I followed all the described steps and my router is now playing sound like a charm.

Comments are closed.