WAG354g hacking


Git repository

The current version (20070826): Choose your model:

Older (20070422):

Squashfs & lzma

Download the squashfs sources with lzma support and/or the pathes depending on your running linux kernel.

squashfs_lzma for 2.6.12
patch for 2.6.18 kernels
patch for 2.6.19 kernels

Compile the module and load it:

make -C /lib/modules/`uname-r`/build/ M=`pwd`
insmod squash.ko

If everything goes right you can now mount your firmware with this command:

mount -t squashfs firmware.bin /mnt -o loop,offset=0xC0030

Static internet led

The internet led freezes after a period of time. The problem is a bug in firmware's sources. To make the internet led blink, a program called wanledctl reads from /proc/avalanche/avsar_modem_stats the number of packets transmitted or received and compares them with the last saved. You can find these numbers under the [SAR AAL5 Stats] label. Here is an example:

Tx Total Bytes: 3499386611
Rx Total Bytes: 220624359

As you can understand these numbers are unsigned integers. When they reach the maximum value (4294967295) they are zeroed. On the other hand they are treated as signed integers in the program. When both numbers exceed the maximum positive signed int (2147483647) they become negative and the comparisons fail.

Here is the patch that fixes the problem.
Powered by JohnAthana