OpenWrt Forum Archive

Topic: Fonera wireless config

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

I installed Kamikaze r6596 on a Fonera, but I'm having trouble getting the wireless interface to work automatically. I started with a simple AP configuration:

==> /etc/config/network <==
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 ifname   eth0
        option type     bridge
        option proto    'static'
        option ipaddr   '10.0.0.65'
        option netmask  '255.255.255.0'

==> /etc/config/wireless <==
config wifi-device wifi0
        option type     atheros
        option channel  6

config wifi-iface
        option device   wifi0
        option network  lan
        option mode     ap
        option ssid     OpenWrt
        option encryption none

After a reboot, the br-lan interface is constructed:

bridge name     bridge id               STP enabled     interfaces
br-lan          8000.0018841582c8       no              eth0
                                                        ath0

but not configured. I have to do an explicit "ifup lan" to get the bridge configured:

br-lan    Link encap:Ethernet  HWaddr 00:18:84:xx:xx:x8
          inet addr:10.0.0.65  Bcast:10.0.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

But now, the wifi interface is removed from the bridge:

bridge name     bridge id               STP enabled     interfaces
br-lan          8000.0018841582c8       no              eth0

I have to issue a "wifi" command to restore the bridge. After that, my laptop is able to obtain an IP address from the router, and I'm able to connect.

Why isn't the network configured automatically on a reboot? Is there something missing? I don't have this problem on my Asus Wl-500g Deluxe router, which is also running Kamikaze.

Oh, and BTW: the wifi LED remains switched off. Is that a known problem?

Installed r6868 today and discovered same problem ! Should I open a ticket or is this already taken care of ?

(Last edited by intrax on 6 Apr 2007, 11:55)

Here is my Fonera config for bridged wireless and network. Works perfect for me. I used Kamikaze revision 6846 and you can download my images from here. Remember, by default wifi is disabled. Change 'option disabled 1' to 'option disabled 0' in the wireless config file in section wifi-device.

/etc/config/network

# Copyright (C) 2006 OpenWrt.org

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
        option proto    'static'
        option ipaddr   '192.168.178.2'
        option netmask  '255.255.255.0'
        option gateway  '192.168.178.1'
        option dns      '192.168.178.1'

/etc/config/wireless

config wifi-device  wifi0
        option type     atheros
        option channel  1
#       option diversity 1
#       option txantenna 0
#       option rxantenna 0
#       option distance  2000
# disable radio to prevent an open ap after reflashing:
        option disabled 0


config wifi-iface
        option device   wifi0
        option network  lan
        option mode     ap
        option ssid     OpenWrt
        option hidden   0
#       option txpower  15
#       option bgscan   enable
        option encryption psk2
        option key topsecret

wlanconfig ath0 list

ADDR               AID CHAN RATE RSSI  DBM IDLE  TXSEQ  RXSEQ CAPS ACAPS ERP STATE     MODE
00:1a:4f:9c:8f:37    1    1  48M   47  -48    0   1086  25808 EPSs     0   25   Normal RSN

brctl show

bridge name     bridge id               STP enabled     interfaces
br-lan          8000.001884143994       no              eth0
                                                        ath0

ifconfig

ath0      Link encap:Ethernet  HWaddr 00:18:84:14:39:95
          UP BROADCAST RUNNING MULTICAST  MTU:2290  Metric:1
          RX packets:183030 errors:0 dropped:0 overruns:0 frame:0
          TX packets:149802 errors:0 dropped:12 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:151317387 (144.3 MiB)  TX bytes:66315311 (63.2 MiB)

br-lan    Link encap:Ethernet  HWaddr 00:18:84:14:39:94
          inet addr:192.168.178.2  Bcast:192.168.178.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:12693 errors:0 dropped:0 overruns:0 frame:0
          TX packets:763 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:667775 (652.1 KiB)  TX bytes:146038 (142.6 KiB)

eth0      Link encap:Ethernet  HWaddr 00:18:84:14:39:94
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:147581 errors:0 dropped:0 overruns:0 frame:0
          TX packets:177590 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:66494099 (63.4 MiB)  TX bytes:151191603 (144.1 MiB)
          Interrupt:4 Base address:0x1000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wifi0     Link encap:Ethernet  HWaddr 00:18:84:14:39:95
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:189063 errors:0 dropped:0 overruns:0 frame:24263
          TX packets:151108 errors:296 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:199
          RX bytes:159411757 (152.0 MiB)  TX bytes:72189939 (68.8 MiB)
          Interrupt:3 Memory:b0000000-b00ffffc

iwconfig ath0

ath0      IEEE 802.11g  ESSID:"OpenWrt"  Nickname:""
          Mode:Master  Frequency:2.412 GHz  Access Point: 00:18:84:14:39:95
          Bit Rate:0 kb/s   Tx-Power:18 dBm   Sensitivity=0/3
          Retry:off   RTS thr:off   Fragment thr:off
          Encryption key:xxxx-xxxx-xxxx-0B0E-831B-425C-2D6F-44A9 [3]   Securitymode:open
          Power Management:off
          Link Quality=47/94  Signal level=-48 dBm  Noise level=-95 dBm
          Rx invalid nwid:3704  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

@forum2006
Well your config is not different from mine, but I use r6868 and after boot the br-lan device is not configured properly after the ifup-lan command the ath0 interface is dropped from the bridge. wifi command corrects this as mr. dicks mentioned.

Maybe you have noticed signal strength variations ranging from 15% to 80% constantly up and down ? Well I did.

This because openwrt uses wrong antenna on fonera, to solve put:

option diversity 0
option txantenna 1
option rxantenna 1

and you will have stable signal strength !

(Last edited by intrax on 7 Apr 2007, 00:54)

The discussion might have continued from here.