ASUS WL-500g Premium

With Kamikaze 7.09 and target system Broadcom BCM947xx/953xx [2.4] the ASUS WL-500g Premium is fully supported and runs stable.

Target System

WiFi Support

Comments

Broadcom

Atheros

Broadcom BCM947xx/953xx [2.4]

(./)

(./)

Broadcom BCM947xx/953xx [2.6]

{X}

(./)

Random segfaults -- Fixed in SVN 9285

Hardware

Info

Architecture

MIPS

Vendor

Broadcom

Bootloader

CFE

System-On-Chip

Broadcom BCM94704

CPU Speed

266 Mhz

Flash size

8MiB

RAM

32MiB (some older units have only 16MiB enabled)

Wireless

MiniPCI Broadcom 802.11b/g BCM4318 802.11 Wireless LAN Controller

Ethernet

Robo switch BCM5325

USB

2x USB 2.0

Serial

Yes

JTAG

No

Wireless LAN Controller

The standard wireless LAN controller is the BCM4318 on a MiniPCI card. Some people have replaced this with an Atheros MiniPCI card. The advantage is that the Atheros card has an open source driver. For example it works with Wistron CM9 (some people say that signal quality is poor), Tp-Link TL-WN560G (signal quality is as with original controller).

Serial Port

Serial is located on pin soldering points (ready for soldering of 8-pin connector for use with detachable cable) on the centre of the right upper side (viewing from front panel) under ventilation holes. At right from these points, you can see printed pin descriptions:

RESET

GND

3.3V_OUT

UART_TX1

UART_TX0

UART_RX1

UART_RX0

Pin 1 (with the square solder pad) is RX0.

These serial ports use TTL levels. You need an additional voltage convertor to get a standard serial port. The parameters are 115200 baud and 8-n-1.

Photos

./OpenWrtDocs/Hardware/Asus/WL500GP/IMG_0007
With a Atheros Wistron CM9
MiniPCI WiFi card

Opening the case

Remove the 4 nubs under the case, now you can see some screws. Unscrew them. You're done. When you're finished you can put the rubbers back into the gadgets. They'll stick alone.

Original Firmware

Backup

You can backup the original firmware with the hidden admin page. This requires you to have a USB pen drive to copy the backup firmware file (TRX) of the router.

Restore

To restore the original ASUS firmware you have three options:

Installation

If the TFTP part fails, you can try the installation with the ASUS firmware restoration tool (Windows only).

You can download official 7.09 images or build the images by yourself using the build-system.

Using the ASUS web GUI

Does not work yet. The TRX utility needs a rewrite (Sep. 1st 2007, confirmed by nbd on IRC).

The ASUS GUI requires a trailer to be added to the .trx file (similar to the way other firmwares require headers). The rather simple structure can be inferred from work done for the FreeWRT project http://osdir.com/ml/embedded.freewrt.cvs/2006-09/msg00226.html

Using diag mode

To install OpenWrt using TFTP or the ASUS firmware restoration tool you have to put the router in diag mode. To put the router in the diag mode, do this:

In diag mode, the router takes address 192.168.1.1. It responds to ping, so you can confirm that it is in diag mode and ready for the tftp by using "ping 192.168.1.1".

Note: I used the Asus tool to reflash the orginal asus firmware over kamikaze 7.09. In diag mode the asus kept the IP address assigned to it in kamikaze, which was not 192.168.1.1. The asus firmware restoration tool worked even though the asus in diag mode did not assign my PC an IP via DHCP and even though I could not ping the asus at 192.168.1.1. I had to use ethereal/wireshark to monitor traffic on LAN1 to figure out what I had set the IP address to. Then, using the proper IP address I could access the stock Asus web pages to use the "Reset to Factory Default" function and restore all settings to factory state.

TFTP

It is possible to install OpenWrt using a TFTP client when the router is in diag mode.

NOTES:

If you have problems to flash a brand new Asus WL500gP. (Asus restoration tool fails or no tftp prompt) You can try this...

