2012-02-03 18:46:37

by Alfonso Fiore

[permalink] [raw]
Subject: Setting up an AP @ 5 GHz 802.11a - hostapd refuses [Could not select hw_mode and channel. (-1)]

Hi,

I have an embedded system (ALIX) with an?Atheros AR5414 chipset (802.11 a/b/g)

I realized I have a wireless pollution problem at 2.4 GHz, so I
thought to setup an 802.11a AP (5 GHz).

hostapd tells me I have only 2.4 GHz channels available. Why?
Is there a chance to use the 5 Ghz channels? As I realize it's a
regulatory issue, I live in France.

I attached output of
- /usr/sbin/hostapd -dd /etc/hostapd/hostapd.wlan0.conf
- iw list
- cat /etc/hostapd/hostapd.wlan0.conf

thank you,
alfonso

# /usr/sbin/hostapd -dd /etc/hostapd/hostapd.wlan0.conf
Configuration file: /etc/hostapd/hostapd.wlan0.conf
Line 9: DEPRECATED: 'debug' configuration variable is not used anymore
eapol_version=1
nl80211: Add own interface ifindex 3
nl80211: New interface mon.wlan0 created: ifindex=25
nl80211: Add own interface ifindex 25
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
nl80211: Added 802.11b mode based on 802.11g information
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=20 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=20 dBm
Could not select hw_mode and channel. (-1)
wlan0: Unable to setup interface.
Flushing old station entries
Deauthenticate all stations
nl80211: Remove interface ifindex=25
netlink: Operstate: linkmode=0, operstate=6

# iw list
Failed to read classid file: Object not found
Wiphy phy0
Band 1:
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] (20.0 dBm) (passive scanning)
* 2472 MHz [13] (20.0 dBm) (passive scanning)
* 2484 MHz [14] (20.0 dBm) (passive scanning)
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:
Frequencies:
* 5040 MHz [8] (disabled)
* 5060 MHz [12] (disabled)
* 5080 MHz [16] (disabled)
* 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] (30.0 dBm) (passive scanning,
no IBSS, radar detection)
* 5520 MHz [104] (30.0 dBm) (passive scanning,
no IBSS, radar detection)
* 5540 MHz [108] (30.0 dBm) (passive scanning,
no IBSS, radar detection)
* 5560 MHz [112] (30.0 dBm) (passive scanning,
no IBSS, radar detection)
* 5580 MHz [116] (30.0 dBm) (passive scanning,
no IBSS, radar detection)
* 5600 MHz [120] (30.0 dBm) (passive scanning,
no IBSS, radar detection)
* 5620 MHz [124] (30.0 dBm) (passive scanning,
no IBSS, radar detection)
* 5640 MHz [128] (30.0 dBm) (passive scanning,
no IBSS, radar detection)
* 5660 MHz [132] (30.0 dBm) (passive scanning,
no IBSS, radar detection)
* 5680 MHz [136] (30.0 dBm) (passive scanning,
no IBSS, radar detection)
* 5700 MHz [140] (30.0 dBm) (passive scanning,
no IBSS, radar detection)
* 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



# cat /etc/hostapd/hostapd.wlan0.conf
interface=wlan0
driver=nl80211
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
debug=4
#dump_file=/tmp/hostapd.dump
#ctrl_interface=/var/run/hostapd
#ctrl_interface_group=0
#channel=6
#hw_mode=g
# let's try 5 GHz
channel=40
hw_mode=a
macaddr_acl=0
auth_algs=3
eapol_key_index_workaround=0
eap_server=0
# wpa=3
# only wpa 2
wpa=2
#ssid=voyage-mpd
ssid=<<my_SSID>>
#wpa_passphrase=voyage-mpd
wpa_passphrase=<<my_password>>
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
eapol_version=1
#wme_enabled=1
#ieee80211n=1
#ht_capab=[HT40-][HT40+][SHORT-GI-40][TX-STBC][RX-STBC1][DSSS_CCK-40]


2012-02-07 08:21:24

by Alfonso Fiore

[permalink] [raw]
Subject: Re: Setting up an AP @ 5 GHz 802.11a - hostapd refuses [Could not select hw_mode and channel. (-1)]

