OpenWGT installation instructions

NOTE: This document describes the installation of OpenWGT to an unmodified Netgear WGT634U, running the original Netgear firmware.
For installation of the netboot and/or USB storage edition of OpenWGT, see Netboot and USB Installation

Preparing

  1. Get an OpenWGT firmware image from here.
  2. Then power on your Netgear WGT634U.
  3. If the power led switched from yellow to green, you should be able to login at the Web frontend at the routers IP address. (default is 192.168.1.1)

Firmware installation

  1. Select Router Upgrade and enter the complete path to the downloaded firmware image.
  2. Click on Upload
  3. Now the router will flash the OpenWGT image. This may take some minutes.
  4. If the web frontend tells that Router firmware upgrade is done. you should be able to login via telnet or ssh (root:password) at ip address 192.168.1.1, connected to Internet Port (first next to USB port). In some cases you need to replugin the power supply.
  5. Configure your network devices by setting NVRAM variables.

Network configuration

  1. Login to your router via telnet or SSH.
  2. Set NVRAM variables (should be self-explanatory), e.g. for a private IPv4 subnet:
    $ nvram set lan_proto=static
    $ nvram set lan_ifname=vlan0
    $ nvram set lan_ipaddr=192.168.1.2
    $ nvram set lan_netmask=255.255.255.0
    $ nvram set lan_gateway=192.168.1.254
    $ nvram set lan_dns=192.168.1.254
    $ nvram set lan_domain=lan.home
    $ nvram show | grep lan_
    # Start watchdog, since a commit crashs sometimes the kernel
    $ watchdog
    $ nvram commit
    
    This configuration sets up all ethernet ports to IP address 192.168.1.2/24 with gateway at 192.168.1.254. Other VLAN configurations will be possible in the next release (keyword: mapping OpenWRT-NVRAM config to vconfig)
  3. After reboot the new network configuration should be set up.

PPPoE installation and configuration (OpenWGT 0.06 only - will change in release 0.07)

  1. Login to your router via telnet or SSH.
  2. First of all, you need linux kernel support for PPP and PPPoE and furthermore the pppoecd user-space daemon.
  3. Install the packages:
    $ remount-rootfs.sh rw     # we need write access to the root file system
    $ ipkg update
    $ ipkg install kmod-openwgt-pppoe
    $ ipkg install pppoecd
    
  4. Setup VLAN (change /etc/init.d/S39vlan):
    @@ -19,15 +19,15 @@
    
     #vconfig set_name_type VLAN_PLUS_VID_NO_PAD
     vconfig add eth0 3
    -vconfig add_port 3 5
     vconfig add_port 3 4
     vconfig add_port 3 3
     vconfig add_port 3 2
     vconfig add_port 3 1
     vconfig add_port_nountag_nodeftag 3 6
    
    -#vconfig add eth0 1
    -#vconfig add_port_nountag 1 6
    +vconfig add eth0 1
    +vconfig add_port_nountag 1 6
    +vconfig add_port 1 5
     #vconfig add_port 1 4
     #vconfig add_port 1 3
    
    This set the internet port (next to USB port) to vlan1 and the other ports remain at vlan0.
  5. Add entry to setup WAN device at boot time in /etc/init.d/S40network:
    @@ -24,3 +24,6 @@
     # Bringing up WLAN
     #ip link set ath0 name eth1
     #ifconfig eth1 up
    +
    +# Bringing up PPP device
    +ifup wan
    
  6. Change the wrong argument list in /sbin/ifup:
    @@ -61,7 +61,8 @@
           $DEBUG ifconfig $if 0.0.0.0 up
    
           $DEBUG /sbin/pppoecd $if -u $username -p $password \
    -        -i 0 -I $redial -T $idletime -t $mtu -k
    +        -i $(expr $idletime \* 60) -I $redial -T 3 -t $mtu -k
    +      (sleep 5; route add default gw 10.112.112.112) &
         ;;
         none)
         ;;
    
  7. Lock the rootfs again:
    $ remount-rootfs.sh ro
    
  8. Set PPPoE configuration in NVRAM
    $ nvram set wan_proto=pppoe
    $ nvram set wan_ifname=ppp0
    $ nvram set wan_mtu=1492
    $ nvram set pppoe_ifname=vlan1
    $ nvram set ppp_idletime=1440
    $ nvram set ppp_redialperiod=30
    
    # set your account data below
    $ nvram set ppp_username=abcde
    $ nvram set ppp_passwd=12345
    
  9. After all reboot your WGT.

