In summary: Received a WL-500G this afternoon, flashed with Oleg's latest firmware, installed the Asus build tools, built the HDLC line discipline kernel module, built [URL=http://speedtouch.sourceforge.net/]speedtouch project[/URL] with appropriate configuration options (but no source tweaks needed!), uploaded all relevant files to router, made good use of [URL=http://cvs.sourceforge.net/viewcvs.py/*checkout*/speedtouch/speedtouch/doc-linux/howto/SpeedTouch-HOWTO-en.html?rev=HEAD]howto[/url], and I am now connected via the Speedtouch USB modem running off the WL-500G.

It's still a bit messy, for example I had to compile statically and strip resulting binaries, meaning heinous file sizes, but for people who just want a working demo (all files are going into RAM disc here, so lost at reboot), some rough notes:

0. Make sure you have [URL=http://wl500g.dyndns.org/]oleg's latest firmware[/URL] (thanks for this oleg!). I also set the router to "router" mode as opposed to "home gateway" where lots of DHCP/NAT magic happens which might interfere with things, but this might be ok.

0.5. To transfer files easily to router, I recommend scp. To set this up, telnet in, /init/rc.sshd && nvram commit && reboot (maybe?), then /init/rc.sshd again to restart the ssh daemon (or put it in a bootCmd somewhere).

1. Grab the enclosed zip containing: hdlc.o kernel module, modem_run and pppoa3 binaries, and templates for /etc/ppp/options, /etc/ppp/peers/adsl. Copy the first three into /tmp/alcatel say. Also upload your copy of mgmt.o or alcaudsl.sys containing the actual modem firmware.

2. edit /etc/ppp/peers/adsl as appropriate, in particular changing the login user ;-) and VPI/VCI if you're not in the UK. Add an /etc/ppp/chap-secrets (or pap-secrets perhaps) line containing:
"your_login" * "your_password" *

3. insmod n_hdlc.o

4. ./modem_run -t 20 -v 2 -f mgmt.o 2>/tmp/alcatel/modem_run.log (substitute the name of the sys file if you have that instead). Wait at least 30 seconds.

5. Take a deep breath and: pppd call adsl updetach ... ifconfig ppp0 to check for success It should grab nameserver etc info automatically so you can ping out at will.

6. While you play, keep safe: iptables -I INPUT 1 -i ppp0 -p tcp --dport 0:1023 -j DROP at least. You also wanna block 2601 and 9100 probably.

NB If need to killall pppd, rm /var/run/pppoa3-modem*.pid afterwards. Otherwise it seems to go mad upon restart.

In more detail... to build HDLC support:

1. Follow [URL=http://www.chupa.nl/forum/showpost.php?p=2362&postcount=2]kernel rebuild instructions[/URL] up to make menuconfig.
2. Under character devices, select "non-standard serial port support" then "hdlc line discipline support" as a module.
3. make modules modules_install (latter with permissions to /lib/modules/2.4.20)
4. obtain n_hdlc.o from /lib/modules/2.4.20/kernel/drivers/char/n_hdlc.o

To build alcatel usermode software:

1. Ensure PATH set up to installed [URL=http://www.asus.com.tw/support/download/item.aspx?ModelName=WL-500g&Type=Latest]asus build tools[/URL] (note the package already includes pre-built toolchain that you can copy to /opt)

2. Temporarily move /usr/include and /usr/local/include so configure process absolutely ignores them.

3. Build with options (those CPPFLAGS and LDFLAGS are probably unnecessary after you've done (2)):
CPPFLAGS=-I/opt/hndtools-mipsel-linux/include LDFLAGS=-L/opt/hndtools-mipsel-linux/lib ./configure --host=mipsel-linux --build=i686-pc-linux-gnu --enable-static --enable-syslog=no
make
mipsel-linux-strip --remove-section=.comment --remove-section=.note bin/*

3. Only bin/modem_run and bin/pppoa3 are needed.