Ok I studied some more.

I found an howto http://forum.aircrack-ng.org/index.php?topic=7826.0
to edit db.txt and create a custom regulatory.bin (including the
openWrt patch to drivers/net/wireless/ath/regd.c).

I also found out about ath_info
http://madwifi-project.org/wiki/UserDocs/AthInfo and I rewrote my
regdomain:
./ath_info -v -g 4:0 -w 0xeffd0000 regdomain 0x68

I can tell these things worked since I can now fully access the 2.4
GHz channels (before I couldn't use 12 and 13):
Wiphy phy0
Band 1:
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] (20.0 dBm)
* 2472 MHz [13] (20.0 dBm)
* 2484 MHz [14] (disabled)

*** But why I still can't access any channel at 5 GHz? *** and what's
the meaning of (disabled)? Is this due to a hardware limitation?
In the 2.4 band, I managed to switch channel 12 and 13 from (passive
scanning) to available and channel 14 from (passive scanning) to
(disabled). Why?

This is the situation at 5 Ghz:

Band 2:
Frequencies:
* 5040 MHz [8] (disabled)
* 5060 MHz [12] (disabled)
* 5080 MHz [16] (disabled)
* 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] (30.0 dBm) (passive scanning,
no IBSS, radar detection)
* 5520 MHz [104] (30.0 dBm) (passive scanning,
no IBSS, radar detection)
* 5540 MHz [108] (30.0 dBm) (passive scanning,
no IBSS, radar detection)
* 5560 MHz [112] (30.0 dBm) (passive scanning,
no IBSS, radar detection)
* 5580 MHz [116] (30.0 dBm) (passive scanning,
no IBSS, radar detection)
* 5600 MHz [120] (30.0 dBm) (passive scanning,
no IBSS, radar detection)
* 5620 MHz [124] (30.0 dBm) (passive scanning,
no IBSS, radar detection)
* 5640 MHz [128] (30.0 dBm) (passive scanning,
no IBSS, radar detection)
* 5660 MHz [132] (30.0 dBm) (passive scanning,
no IBSS, radar detection)
* 5680 MHz [136] (30.0 dBm) (passive scanning,
no IBSS, radar detection)
* 5700 MHz [140] (30.0 dBm) (passive scanning,
no IBSS, radar detection)
* 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)

Thank you,
alfonso

