OpenWrt Forum Archive

Topic: Netgear WNR854T with Atheros Wireless Card

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

Hi,

I am very new to OpenWrt and this is the first time I am trying to put OpenWrt on my WNR854T router, I have replaced the mini-pci card with an Atheros wireless card which should be supported by OpenWrt, but I am not able to enable wireless for some reason.

The image I am using is:
openwrt-wnr854t-squashfs-webupgrade.img  (Oct 28, 2009)

I can see this message from serial when the router boots up:

Registered led device: ath9k-phy0::radio
Registered led device: ath9k-phy0::assoc
Registered led device: ath9k-phy0::tx
Registered led device: ath9k-phy0::rx
phy0: Atheros AR5416 MAC/BB Rev:2 AR5133 RF Rev:81: mem=0xc2a00000, irq=36

Here is my /etc/config/wireless file:

config 'wifi-device' 'wifi0'
        option 'type' 'atheros'
        option 'macaddr' '00:07:c1:31:05:30'
        option 'country' ''
        option 'hwmode' ''
        option 'channel' '0'
        option 'maxassoc' ''
        option 'distance' '20'
        option 'diversity' ''
        option 'txantenna' ''
        option 'rxantenna' ''
        option 'disabled' '0'
        option 'antenna' ''

config 'wifi-iface'
        option 'device' 'wifi0'
        option 'network' 'lan'
        option 'mode' 'ap'
        option 'ssid' 'MYSSID'
        option 'bssid' ''
        option 'encryption' 'psk2'
        option 'server' ''
        option 'port' ''
        option 'hidden' '0'
        option 'isolate' '0'
        option 'txpower' ''
        option 'bgscan' '0'
        option 'frag' ''
        option 'rts' ''
        option 'wds' '0'
        option 'key' 'MYKEY'
        option 'key1' ''
        option 'key2' ''
        option 'key3' ''
        option 'key4' ''
        option '80211h' ''
        option 'compression' ''
        option 'bursting' ''
        option 'ff' ''

But when I tried to turn wireless on:

wifi up

I got:

wifi0(atheros): Interface type not supported
wifi0(atheros): Interface type not supported

So, what else do I need to do to enable wireless on my router.

Thanks in advance.

I guess that was because the /lib/wifi/atheros.sh is missing, where can I find the script then? Thanks.

Please read here

Changed wifi type to "mac80211" and changed "hwmode" to "11ng", wifi is now working (even the wireless LED is off), next step will be enable HT-40 mode.

looks like 5ghz N is not supported by the current hostapd?

driver shows the wireless card support dual bands:

