OpenWrt Forum Archive

Topic: WRT54GS 2.0 Client (sta) mode doesn't work (7.07)

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

Hi:

I've been running WR for about a year now successfully and decided to upgrade to 7.07 kamikaze.  I tftpd the bin image for wrt54gs (2.4 version) onto the unit and went through the normal setup stuff.

The unit booted up fine in access point (ap) mode, and all appeared well.  However, I need to run the unit in routed client mode.


When I reboot, the router comes up and if I do an iwconfig wl0, it shows the mode as "Repeater" (not Managed), and the tx power is "off", and it basically looks like the wireless radio hasn't been turned on, and the mode hasn't been properly set.

Not sure what it means, but if I do a:
wlc infra, it returns "1"
wlc wet, it returns "1"
wlc ap, it returns "0"
wlc apsta, it returns "0",

and if I try to set ap to 1 (wlc ap 1), then the card comes to life and turns on and shows "Master" on iwconfig.  If I try to set infra to 0 (wlc infra 0), then I get a "can't set card option error -1" or something.


What's interesting is that if I set the config/wireless file to bring the interface up as "mode adhoc", the wireless card turns on and I can scan for APs normally (iwlist wl0 scanning), and see a bunch.

For the past couple days I was able to boot into adhoc mode and then issue:
iwconfig wl0 mode Managed
iwconfig wl0 essid TargetEssid

and the card would go to the proper mode and be 'on', it would pick up an IP, and so on.

Since then, i installed the "wl" package to be able to use the aircrack-ng package, and ran airodump successfully a few times.  Since then, my trick of bringing the card up in adhoc mode and then using iwconfig to switch to client doesn't work.  The card will switch to "Managed" mode, but it appears that the radio is off "tx power: off"


So, not sure where to go from here. 

Could I be dealing with some hangover nvram settings somewhere that are not allowing kamikaze proper control of the wifi card?  If so, how can I do a clean wipe?

Are there any known issues about switching to client mode on a wrt54gs 2.0 AP, with 2.4 kamikaze 7.07?  I've searched the board a bit and found some config files that are apparently working for some folks.  But those files aren't working for me.


What's the trick for client mode?


I appreciate your help and can provide more diagnostic info as required.


Thanks!
John.


So, per the documentation I adjusted /etc/config/network and /etc/config/wireless

****************************
/etc/config/network

config switch eth0
   option vlan0 "0 1 2 3 4 5u"

config interface lan
   option ifname eth0
   option proto static
   option ipaddr 192.168.1.1
   option netmask 255.255.255.0

config interface wan
   option ifname wl0
   option proto dhcp

************************

***********************
/etc/config/wireless

config wifi-device wl0
   option type broadcom
   option disabled 0

config wifi-iface
   option device wl0
   option mode sta
   option ssid MYSSID

*************************

Hi John,

I have the exact same problem on my WRT54G v2.2 with kamikaze 7.07. Did you or anyone else find a solution?
Wiping the nvram did not work.

Peter

Hi Peter,

No, I didn't find a solution.  I switched back to the latest version of White Russian.  I wouldn't say that the problem is solved there either, though.  From time to time I need to switch the router to AP mode (iwconfig eth1 mode Master) and then back (iwconfig eth1 mode Managed).  It then picks up the proper ssid from nvram and seems to start working when I issue ifup wan.

Not sure where to go from here.  Maybe this is a weird HW-specific bug or something.

Here's what I use for routed client mode (sta) on my WRT54GL running Kamikaze - your mileage may vary -

/etc/config/network

config switch eth0
        option vlan0    "0 1 2 3 4 5*"

config interface loopback
        option ifname   "lo"
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0

config interface lan
        option type     bridge
        option ifname   "eth0.0"
        option proto    static
        option ipaddr   10.8.8.1
        option netmask  255.255.255.0

config interface wan
        option ifname   wl0
        option proto    dhcp

/etc/config/wireless

config wifi-device              wl0
        option type             broadcom

config wifi-iface
        option device           wl0
        option network          wan
        option mode             sta
        option ssid             linksys

## For having a repeater AP, comment this section out if you don't want it
config wifi-iface
        option device           wl0
        option network          lan
        option mode             ap
        option ssid             OpenWrt
        option encryption       psk2
        option key              'a-wpa-key-goes-here'

If the IP of the AP you're connecting to is 192.168.1.1, make sure you change network.lan.ipaddr to something else.

http://img511.imageshack.us/img511/2741/bananaug9.gif

(Last edited by MkFly on 17 Sep 2007, 20:54)

Mine doesn't work either in kamikaze 7.09.
It connects to the other AP gets the ip but doesn't do any routing. I can download stuff from the internet with wget from ssh shell but if i try to do something in the LAN side it doesn't work.

#### VLAN configuration
config switch eth0
        option vlan0    "0 1 2 3 5u"

#### Loopback configuration
config interface loopback
        option ifname   "lo"
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0

#### LAN configuration
config interface lan
        option type     bridge
        option ifname   "eth0"
        option proto    static
        option ipaddr   192.168.2.1
        option netmask  255.255.255.0

#### WAN configuration
config interface        wan
        option ifname   "eth1"
        option proto    dhcp
config wifi-device  wl0
        option type     broadcom
        option channel  11
        option disabled 0

config wifi-iface
        option device   wl0
        option network  wan
        option mode     sta
        option ssid     MySSID
        option encryption psk
        option key MyPass

EDIT:
I Tried to use another image i downloaded http://downloads.x-wrt.org/xwrt/kamikaz … uashfs.trx ,  12-Oct-2007 21:59, and updated my router and it actually works now...

(Last edited by caravela on 13 Oct 2007, 18:51)

I've been having trouble with my client mode WRT staying connected to my network too. It kind of connects but has made my network really unstable if it does. It was working really well in 707, but in 709 it's working strangely.

The discussion might have continued from here.