On Fri, Feb 3, 2012 at 7:46 PM, Alfonso Fiore <[email protected]> wrote:
>
> Hi,
>
> I have an embedded system (ALIX) with an?Atheros AR5414 chipset (802.11 a/b/g)
>
> I realized I have a wireless pollution problem at 2.4 GHz, so I
> thought to setup an 802.11a AP (5 GHz).
>
> hostapd tells me I have only 2.4 GHz channels available. Why?
> Is there a chance to use the 5 Ghz channels? As I realize it's a
> regulatory issue, I live in France.
>
> I attached output of
> - /usr/sbin/hostapd -dd ?/etc/hostapd/hostapd.wlan0.conf
> - iw list
> - cat /etc/hostapd/hostapd.wlan0.conf
>
> thank you,
> alfonso
>
> # /usr/sbin/hostapd -dd ?/etc/hostapd/hostapd.wlan0.conf
> Configuration file: /etc/hostapd/hostapd.wlan0.conf
> Line 9: DEPRECATED: 'debug' configuration variable is not used anymore
> eapol_version=1
> nl80211: Add own interface ifindex 3
> nl80211: New interface mon.wlan0 created: ifindex=25
> nl80211: Add own interface ifindex 25
> BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
> nl80211: Added 802.11b mode based on 802.11g information
> Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=20 dBm
> Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=20 dBm
> Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=20 dBm
> Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=20 dBm
> Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=20 dBm
> Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=20 dBm
> Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=20 dBm
> Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=20 dBm
> Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=20 dBm
> Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=20 dBm
> Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=20 dBm
> Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=20 dBm
> Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=20 dBm
> Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=20 dBm
> Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=20 dBm
> Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=20 dBm
> Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=20 dBm
> Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=20 dBm
> Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=20 dBm
> Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=20 dBm
> Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=20 dBm
> Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=20 dBm
> Could not select hw_mode and channel. (-1)
> wlan0: Unable to setup interface.
> Flushing old station entries
> Deauthenticate all stations
> nl80211: Remove interface ifindex=25
> netlink: Operstate: linkmode=0, operstate=6
>
> # iw list
> Failed to read classid file: Object not found
> Wiphy phy0
> ? ? ? ?Band 1:
> ? ? ? ? ? ? ? ?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] (20.0 dBm) (passive scanning)
> ? ? ? ? ? ? ? ? ? ? ? ?* 2472 MHz [13] (20.0 dBm) (passive scanning)
> ? ? ? ? ? ? ? ? ? ? ? ?* 2484 MHz [14] (20.0 dBm) (passive scanning)
> ? ? ? ? ? ? ? ?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:
> ? ? ? ? ? ? ? ?Frequencies:
> ? ? ? ? ? ? ? ? ? ? ? ?* 5040 MHz [8] (disabled)
> ? ? ? ? ? ? ? ? ? ? ? ?* 5060 MHz [12] (disabled)
> ? ? ? ? ? ? ? ? ? ? ? ?* 5080 MHz [16] (disabled)
> ? ? ? ? ? ? ? ? ? ? ? ?* 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] (30.0 dBm) (passive scanning,
> no IBSS, radar detection)
> ? ? ? ? ? ? ? ? ? ? ? ?* 5520 MHz [104] (30.0 dBm) (passive scanning,
> no IBSS, radar detection)
> ? ? ? ? ? ? ? ? ? ? ? ?* 5540 MHz [108] (30.0 dBm) (passive scanning,
> no IBSS, radar detection)
> ? ? ? ? ? ? ? ? ? ? ? ?* 5560 MHz [112] (30.0 dBm) (passive scanning,
> no IBSS, radar detection)
> ? ? ? ? ? ? ? ? ? ? ? ?* 5580 MHz [116] (30.0 dBm) (passive scanning,
> no IBSS, radar detection)
> ? ? ? ? ? ? ? ? ? ? ? ?* 5600 MHz [120] (30.0 dBm) (passive scanning,
> no IBSS, radar detection)
> ? ? ? ? ? ? ? ? ? ? ? ?* 5620 MHz [124] (30.0 dBm) (passive scanning,
> no IBSS, radar detection)
> ? ? ? ? ? ? ? ? ? ? ? ?* 5640 MHz [128] (30.0 dBm) (passive scanning,
> no IBSS, radar detection)
> ? ? ? ? ? ? ? ? ? ? ? ?* 5660 MHz [132] (30.0 dBm) (passive scanning,
> no IBSS, radar detection)
> ? ? ? ? ? ? ? ? ? ? ? ?* 5680 MHz [136] (30.0 dBm) (passive scanning,
> no IBSS, radar detection)
> ? ? ? ? ? ? ? ? ? ? ? ?* 5700 MHz [140] (30.0 dBm) (passive scanning,
> no IBSS, radar detection)
> ? ? ? ? ? ? ? ? ? ? ? ?* 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
>
>
>
> # cat /etc/hostapd/hostapd.wlan0.conf
> interface=wlan0
> driver=nl80211
> logger_syslog=-1
> logger_syslog_level=2
> logger_stdout=-1
> logger_stdout_level=2
> debug=4
> #dump_file=/tmp/hostapd.dump
> #ctrl_interface=/var/run/hostapd
> #ctrl_interface_group=0
> #channel=6
> #hw_mode=g
> # let's try 5 GHz
> channel=40
> hw_mode=a
> macaddr_acl=0
> auth_algs=3
> eapol_key_index_workaround=0
> eap_server=0
> # wpa=3
> # only wpa 2
> wpa=2
> #ssid=voyage-mpd
> ssid=<<my_SSID>>
> #wpa_passphrase=voyage-mpd
> wpa_passphrase=<<my_password>>
> wpa_key_mgmt=WPA-PSK
> wpa_pairwise=TKIP
> rsn_pairwise=CCMP
> eapol_version=1
> #wme_enabled=1
> #ieee80211n=1
> #ht_capab=[HT40-][HT40+][SHORT-GI-40][TX-STBC][RX-STBC1][DSSS_CCK-40]