ASUS firmware restoration tool (Windows only)

If you are on Windows it is recommended to use the ASUS firmware restoration tool to install OpenWrt. The ASUS firmware restoration tool can be found on the CD. Make sure the router is in diag mode.

If the firmware restoration tool can't seem find your router even though you are certain that it is in diag mode, it may be because the restoration tool is not very smart about which network interface to use. Disable all network interfaces except for the correct (LAN) network interface and try again.

Using the mtd command line tool

If you have already installed OpenWrt or like to flash from any other firmware (which has the mtd tool), do this:

cd /tmp/
wget http://downloads.openwrt.org/kamikaze/7.09/brcm-2.4/openwrt-brcm-2.4-squashfs.trx
mtd write openwrt-brcm-2.4-squashfs.trx linux && reboot

ASUS WL-500g Premium specific configuration

Interfaces

The default network configuration is:

Interface Name

Description

Default configuration

br-lan

LAN & WiFi

192.168.1.1/24

vlan0

LAN ports (1 to 4)

vlan1

WAN port

DHCP

wl0/ath0

WiFi

Disabled by default

LAN and WiFi is bridged to br-lan. WiFi is disabled by default for security reasons (to prevent an open access point).

Failsafe mode

If you forgot your password, broken one of the startup scripts, firewalled yourself or corrupted the JFFS2 partition, you can get back in by using OpenWrt's failsafe mode.

Boot into failsafe mode

What to do in failsafe mode?

NOTE: The root file system in failsafe mode is the SquashFS partition mounted in readonly mode. To switch to the normal writable root file system run mount_root and make any changes. Run mount_root now.

  1. Forgot/lost your password and you like to set a new one

    passwd

  2. Forgot the routers IP address

    uci get network.lan.ipaddr

  3. You accidentally run 'ipkg upgrade' or filled up the flash by installing to big packages (clean the JFFS2 partition and start over)

    mtd -r erase rootfs_data

If you are done with failsafe mode power cycle the router and boot in normal mode.

Buttons

The ASUS WL-500g Premium has two buttons. They are RESTORE and EZSETUP. The buttons can be used with hotplug events. E. g. WiFi toggle.

BUTTON

Event

RESTORE

reset

EZSETUP

ses

ACTION: released or pressed

Enabling all RAM

On newer ASUS WL-500g Premium router's all RAM is enabled by default. If you look at "dmesg | grep Memory" command's output, you will probably see that there's only 16MiB of RAM. Specs says there should be 32MiB. To enable 32MiB change the sdram_init and sdram_ncdl NVRAM variables as showed:

nvram set sdram_init=0x0009
nvram set sdram_ncdl=0x10308
nvram commit
reboot

Basic configuration

PPPoE

With Kamikaze 7.09 PPPoE works out-of-the-box. All required packages are already installed in the default image. To configure PPPoE with UCI, do this:

uci set network.wan.proto=pppoe
uci set network.wan.username=<pppoe_psername>
uci set network.wan.password=<pppoe_password>
uci commit network && ifup wan

QoS

Install the qos-scripts package

ipkg install qos-scripts

Basic QoS configuration using UCI:

uci set qos.wan.upload=192            # Upload speed in KB
uci set qos.wan.download=2048         # Download speed in KB
uci commit qos

Start QoS and enable on next boot

/etc/init.d/qos boot
/etc/init.d/qos start
/etc/init.d/qos enable

Dynamic DNS

Please see Dynamic DNS.

WiFi

Enable WiFi

Broadcom WiFi

uci set wireless.wl0.disabled=0
uci commit wireless && wifi

Atheros WiFi

uci set wireless.wifi0.disabled=0
uci commit wireless && wifi

Set TX Antenna and RX Antenna to 2 to get better signal quality with 1 original antenna.

WiFi encryption

Plese see OpenWrtDocs/KamikazeConfiguration/WiFiEncryption.

WiFi toggle

