OpenWrt Forum Archive

Topic: Can't connect to existing wireless network (sta)

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

I have a Netgear wgt634u router (atheros wirless). I'm running OpenWRT trunk (revision 18454).

I'm trying to get client mode working to connect to my existing wireless network, but I can't get the wgt634u to connect. I can see in the wirless client list of my existing router (not running openwrt) that the wgt634u is trying to connect, but it never manages to stay connected, it just keeps trying and trying. I've edited /etc/config/wireless to include my connection details, and try to bring up the connection by running the /sbin/wifi script.

Are there any logs I can read to try to understand why it can't establish a connection? (wpa_supplicant logs or something like that)

/etc/config/wireless

config wifi-device  wifi0
        option type     atheros
        option channel  auto

config wifi-iface
        option device   wifi0
        option network  wan
        option mode     sta
        option ssid     Tobbe
        option encryption psk2
        option key      mysecretkey

/etc/config/network

config 'switch' 'eth0'
        option 'enable' '1'

config 'switch_vlan' 'eth0_0'
        option 'device' 'eth0'
        option 'vlan' '0'
        option 'ports' '0 1 2 3 5*'

config 'switch_vlan' 'eth0_1'
        option 'device' 'eth0'
        option 'vlan' '1'
        option 'ports' '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 'netmask' '255.255.255.0'
        option 'dns' '192.168.1.254'
        option 'gateway' '192.168.1.254'
        option 'ipaddr' '192.168.1.8'

config 'interface' 'wan'
        #option 'ifname' 'eth0.1'
        #option 'proto' 'dhcp'
        #option 'ifname'  'ath0'
        option 'proto'   'static'
        option 'ipaddr'  '192.168.0.251'
        option 'netmask' '255.255.255.0'
        option 'gateway' '192.168.0.254'
        option 'dns' '192.168.0.254'

#config 'interface' 'wlan'
#        option 'ifname'  'ath0'
#       option 'proto'   'static'
#       option 'ipaddr'  '192.168.0.251'
#       option 'netmask' '255.255.255.0'
#       option 'gateway' '192.168.0.254'
#       option 'dns' '192.168.0.254'

ifconfig ath0

ath0      Link encap:Ethernet  HWaddr 00:09:5B:F7:2F:58
          inet addr:192.168.0.251  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:96 errors:0 dropped:0 overruns:0 frame:0
          TX packets:50 errors:1 dropped:1 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:13780 (13.4 KiB)  TX bytes:6479 (6.3 KiB)

Bridged client-mode is only supported with the Broadcom binary driver used in the brcm-2.4 target...

I don't need bridged client mode.

I only need to be able to access the router from other machines in the lan, and access those machines from the router. No computer will be connected to the wgt634u.

Sometimes when booting the router it is connected to the wlan for a few seconds. I can tell because I have mpd/mpc running on it, and it starts to play an internet radio stream. But it only works for a few seconds, then the connection dies.

Isn't this symptoms of failing authentication? That it is connected for a very short while, but then the connection is dropped.

Solved it.

I had conflicting setting left from earlier attempts to get this working. Removing those and using the settings posted in my first post in this thread made it work smile

The discussion might have continued from here.