2012-02-07 22:15:44

by Pavel Roskin

[permalink] [raw]
Subject: Re: Setting up an AP @ 5 GHz 802.11a - hostapd refuses [Could not select hw_mode and channel. (-1)]

On Tue, 7 Feb 2012 09:20:53 +0100
Alfonso Fiore <[email protected]> wrote:

> I also found out about ath_info
> http://madwifi-project.org/wiki/UserDocs/AthInfo and I rewrote my
> regdomain:
> ./ath_info -v -g 4:0 -w 0xeffd0000 regdomain 0x68

That may be dangerous. Not all cards work with ath_info, and some can
be broken by it permanently. It's much safer to adjust
ath_regd_sanitize() in drivers/net/wireless/ath/regd.c.

That way, you can play with different regdomain settings.

> * 2472 MHz [13] (20.0 dBm)
> * 2484 MHz [14] (disabled)
>
> *** But why I still can't access any channel at 5 GHz? *** and what's
> the meaning of (disabled)? Is this due to a hardware limitation?

I believe it's a regdomain limitation.

> This is the situation at 5 Ghz:

> * 5260 MHz [52] (30.0 dBm) (passive scanning,
> no IBSS, radar detection)

I think it means it should be possible to use the band as long as DFS
is implemented, but it's not (in ath5k).

Try other regdomains, I think some should enable 5GHz unconditionally,
but please keep in mind that you may be breaking regulations.

--
Regards,
Pavel Roskin

2012-02-09 23:07:10

by Alfonso Fiore

[permalink] [raw]
Subject: Re: Setting up an AP @ 5 GHz 802.11a - hostapd refuses [Could not select hw_mode and channel. (-1)]

On Tue, Feb 7, 2012 at 11:15 PM, Pavel Roskin <[email protected]> wrote:
>
> On Tue, 7 Feb 2012 09:20:53 +0100
> Alfonso Fiore <[email protected]> wrote:
>
> > I also found out about ath_info
> > http://madwifi-project.org/wiki/UserDocs/AthInfo and I rewrote my
> > regdomain:
> > ./ath_info -v -g 4:0 -w 0xeffd0000 regdomain 0x68
>
> That may be dangerous. ?Not all cards work with ath_info, and some can
> be broken by it permanently. ?It's much safer to adjust
> ath_regd_sanitize() in drivers/net/wireless/ath/regd.c.

Hi Pavel and thank you,

I tried for days and finally I realized that when I do "make install"
still my box does not run my new code.
The only way I managed to use 5 GHz channels was setting my regdomain
to 0x00 with ath_info.

I really would like to know why my debian based box does not run my
modified compat-wireless code after "make install".

Any idea?

Thank you,
alfonso

2012-02-11 14:56:50

by Andreas Hartmann

[permalink] [raw]
Subject: Re: Setting up an AP @ 5 GHz 802.11a - hostapd refuses [Could not select hw_mode and channel. (-1)]

Alfonso Fiore schrieb:
> On Fri, Feb 10, 2012 at 10:15 PM, Andreas Hartmann
> <[email protected]> wrote:
>>
>> Alfonso Fiore schrieb:
>>> On Fri, Feb 10, 2012 at 7:54 AM, Andreas Hartmann
>> [...]
>>> # find / | grep ath5k.ko
>>> /lib/modules/3.0.0-voyage/kernel/drivers/net/wireless/ath/ath5k/ath5k.ko
>>> /lib/modules/3.0.0/updates/drivers/net/wireless/ath/ath5k/ath5k.ko
>>> /root/compat-wireless-3.3-rc1-2/drivers/net/wireless/ath/ath5k/ath5k.ko
>>> /root/compat-wireless-3.3-rc1-2/drivers/net/wireless/ath/ath5k/.ath5k.ko.cmd
>>>
>>> I tried depmod -a and also a simple reboot (which I always do after
>>> make install) but the "updates" module is never loaded.
>>>
>>> Any idea?
>>
>> Sorry for being late. I worked on my machine and wasn't able to read any
>> mails.
>>
>>
>> I do have a config file for depmod in /etc/depmod.d called
>> 00-system.conf, which has the following entries:
>
> Hi Andreas,
>
> I do not have a /etc/depmod.d folder. I imagine it is something about
> my embedded distribution (voyage 0.8.0).
>
> I asked for help there. I will post back is they have any suggestion.

