OpenWrt Forum Archive

Topic: Linksys WAG354G discussion -> how to, success stories & questions here

The content of this topic has been archived on 13 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hey all.
I'm a owner of a wag354g (v1) and there is almost no develpment here on this router but it works fine.

A guy named "blue" wrote how to compile a working image for this device and it seems to work! Thanks blue
I will quote his post:

blue wrote:

I’ve got the 8.09.1 version of Kamikaze running nicely on my wag354g (v1).
Simple steps are: (For Linux)
1) download and untar the code.
2) run “make”
This isn’t going to create a working version, but it’s needed.
3) Once finished, edit “target/linux/generic-2.6/config-2.6.26? and change the two following lines:
4) Apply the cpmac.c patch as above. I added 1 extra line, according to “
5) run “make”
6) The working image should be called “bin/openwrt-WA31-*” for wag354g v1

That’s it. I’ve found that you need udevtrigger or it doesn’t work.
As a guide if the power lights goes crazy it works, if it flashes green constantly you’ve not got udevtrigger, and if there is a single red flash every few seconds, the switch isn’t detected/configured.

If someone has something to add, post here. Let's make a better support to this old but great router/gateway wink

(Last edited by TigTex on 31 Aug 2009, 03:03)

I tested it today and I can say: IT WORKS!!!

If you wan't to have openwrt working in your WAG354G just do this.
Get a linux distro....

1. download kamikaze 8.09.1 source and untar-it
2. run "make"
3. select AR7 and annex A then exit (or change anything you want, then save)
4. run "make". It will download several MB and compile everything.
5. Patch cpmac.c (inside ./kernel2.6.xx/drivers/) according to “
6. Re-run make
7. It's done. Your image is inside a bin folder and it should be WA31 for wag354g annex A
8. Flash you linksys wag354g via tftp
9. Wait and login via telnet at
10-> you're done!

Acesspoint mode works just fine and everything works. Luci also works but it's slow (150mhz cpu)
Just do it


I am not so familiar with linux and terminal and I have stuck here
5. Patch cpmac.c (inside ./kernel2.6.xx/drivers/) according to “
can u give me a little help about the commands to apply the patch?

Thank you

Really thanks this instruction.
It looks great.
I'll do a test for my WAG354G this weekend.

Is there any detail for the patch?
I mean how to apply the patch. Create a patch file and let openwrt apply it automatically or modify the target file directly?

I am at the same point.
Can u please give us a little help how to apply the patch?

Thank you


bump again.
I just did the test on my WAG354G last Saturday.
I just modify the code directly according to the patch and it works fine.
Here is what I do.
build the whole thing the first time.
Then modify the cpmac.c file and then rebuild.
no "make clean" between the two build.
That's it.

I would perfer a patch instead but I have no idea about how to add it.
Sorry for my poor english.

so I have to add this code to cpmac.c?

