OpenWrt Forum Archive

Topic: Wireless N Support

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 have built an x86_64 Arch version of Openwrt.

my base hardware is;

Intel Celeron J1900 CPU
8GB RAM
USB pen boot drive (for development)
3 x GbE NIC (Intel i211)

Several Wifi cards tested;

Intel 6205 (mPCIe)
Intel 7260 (mPCIe)
Ralink RT5390 (mPCIe)
Ralink RT5370 (USB)
Ralink RT2890 (mPCIe)

Besides the Intel 7260 if have been able to get all of the above cards to function at 802.11g

Reference the 7260, I would love to get this working but so far no joy, I have made the modifications suggested here, https://forum.openwrt.org/viewtopic.php?id=54488 but the card is shown in lspci but the drivers are not loaded? any help here would be really appreciated.

For all of the other cards, I can get them to work but as soon as I enable htmode in /etc/config/wireless the wlan0 disappears from the list in ifconfig and the network dies.

/etc/config/wireless


config wifi-device 'radio0'
        option type 'mac80211'
        option channel '1'
        option hwmode '11g'
        option path 'pci0000:00/0000:00:1c.1/0000:02:00.0'
        option txpower '20'
        option country '00'

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

/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 '192.168.0.100'
        option netmask '255.255.255.0'
        option gateway '192.168.0.1'
        option dns '8.8.8.8'
        option ip6assign '60'

#config interface 'wan'
#       option ifname 'eth0'
#       option proto 'dhcp'

config globals 'globals'
        option ula_prefix 'fdd2:4b06:4dd7::/48'

my thinking is that there is something I have set incorrectly in the build that has disabled HT (802.11n) so when I enable it in the config file it cannot function, but this is a total guess.

I have been working on this for several weeks now and this is my final problem to fix.

Any pointers would be really appreciated, I am sure it is just me being a bit thick and apologies if this is covered somewhere else I have searched for an answer but cannot find one.

thanks..

It may not help, but you really should set the country code to your country rather than "00".

Use iw list to see if the driver is showing HT capability for your card.

(Last edited by mk24 on 29 Apr 2015, 16:54)

Hi, thanks for the quick response.

I had previously set the country code, will do this again to eliminate it as a possible problem.

my iw list out put is;

Wiphy phy0
        max # scan SSIDs: 20
        max scan IEs length: 195 bytes
        Retry short limit: 7
        Retry long limit: 4
        Coverage class: 0 (up to 0m)
        Available Antennas: TX 0 RX 0
        Supported interface modes:
                 * IBSS
                 * managed
                 * AP
                 * AP/VLAN
                 * monitor
        Band 1:
                Capabilities: 0x1072
                        HT20/HT40
                        Static SM Power Save
                        RX Greenfield
                        RX HT20 SGI
                        RX HT40 SGI
                        No RX STBC
                        Max AMSDU length: 3839 bytes
                        DSSS/CCK HT40
                Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
                Minimum RX AMPDU time spacing: 4 usec (0x05)
                HT TX/RX MCS rate indexes supported: 0-15

so I think I am ok here.. but perhaps not?? (this iw list was done using the Intel 6205 card)

what do you think??

I am continuing on this, does any one know if I need to enable 802.11n in hostapd.conf?

I am not 100% sure if Openwrt uses this file?

I am recompiling as we speak with 80211n & ac enabled in this file in two places,

build_dir/target-x86_64_uClibc-0.9.33.2/hostapd-full/hostapd-2014-10-25/hostapd/hostapd.conf

and

build_dir/target-x86_64_uClibc-0.9.33.2/hostapd-supplicant-full/hostapd-2014-10-25/hostapd/hostapd.conf

not sure if it will make any difference, but will post the results.

What value are you setting htmode to?  Are there any error messages printed in syslog that might point towards a cause? (run "logread")

If there isn't sufficient information in syslog to troubleshoot, can you please run hostapd in debug mode to see if there are any error messages: http://wiki.openwrt.org/doc/devel/debug … _behaviour

Hi thanks for the pointer!!

this is the log read output;

Fri May  1 07:33:15 2015 daemon.notice netifd: radio0 (4436): Configuration file: /var/run/hostapd-phy0.conf
Fri May  1 07:33:15 2015 daemon.notice netifd: radio0 (4436): Line 11: unknown configuration item 'ieee80211n'
Fri May  1 07:33:15 2015 daemon.notice netifd: radio0 (4436): Line 12: unknown configuration item 'ht_capab'
Fri May  1 07:33:15 2015 daemon.notice netifd: radio0 (4436): 2 errors found in configuration file '/var/run/hostapd-phy0.conf'
Fri May  1 07:33:15 2015 daemon.notice netifd: radio0 (4436): Failed to set up interface with /var/run/hostapd-phy0.conf
Fri May  1 07:33:15 2015 daemon.notice netifd: radio0 (4436): Failed to initialize interface
Fri May  1 07:33:15 2015 daemon.notice netifd: radio0 (4436): Device setup failed: HOSTAPD_START_FAILED