This is a good idea especially as I don't know anything of this
distribution and don't have it here for testing.

I hope you get some help there. Maybe man depmod or man depmod.conf
knows something more? E.g., I don't have a /etc/depmod.conf file. Maybe
you have one?


Good luck,
regards,
Andreas

2012-02-11 01:26:35

by Alfonso Fiore

[permalink] [raw]
Subject: Re: Setting up an AP @ 5 GHz 802.11a - hostapd refuses [Could not select hw_mode and channel. (-1)]

On Fri, Feb 10, 2012 at 10:15 PM, Andreas Hartmann
<[email protected]> wrote:
>
> Alfonso Fiore schrieb:
> > On Fri, Feb 10, 2012 at 7:54 AM, Andreas Hartmann
> [...]
> > # find / | grep ath5k.ko
> > /lib/modules/3.0.0-voyage/kernel/drivers/net/wireless/ath/ath5k/ath5k.ko
> > /lib/modules/3.0.0/updates/drivers/net/wireless/ath/ath5k/ath5k.ko
> > /root/compat-wireless-3.3-rc1-2/drivers/net/wireless/ath/ath5k/ath5k.ko
> > /root/compat-wireless-3.3-rc1-2/drivers/net/wireless/ath/ath5k/.ath5k.ko.cmd
> >
> > I tried depmod -a and also a simple reboot (which I always do after
> > make install) but the "updates" module is never loaded.
> >
> > Any idea?
>
> Sorry for being late. I worked on my machine and wasn't able to read any
> mails.
>
>
> I do have a config file for depmod in /etc/depmod.d called
> 00-system.conf, which has the following entries:

Hi Andreas,

I do not have a /etc/depmod.d folder. I imagine it is something about
my embedded distribution (voyage 0.8.0).

I asked for help there. I will post back is they have any suggestion.

I imagine there is a reason why this feature is not part of the distribution...

Still I'm happy to test.

# dpkg -l | grep module-init
ii module-init-tools 3.12-1
tools for managing Linux kernel modules

I created the folder and then /etc/depmod.d/00-system.conf same like yours.

then I run "depmod -a" but lsmod shows the ath5k module is not loaded.

If I overwrite the original .ko files I get this error:
ath5k: version magic '3.0.0 SMP preempt mod_unload 486 ' should be
'3.0.0-voyage SMP preempt mod_unload 486 '

if you have other ideas, I'm happy to try them!

thank you,
alfonso

>
> --------------------------------------------------------------------
> #
> # /etc/depmod.conf - configuration file for the depmod(8) command,
> # for its format see depmod.conf(5).
> #
> # Please don't edit this file, place your settings into the /etc/depmod.d
> # directory.
>
>
> # search order:
> # 1 updates/ (KMPs)
> # 2 extra/ (KMPs or manually compiled modules)
> # 3 weak-updates/ (KMPs built for older kernels)
> # 4 everything else
> search updates extra weak-updates built-in
>
> # do not generate modules.*map files
> make_map_files no
> ----------------------------------------------------------------------
>
> Version of my inittools is: module-init-tools-3.12-6.1.x86_64. I don't
> have a depmod.conf file.
>
> After creating / changing this file, issue depmod -a again!
>
>
>
> Hope that helps!
>
> Regards,
> Andreas

2012-02-10 21:18:36

by Andreas Hartmann

[permalink] [raw]
Subject: Re: Setting up an AP @ 5 GHz 802.11a - hostapd refuses [Could not select hw_mode and channel. (-1)]