# ----- patch 1 -----
        phy_id =0x1F;    //  <-   phy_id  must be 31 (no real id detection)
        if (phy_id == PHY_MAX_ADDR) {
               if (external_switch || dumb_switch) {
# ----- patch 2 ----
        mask &= 0x7fffffff;
//  force external switch
//        if (mask & (mask - 1)) {
                    external_switch = 1;
                mask = 0;
//    }               
    cpmac_mii.phy_mask = ~(mask | 0x80000000);
# ------------------------

exactly as it is?


add "phy_id =0x1F;" as patch 1
remove "if (mask & (mask - 1)) {" and "}"
or comment them as patch 2

thank u

I have add this line to cpmac.c
    -> phy_id =0x1F;
        if (phy_id == PHY_MAX_ADDR) {
               if (external_switch || dumb_switch) {

and i have remove these lines  (i tried also comment them)
        mask &= 0x7fffffff;
//     force external switch
// from here -> if (mask & (mask - 1)) {
                    external_switch = 1;
                mask = 0;
//    }  <- to there         
    cpmac_mii.phy_mask = ~(mask | 0x80000000);

but if i run iwconfig i get no wireless extensions.

(Last edited by pant on 30 Sep 2009, 12:54)

Hi, I compile and run OpenWrt followning your recomendations.
Everything works fine exept when I try to activate the wifi using /sbin/wifi command:

/sbin/wifi: eval: line 1: cannot create /sys/class/leds/wifi/brightness: nonexistent directory
wlan0(acx): enable failed

Do you know why I have this problem ? What I made wrong ?


Hi all,

for the led for power is crazy, is there any solution?
and my led for DSL is always very dim, the other led is much more bright.

I've not tested the WIFI part. I'll have a try this week.


To make the LED a bit less zany, you can see what triggers the LED by

cat /sys/class/leds/status/trigger

and set it by

echo "none"> /sys/class/leds/status/trigger

There are other kernel settings there you can play with, but I've not touched them.


(Last edited by blue on 18 Oct 2009, 12:09)


For the wifi, I'm not sure why it doesn't work.
I get the same error about the brightness though and mine works so I wouldn't worry too much about it. smile

When the device boots, and you log in, do you have a lot of "dmesg" entries relating to detecting and enabling the acx wireless?

acx: found TI TNETW1130-based wireless network card at vlynq0, irq:80, phymem:0x4000000, me
acx: need to load firmware for acx111 chipset with radio ID 16, please provide via firmware
acx: either one file only (<c>ombined firmware image file, radio-specific) or two files (ra
dio-less base image file *plus* separate <r>adio-specific extension file)
requesting firmware image 'tiacx111c16'
firmware: requesting tiacx111c16
acx_write_fw (main/combined): 0
acx_validate_fw (main/combined): 0


For reference: my config files  for wireless setup are: (Client Mode)

config wifi-device  wlan0
        option type     acx
        option channel  11

#       option disabled 1

config wifi-iface
        option device   wlan0
        option network  lan
        option mode     sta
        option ssid     YOUR_SSID
        option encryption WEP
        option key      1
        option key1     "XXXXXXXXXX"


config interface wifi
        option ifname   wlan0
        option proto    static
        option ipaddr
        option netmask


(Last edited by blue on 18 Oct 2009, 22:26)


thanks for the great howto!

I flashed my WAG354G v1 according to it and everything works except one thing: DSL
I want to use this device to connect to my ISP but I can't get it to work. Any help would be appreciated!!

I configured the network (the configuration was created by the x-wrt frontend that i installed). vci, vpi, ... are not standard. Those should however be right for my ISP!
config 'interface' 'wan'
    option 'ifname' 'atm0'
    option 'proto' 'pppoa'
    option 'encaps' 'vc'
    option 'demand' '10'
    option 'peerdns' '1'
    option 'vci' '8'
    option 'vpi' '48'
    option 'mru' '1400'
    option 'macaddr' ''
    option 'mtu' '1400'
    option 'defaultroute' '1'
    option 'ppp_redial' 'demand'
    option 'ipaddr' ''
    option 'ip6addr' ''
    option 'netmask' ''
    option 'gateway' ''
    option 'ip6gw' ''

when I do 'ifup wan' syslog says:

Plugin loaded.
Using interface ppp0
local  IP address
remote IP address

and to connect I try to ping something and according to syslog:
Starting link
Connect: ppp0 <--> 48.8
Couldn't increase MTU to 1500. Using 1400
Couldn't increase MRU to 1500. Using 1400
LCP: timeout sending Config-Requests
Connection terminated.

I'm really stuck here. I have been trying to make it work for two days now ..... please help ;-)


Hi All,
Some questions for the WAG354G V1
Now it works fine for me but still some small issues.
1.How to inactive the wifi at boot?
   There is a option called "option disabled 1", and I also set it, but it just does not work. I have to close it by myself.
2.I've got a port forwarding for BT. But it seems the speed is really slow. I'm not sure if my configure is wrong or if there are any issues. I've tested the port and it seems the port forwarding itself works fine. But the BT download speed is really slow. When I change another ADSL modem, the speed just looks fine.

this is my firewall configure

config defaults
        option syn_flood        1
        option input            ACCEPT
        option output           ACCEPT
        option forward          REJECT

config zone
        option name             lan
        option input    ACCEPT
        option output   ACCEPT
        option forward  REJECT

config zone
        option name             wan
        option input    REJECT
        option output   ACCEPT
        option forward  REJECT
        option masq             1

config forwarding
        option src      lan
        option dest     wan
        option mtu_fix  1

config include
        option path /etc/firewall.user

config redirect
        option src                      wan
        option src_dport        22
        option src_ip           x.x.x.x
        option dest                     lan
        option dest_ip
        option proto            tcpudp

config redirect
        option src                      wan
        option src_dport        6882
        option dest                     lan
        option dest_ip
        option proto            tcp

(Last edited by harry1985 on 15 Nov 2009, 08:29)


For reference, my wan config in /etc/config/system is

config interface wan
##      PPPoA:
        option ifname   atm0
        option proto    pppoa
        option encaps   vc
        option vpi      0
        option vci      38

##      Both:
        option username "XXXXXXX@zen"
        option password "XXXXXXX"

but once you've attempted to bring up the DSL link, try the follwoing:

root@gw-01:~# cat /proc/avalanche/avsar_modem_training 

If it says SHOWTIME, you're connected, otherwise there's a problem.  Check the routing table and make sure you can ping the IP on the other end of the PTP link. (ppp0)
odi, try removing all the extra bits from your wan config and try with just the minimum. smile


With regards the starting the wireless, you could try

root@9gw-01:~# ls -l /etc/rc.d/S48wireless
lrwxrwxrwx    1 root     root           18 Jan  1 03:34 /etc/rc.d/S48wireless -> ../init.d/wireless

This is the link which calls the startup of the wireless. If you remove this link it shouldn't start. Never tested this though, so let me know if there's any success. smile

WRT the port forwarding, I would guess that it's linked to MTU as that is usually what causes slow links. There are two things I'd suggest, but they're both temporary things to validate if it is MTU related. First, I'd drop the MTU on the ppp0 interface to either 1300 or 1400 to see what effect that has on the link. Secondly I'd make the same changes on your internal machine. I'm guessing you're running some form of unix as you're forwarding ssh.
If it is unix based then using  tracepath can sometimes show if the MTU is needed to be lower at some hop.


I've gave up with openwrt and wag354g. It's works, it's right. But it's slow and doesn't support wpa neither acess point mode, so, doesn't work with me sad

Hi, I am using images from markvd and clietn and AP mode works for a while, but a few minutes later wifi goes down and it doesn't restart until I manually do it.

So, I'm trying to compile my own image but I don't know what to select on network card config. Could someone give me his/her .config file to use?.

Many Thanks In Advance,

Followed the instructions found here and it worked smile
got dsl over pppoe, but wifi limited to WEP.

Thanks guys.

Has there been any success with newer versions ?

Hi everybody!

I've just tried to install OpenWRT 12.09 on my WAG354G v1 (annex A) through tftp (via ethernet; I have no serial) but I cannot access the router nor ping it... sad

I successfully installed Backfire 10.03.1 and it works fine; I would try the latest version: could you help me finding what's wrong with it?

thank you so much!

The discussion might have continued from here.