I have tried setting htmode to HT20, HT40- & HT40+..

but looking at the above it does seem to be a setting hostapd-phy0.conf.. ??

I will investigate, thank you for coming back to me.

ok, so hostapd-phy0.conf looks like this;

river=nl80211
logger_syslog=127
logger_syslog_level=2
logger_stdout=127
logger_stdout_level=2
country_code=00
ieee80211d=1
hw_mode=g
channel=6

ieee80211n=1
ht_capab=[HT40+][SHORT-GI-20][SHORT-GI-40][DSSS_CCK-40]

interface=wlan0
ctrl_interface=/var/run/hostapd
disassoc_low_ack=1
preamble=1
wmm_enabled=1
ignore_broadcast_ssid=0
uapsd_advertisement_enabled=1
wpa_passphrase=******
auth_algs=1
wpa=2
wpa_pairwise=CCMP
ssid=OpenWrt
bridge=br-lan
okc=0
disable_pmksa_caching=1
bssid=10:0b:a9:07:4b:18

which to me doesn't actually look wrong to me..

of course if I change this file it gets re-written when I reload the network..

what am I missing?

Looks like hostapd doesn't understand those parameters :-/  odd.  Only references I can find in Google are quite old and relate to either a problematic (older) version of hostapd or incorrect driver selection.

What version of OpenWRT are you compiling?  I'm not sure how practical that is on x86 and with the different network drivers, but is it possible try with a "stock" download of Barrier Breaker as well?

Failing that, perhaps a fresh build from a fresh config is in order ("make defconfig" --> re-add network drivers --> rebuild.)

I'm using chaos calmer, (I.e trunk)..

Perhaps I should start again with barrier breaker..

Its been a pretty steep learning curve, but I think starting from scratch would be ok..

Is there a way to take the conifg files from this build to the next to save me having to do it all again?

Thanks again for you advice..

Yes, if you do the upgrade through LuCI or sysupgrade you can tell it to preserve previous config files.  Alternatively, a backup/restore of the config thorugh LuCI should also be fine, or - depending on whether your image uses squashfs or not - a copy of /overlay using SCP is also a good failsafe backup mechanism.  Last-ditch, almost all config you can make resides in /etc/config, so a backup copy of that would also help.

I've not used chaos calmer yet; from recent forum postings it seems stable enough by now, but with trunk it is always a bit of a case of "life is a box of chocolates..." Testing with a known-good version is a good sanity-check.

Trunk/CC has better/newer support for wifi devices, so it is better for you. BB14.07 has not got any updates for a long time.

Normally you should be able to do all config via /etc/config/wireless, so editing hostapd-phy0.conf is merely a debugging/testing solution.


If you build your own firmware, you can include /etc/config in your buildroot in <buildroot>/files/etc/config
They get then copied to the final firmware.
http://wiki.openwrt.org/doc/howto/build#custom_files

But if you meant .config  in the buildroot, then you should probably do a ./scripts/diffconfig.sh and save the output as the new initial .config file, if you rebuild the whole build from scratch.

(Last edited by hnyman on 1 May 2015, 10:28)

Hi, I actually meant backup the build config files so I don't have to make all the build selections again..

But I guess this wouldn't make sense as the options may be different..

I will try over the weekend and post the results.

Thanks again for your help.

You can copy over your .config file, then run a new build, you'll get a prompt for new settings that you haven't configured yet.

You need to leave the mode at 'g' then add a line 'htmode HT20' for example (or HT40+ / HT40- depending on your main channel, so the sub channel is also an allowed channel in the band). 

There is no such thing as setting hwmode to 'n', and 'ht_capab' is something you can leave undefined as the driver should auto-detect hardware capability.  From the driver standpoint, HT mode works on top of g mode.

Also the standard for n mode requires the use of either None or WPA2+AES encryption. WEP, WPA1 or TKIP is not allowed.

This useful but difficult to find wiki page documents all the things that can be set in /etc/config/wireless:
http://wiki.openwrt.org/doc/uci/wireless

(Last edited by mk24 on 2 May 2015, 02:51)

The discussion might have continued from here.