Alfonso Fiore schrieb:
> On Fri, Feb 10, 2012 at 7:54 AM, Andreas Hartmann
[...]
> # find / | grep ath5k.ko
> /lib/modules/3.0.0-voyage/kernel/drivers/net/wireless/ath/ath5k/ath5k.ko
> /lib/modules/3.0.0/updates/drivers/net/wireless/ath/ath5k/ath5k.ko
> /root/compat-wireless-3.3-rc1-2/drivers/net/wireless/ath/ath5k/ath5k.ko
> /root/compat-wireless-3.3-rc1-2/drivers/net/wireless/ath/ath5k/.ath5k.ko.cmd
>
> I tried depmod -a and also a simple reboot (which I always do after
> make install) but the "updates" module is never loaded.
>
> Any idea?

Sorry for being late. I worked on my machine and wasn't able to read any
mails.


I do have a config file for depmod in /etc/depmod.d called
00-system.conf, which has the following entries:

--------------------------------------------------------------------
#
# /etc/depmod.conf - configuration file for the depmod(8) command,
# for its format see depmod.conf(5).
#
# Please don't edit this file, place your settings into the /etc/depmod.d
# directory.


# search order:
# 1 updates/ (KMPs)
# 2 extra/ (KMPs or manually compiled modules)
# 3 weak-updates/ (KMPs built for older kernels)
# 4 everything else
search updates extra weak-updates built-in

# do not generate modules.*map files
make_map_files no
----------------------------------------------------------------------

Version of my inittools is: module-init-tools-3.12-6.1.x86_64. I don't
have a depmod.conf file.

After creating / changing this file, issue depmod -a again!



Hope that helps!

Regards,
Andreas

2012-02-10 17:48:22

by Alfonso Fiore

[permalink] [raw]
Subject: Re: Setting up an AP @ 5 GHz 802.11a - hostapd refuses [Could not select hw_mode and channel. (-1)]

On Fri, Feb 10, 2012 at 7:54 AM, Andreas Hartmann
<[email protected]> wrote:
>
> I always have to issue a "depmod -a" after make install. You can check
> if the new modules are used afterwards with
> "modinfo modname[without .ko]" and check the given path. It should
> contain "updates".
> Sometimes, it is necessary for me to insert a "depmod -a" even before
> make install, because of missing files, which are needed by the
> installation and which are created by depmod -a.

Hi Andreas,

I hope you can help me a bit further cause I don't know what's going on...

# lsmod | grep 80211
mac80211 157166 1 ath5k
cfg80211 111132 3 ath5k,ath,mac80211
rfkill 6676 1 cfg80211

# lshw -C network
*-network:0
description: Ethernet interface
product: VT6105M [Rhine-III]
vendor: VIA Technologies, Inc.
physical id: 9
bus info: pci@0000:00:09.0
logical name: eth0
version: 96
serial: 00:0d:b9:16:4b:0c
size: 100MB/s
capacity: 100MB/s
width: 32 bits
clock: 33MHz
capabilities: pm bus_master cap_list ethernet physical tp mii
10bt 10bt-fd 100bt 100bt-fd autonegotiation
configuration: autonegotiation=on broadcast=yes
driver=via-rhine driverversion=1.5.0 duplex=full latency=64 link=yes
maxlatency=8 mingnt=3 multicast=yes port=MII speed=100MB/s
resources: irq:11 ioport:fc00(size=256) memory:effff000-effff0ff
*-network:1
description: Wireless interface
product: AR5413 802.11abg NIC
vendor: Atheros Communications Inc.
physical id: c
bus info: pci@0000:00:0c.0
logical name: wlan0
version: 01
serial: 00:0b:6b:2e:25:d5
width: 32 bits
clock: 33MHz
capabilities: pm bus_master cap_list ethernet physical wireless logical
configuration: broadcast=yes driver=ath5k
driverversion=3.0.0-voyage firmware=N/A latency=168 link=yes
maxlatency=28 mingnt=10 multicast=yes wireless=IEEE 802.11abg
resources: irq:10 memory:effd0000-effdffff

both commands confirm I'm using the ath5k driver (as I knew).