Wireless LAN configuration - Access Point

NOTE: In the available releases of OpenWGT there is yet no solution to run the WGT634U in client mode.
Stay tuned or contact me if you are able to get madwifi drivers working with client mode!
  1. Login to your router via telnet or SSH.
  2. Load Netgear's original wifi modules (rescue-*):
    $ for m in $(xargs < /etc/modules-rescue-wifi); do insmod $m; done
  3. Ensure that the modules are loaded:
    $ lsmod
    Module                  Size  Used by
    rescue-ath_pci         50384   1
    rescue-wlan           139040   1 [rescue-ath_pci]
    rescue-ath_hal        317280   1 [rescue-ath_pci]
    robo                   38060  -8
    et                     27024   1 [robo]
    
  4. Setup IP address for the AP:
    $ ifconfig ath0 192.168.2.1
  5. Set SSID:
    $ iwconfig ath0 essid OpenWGT-AP
  6. Set WEP key
    $ iwconfig ath0 key [1] 0102030405
  7. Now connect with your client, using "OpenWGT-AP" as SSID and "0102030405" as WEP-40 key in hexadecimal.

Install ipkg packages

  1. You may need online-connection for this. See Network configuration above.
  2. Make root file system writeable.
    $ remount-rootfs.sh rw
  3. Update ipkg package list.
    $ ipkg update
  4. View available package list.
    $ ipkg list
  5. Install wanted packages. (e.g. strace)
    $ ipkg install strace
  6. Relock root file system.
    $ remount-rootfs.sh ro

Restore Netgear Firmware

of course we all know that OpenWGT is far superior to Netgear's firmware, but if you really wanted your old one back, there is a way:
  1. Boot your router from USB storage (or via netboot). Click here for instructions.
  2. Now you can run the restore script:
    $ /restore/restore-firmware.sh
    This requires an existing online connection to the Internet. If you want to restore the router offline, fetch the given file (printed by the script) and put it on the USB storage device (e.g. into /restore/images). So mount your device (e.g. /dev/sda1) on your PC and copy or fetch (with wget) the file to the mounted device.
    $ /restore/restore-firmware.sh
    wget: downloads.netgear.com: Unknown host
    Could not fetch file: ftp://downloads.netgear.com/files/wgt634u_1_4_1_10.img
    
    $ mount /dev/sda1 /mnt
    $ mkdir /mnt/restore/images
    $ cd /mnt/restore/images
    $ wget ftp://downloads.netgear.com/files/wgt634u_1_4_1_10.img
    $ cd
    $ umount /mnt
    
    After rebooting the router with rootfs from USB storage, run:
    $ FIRMWARE_PATH=/restore/images \
    /restore/restore-firmware.sh
    
    If you want to restore an other version than 1.4.1.10 you have to set the $FIRMWARE_VERSION=a_b_c_d variable
    (e.g. with wgt634u_1_3_0_6.img stored into /restore/images):
    $ FIRMWARE_VERSION=1_3_0_6 \
    FIRMWARE_PATH=/restore/images \
    /restore/restore-firmware.sh
    
  3. After rebooting your WGT634U you should be able to use the original firmware.

Last modified: 2005-08-05, 23:58 - Mathias Jeschke Valid HTML 4.01!