root@OpenWrt:~# iw list
Wiphy phy0
        Band 1:
                HT capabilities: 0x104e
                        * 20/40 MHz operation
                        * SM PS disabled
                        * 40 MHz short GI
                        * max A-MSDU len 3839
                        * DSSS/CCK 40 MHz
                HT A-MPDU factor: 0x0003 (65535 bytes)
                HT A-MPDU density: 0x0006 (8 usec)
                HT MCS set: ff ff 00 00 00 00 00 00 00 00 00 00 01 00 00 00
                HT TX/RX MCS rate indexes supported:
                        MCS index 0
                        MCS index 1
                        MCS index 2
                        MCS index 3
                        MCS index 4
                        MCS index 5
                        MCS index 6
                        MCS index 7
                        MCS index 8
                        MCS index 9
                        MCS index 10
                        MCS index 11
                        MCS index 12
                        MCS index 13
                        MCS index 14
                        MCS index 15
                Frequencies:
                        * 2412 MHz [1] (20.0 dBm)
                        * 2417 MHz [2] (20.0 dBm)
                        * 2422 MHz [3] (20.0 dBm)
                        * 2427 MHz [4] (20.0 dBm)
                        * 2432 MHz [5] (20.0 dBm)
                        * 2437 MHz [6] (20.0 dBm)
                        * 2442 MHz [7] (20.0 dBm)
                        * 2447 MHz [8] (20.0 dBm)
                        * 2452 MHz [9] (20.0 dBm)
                        * 2457 MHz [10] (20.0 dBm)
                        * 2462 MHz [11] (20.0 dBm)
                        * 2467 MHz [12] (disabled)
                        * 2472 MHz [13] (disabled)
                        * 2484 MHz [14] (disabled)
                Bitrates (non-HT):
                        * 1.0 Mbps
                        * 2.0 Mbps (short preamble supported)
                        * 5.5 Mbps (short preamble supported)
                        * 11.0 Mbps (short preamble supported)
                        * 6.0 Mbps
                        * 9.0 Mbps
                        * 12.0 Mbps
                        * 18.0 Mbps
                        * 24.0 Mbps
                        * 36.0 Mbps
                        * 48.0 Mbps
                        * 54.0 Mbps
        Band 2:
                HT capabilities: 0x104e
                        * 20/40 MHz operation
                        * SM PS disabled
                        * 40 MHz short GI
                        * max A-MSDU len 3839
                        * DSSS/CCK 40 MHz
                HT A-MPDU factor: 0x0003 (65535 bytes)
                HT A-MPDU density: 0x0006 (8 usec)
                HT MCS set: ff ff 00 00 00 00 00 00 00 00 00 00 01 00 00 00
                HT TX/RX MCS rate indexes supported:
                        MCS index 0
                        MCS index 1
                        MCS index 2
                        MCS index 3
                        MCS index 4
                        MCS index 5
                        MCS index 6
                        MCS index 7
                        MCS index 8
                        MCS index 9
                        MCS index 10
                        MCS index 11
                        MCS index 12
                        MCS index 13
                        MCS index 14
                        MCS index 15
                Frequencies:
                        * 5180 MHz [36] (30.0 dBm) (passive scanning, no IBSS)
                        * 5200 MHz [40] (30.0 dBm) (passive scanning, no IBSS)
                        * 5220 MHz [44] (30.0 dBm) (passive scanning, no IBSS)
                        * 5240 MHz [48] (30.0 dBm) (passive scanning, no IBSS)
                        * 5260 MHz [52] (30.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5280 MHz [56] (30.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5300 MHz [60] (30.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5320 MHz [64] (30.0 dBm) (passive scanning, no IBSS, radar detection)
                        * 5500 MHz [100] (disabled)
                        * 5520 MHz [104] (disabled)
                        * 5540 MHz [108] (disabled)
                        * 5560 MHz [112] (disabled)
                        * 5580 MHz [116] (disabled)
                        * 5600 MHz [120] (disabled)
                        * 5620 MHz [124] (disabled)
                        * 5640 MHz [128] (disabled)
                        * 5660 MHz [132] (disabled)
                        * 5680 MHz [136] (disabled)
                        * 5700 MHz [140] (disabled)
                        * 5745 MHz [149] (30.0 dBm) (passive scanning, no IBSS)
                        * 5765 MHz [153] (30.0 dBm) (passive scanning, no IBSS)
                        * 5785 MHz [157] (30.0 dBm) (passive scanning, no IBSS)
                        * 5805 MHz [161] (30.0 dBm) (passive scanning, no IBSS)
                        * 5825 MHz [165] (30.0 dBm) (passive scanning, no IBSS)
                Bitrates (non-HT):
                        * 6.0 Mbps
                        * 9.0 Mbps
                        * 12.0 Mbps
                        * 18.0 Mbps
                        * 24.0 Mbps
                        * 36.0 Mbps
                        * 48.0 Mbps
                        * 54.0 Mbps
        max # scan SSIDs: 4
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * AP/VLAN
                 * monitor
                 * mesh point

But when I tried to enable 5ghz N:
/etc/config/wireless

config 'wifi-device' 'wifi0'
        option 'type' 'mac80211'
        option 'macaddr' '00:07:c1:31:05:30'
        option 'channel' '44'
        option 'distance' '20'
        option 'disabled' '0'
        option 'antenna' ''
        option 'country' 'ca'
        option 'hwmode_11n' 'n'
        option 'ht_capab' '[HT40-][SHORT-GI-40][DSSS_CCK-40]'
        option 'diversity' '1'

It complains:

root@OpenWrt:~# wifi up
Configuration file: /var/run/hostapd-wlan0.conf
Line 4: unknown hw_mode 'n'
1 errors found in configuration file '/var/run/hostapd-wlan0.conf'
enable_mac80211(wifi0): Failed to set up wpa for interface wlan0

So, how do I enable N-only? and how do I enable 5ghz N-only?

Would anybody tell me how to enable Wireless N only mode and how to enable 5ghz N?

Thanks!

The discussion might have continued from here.