Turn WiFi on/off with the EZSETUP or RESTORE button. Please see the WiFi toggle Wiki page.

USB

USB is supported and needs a few extra packages to be installed to work probably. USB hubs are working. Active hubs with external power supply are better.

USB 1.1

ipkg install kmod-usb-uhci-iv

USB 2.0

ipkg install kmod-usb2

Print Server

Please see the PrinterSharingHowto.

Webcam with the Linux UVC driver

Below works to configure and use a Logitech Quickcam Pro for Notebooks (2007) webcam. Tested with trunk.

ipkg install kmod-video-uvc kmod-usb2 uvc-streamer

A UCI configuration file and init script for the uvc-streamer:

/etc/config/uvc-streamer

config uvc-streamer
        option device          '/dev/video0'
        option resolution      '640x480'
        option framespersecond '5'
        option port            '8080'
        option enabled         '1'

/etc/init.d/uvc-streamer

#!/bin/sh /etc/rc.common
# Copyright (C) 2007 OpenWrt.org
START=50
SSD=start-stop-daemon
NAME=uvc_stream
PIDF=/var/run/$NAME.pid
PROG=/sbin/$NAME
append_bool() {
        local section="$1"
        local option="$2"
        local value="$3"
        local _val
        config_get_bool _val "$section" "$option" '0'
        [ "$_val" -gt 0 ] && append args "$3"
}
append_string() {
        local section="$1"
        local option="$2"
        local value="$3"
        local _val
        config_get _val "$section" "$option"
        [ -n "$_val" ] && append args "$3 $_val"
}
start_service() {
        local section="$1"
        args=""
        append_string "$section" device "-d"
        append_string "$section" resolution "-r"
        append_bool "$section" framespersecond "-f"
        append_string "$section" port "-p"
        config_get_bool "enabled" "$section" "enabled" '1'
        [ "$enabled" -gt 0 ] && $SSD -S -p $PIDF -q -x $PROG -- -b $args
}
stop_service() {
        killall $NAME 2>&1 > /dev/null
        # FIXME: Fix Busybox start-stop-daemon to work with multiple PIDs
        # $SSD -K -p $PIDF -q
}
start() {
        config_load "uvc-streamer"
        config_foreach start_service "uvc-streamer"
}
stop() {
        config_load "uvc-streamer"
        config_foreach stop_service "uvc-streamer"
}

Make the init script executable

chmod a+x /etc/init.d/uvc-streamer

Make changes to the config file if needed.

Start uvc-streamer

/etc/init.d/uvc-streamer start

To activate uvc-streamer on next boot

/etc/init.d/uvc-streamer enable

Now open the URL http://192.168.1.1:8080/ in the Firefox browser or VLC and watch the MJPEG stream. Also seewebcampage in the wiki if your webcam needs other drivers.

Turn your router into a networked music player

Work in progress. Please see the UsbAudioHowto.

Trunk with Kernel 2.6

P: The line b44: eth1: BUG! Timeout waiting for bit 80000000 of register 428 to clear. may appear in log.

S: As written in http://forum.openwrt.org/viewtopic.php?pid=29017 this can be fixed by editing /etc/init.d/S10boot

P: USB 1.1 devices are not recognized, USB 2.0 devices like harddrives etc. work perfectly. How come?

S: The WL-500gP ehci-hcd module handles all USB2 transfer well, but the external ports use uhci-hcd for usb1. To make it even worse, the current trunk version has issues with this module to load but it can be fixed like mentioned in the forum http://forum.openwrt.org/viewtopic.php?id=7149. The broadcom chip seems to have a "buried" ohci controller that can not be used with the external connectors.

ASUS WL-500g Premium info


External Links

Tutorials

Product Info Pages

Forum Threads


OpenWrtDocs/Hardware/Asus/WL500GP (last edited 2008-05-08 14:57:10 by SimonJosefsson)

Almost all of these pages are editable, create an account and click the edit (Edit) button at the top of the page.