# modinfo ath5k
filename:
/lib/modules/3.0.0-voyage/kernel/drivers/net/wireless/ath/ath5k/ath5k.ko
license: Dual BSD/GPL
description: Support for 5xxx series of Atheros 802.11 wireless LAN cards.
author: Nick Kossifidis
author: Jiri Slaby
alias: pci:v0000168Cd0000001Dsv*sd*bc*sc*i*
alias: pci:v0000168Cd0000001Csv*sd*bc*sc*i*
alias: pci:v0000168Cd0000001Bsv*sd*bc*sc*i*
alias: pci:v0000168Cd0000001Asv*sd*bc*sc*i*
alias: pci:v0000168Cd00000019sv*sd*bc*sc*i*
alias: pci:v0000168Cd00000018sv*sd*bc*sc*i*
alias: pci:v0000168Cd00000017sv*sd*bc*sc*i*
alias: pci:v0000168Cd00000016sv*sd*bc*sc*i*
alias: pci:v0000168Cd00000015sv*sd*bc*sc*i*
alias: pci:v0000168Cd00000014sv*sd*bc*sc*i*
alias: pci:v0000168Cd00001014sv*sd*bc*sc*i*
alias: pci:v000010B7d00000013sv*sd*bc*sc*i*
alias: pci:v0000A727d00000013sv*sd*bc*sc*i*
alias: pci:v0000168Cd00000013sv*sd*bc*sc*i*
alias: pci:v0000168Cd00000012sv*sd*bc*sc*i*
alias: pci:v0000168Cd00000011sv*sd*bc*sc*i*
alias: pci:v0000168Cd00000007sv*sd*bc*sc*i*
alias: pci:v0000168Cd00000207sv*sd*bc*sc*i*
depends: mac80211,cfg80211,ath
intree: Y
vermagic: 3.0.0-voyage SMP preempt mod_unload 486
parm: debug:uint
parm: nohwcrypt:Disable hardware encryption. (bool)
parm: all_channels:Expose all channels the device can use. (bool)
parm: fastchanswitch:Enable fast channel switching for
AR2413/AR5413 radios. (bool)

# find / | grep ath5k.ko
/lib/modules/3.0.0-voyage/kernel/drivers/net/wireless/ath/ath5k/ath5k.ko
/lib/modules/3.0.0/updates/drivers/net/wireless/ath/ath5k/ath5k.ko
/root/compat-wireless-3.3-rc1-2/drivers/net/wireless/ath/ath5k/ath5k.ko
/root/compat-wireless-3.3-rc1-2/drivers/net/wireless/ath/ath5k/.ath5k.ko.cmd

I tried depmod -a and also a simple reboot (which I always do after
make install) but the "updates" module is never loaded.

Any idea?

thanks,
alfonso

>
> Kind regards,
> Andreas

2012-02-10 06:57:12

by Andreas Hartmann

[permalink] [raw]
Subject: Re: Setting up an AP @ 5 GHz 802.11a - hostapd refuses [Could not select hw_mode and channel. (-1)]

Alfonso Fiore schrieb:
> On Tue, Feb 7, 2012 at 11:15 PM, Pavel Roskin <[email protected]> wrote:
>>
>> On Tue, 7 Feb 2012 09:20:53 +0100
>> Alfonso Fiore <[email protected]> wrote:
>>
>>> I also found out about ath_info
>>> http://madwifi-project.org/wiki/UserDocs/AthInfo and I rewrote my
>>> regdomain:
>>> ./ath_info -v -g 4:0 -w 0xeffd0000 regdomain 0x68
>>
>> That may be dangerous. Not all cards work with ath_info, and some can
>> be broken by it permanently. It's much safer to adjust
>> ath_regd_sanitize() in drivers/net/wireless/ath/regd.c.
>
> Hi Pavel and thank you,
>
> I tried for days and finally I realized that when I do "make install"
> still my box does not run my new code.
> The only way I managed to use 5 GHz channels was setting my regdomain
> to 0x00 with ath_info.
>
> I really would like to know why my debian based box does not run my
> modified compat-wireless code after "make install".

I always have to issue a "depmod -a" after make install. You can check
if the new modules are used afterwards with
"modinfo modname[without .ko]" and check the given path. It should
contain "updates".
Sometimes, it is necessary for me to insert a "depmod -a" even before
make install, because of missing files, which are needed by the
installation and which are created by depmod -a.


Kind regards,
Andreas