Unable to set my channel with hostapd

Francisco Cuesta ndarkness at gmail.com
Mon Apr 29 08:00:46 EDT 2013


When I start the router


Compat-drivers backport release: compat-drivers-2012-09-04-2-gddac993
[    8.900000] Backport based on wireless-testing.git master-2012-09-07
[    8.900000] compat.git: wireless-testing.git
[    8.930000] cfg80211: Calling CRDA to update world regulatory domain
[    8.930000] cfg80211: World regulatory domain updated:
[    8.940000] cfg80211:   (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp)
[    9.200000] usbcore: registered new interface driver usbfs
[    9.210000] usbcore: registered new interface driver hub
[    9.220000] usbcore: registered new device driver usb
[    9.660000] ath: EEPROM regdomain: 0x0
[    9.660000] ath: EEPROM indicates default country code should be used
[    9.660000] ath: doing EEPROM country->regdmn map search
[    9.660000] ath: country maps to regdmn code: 0x3a
[    9.660000] ath: Country alpha2 being used: US
[    9.660000] ath: Regpair used: 0x3a
[    9.660000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[    9.660000] Registered led device: ath9k-phy0
[    9.660000] ieee80211 phy0: Atheros AR9340 Rev:0 mem=0xb8100000, irq=47
[    9.670000] PCI: Enabling device 0000:00:00.0 (0000 -> 0002)
[    9.680000] ath: EEPROM regdomain: 0x0
[    9.680000] ath: EEPROM indicates default country code should be used
[    9.680000] ath: doing EEPROM country->regdmn map search
[    9.680000] ath: country maps to regdmn code: 0x3a
[    9.680000] ath: Country alpha2 being used: US
[    9.680000] ath: Regpair used: 0x3a
[    9.680000] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[    9.690000] Registered led device: ath9k-phy1
[    9.690000] ieee80211 phy1: Atheros AR9300 Rev:4 mem=0xb0000000, irq=40
[    9.700000] cfg80211: Calling CRDA for country: US
[    9.700000] cfg80211: Regulatory domain changed to country: US
[    9.710000] cfg80211:   (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp)
[    9.710000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz),
(300 mBi, 2700 mBm)
[    9.720000] cfg80211:   (4400000 KHz - 4940000 KHz @ 40000 KHz),
(N/A, 3100 mBm)
[    9.730000] cfg80211:   (4910000 KHz - 4990000 KHz @ 20000 KHz),
(N/A, 3100 mBm)
[    9.740000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz),
(N/A, 3100 mBm)
[    9.740000] cfg80211:   (5250000 KHz - 5330000 KHz @ 40000 KHz),
(N/A, 3100 mBm)
[    9.750000] cfg80211:   (5490000 KHz - 5600000 KHz @ 40000 KHz),
(N/A, 3100 mBm)
[    9.760000] cfg80211:   (5650000 KHz - 5710000 KHz @ 40000 KHz),
(N/A, 3100 mBm)
[    9.770000] cfg80211:   (5735000 KHz - 6480000 KHz @ 40000 KHz),
(N/A, 3100 mBm)
[    9.770000] cfg80211:   (4490000 KHz - 4910000 KHz @ 40000 KHz),
(N/A, 3100 mBm)
[    9.780000] cfg80211:   (2212000 KHz - 2720000 KHz @ 40000 KHz),
(N/A, 3100 mBm)


This is the dmesg output after typing wifi

[ 4472.280000] cfg80211: Calling CRDA for country: US
[ 4472.290000] cfg80211: Regulatory domain changed to country: US
[ 4472.290000] cfg80211:   (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp)
[ 4472.300000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz),
(300 mBi, 2700 mBm)
[ 4472.310000] cfg80211:   (4400000 KHz - 4940000 KHz @ 40000 KHz),
(N/A, 3100 mBm)
[ 4472.310000] cfg80211:   (4910000 KHz - 4990000 KHz @ 20000 KHz),
(N/A, 3100 mBm)
[ 4472.320000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz),
(N/A, 3100 mBm)
[ 4472.330000] cfg80211:   (5250000 KHz - 5330000 KHz @ 40000 KHz),
(N/A, 3100 mBm)
[ 4472.340000] cfg80211:   (5490000 KHz - 5600000 KHz @ 40000 KHz),
(N/A, 3100 mBm)
[ 4472.350000] cfg80211:   (5650000 KHz - 5710000 KHz @ 40000 KHz),
(N/A, 3100 mBm)
[ 4472.350000] cfg80211:   (5735000 KHz - 6480000 KHz @ 40000 KHz),
(N/A, 3100 mBm)
[ 4472.360000] cfg80211:   (4490000 KHz - 4910000 KHz @ 40000 KHz),
(N/A, 3100 mBm)
[ 4472.370000] cfg80211:   (2212000 KHz - 2720000 KHz @ 40000 KHz),
(N/A, 3100 mBm)
[ 4473.950000] device wlan0 entered promiscuous mode
[ 4474.010000] device wlan0 left promiscuous mode
[ 4474.020000] br-lan: port 2(wlan0) entered disabled state
[ 4474.890000] device wlan1 entered promiscuous mode
[ 4474.940000] device wlan1 left promiscuous mode
[ 4474.950000] br-lan: port 2(wlan1) entered disabled state
[ 4523.910000] device wlan0 entered promiscuous mode
[ 4523.970000] device wlan0 left promiscuous mode
[ 4523.980000] br-lan: port 2(wlan0) entered disabled state
[ 4524.860000] device wlan1 entered promiscuous mode
[ 4524.910000] device wlan1 left promiscuous mode
[ 4524.920000] br-lan: port 2(wlan1) entered disabled state
[ 5691.400000] device wlan0 entered promiscuous mode
[ 5691.460000] br-lan: port 2(wlan0) entered forwarding state
[ 5691.470000] br-lan: port 2(wlan0) entered forwarding state
[ 5693.470000] br-lan: port 2(wlan0) entered forwarding state
[ 5694.680000] device wlan1 entered promiscuous mode
[ 5694.730000] device wlan1 left promiscuous mode
[ 5694.740000] br-lan: port 3(wlan1) entered disabled state
[ 5716.660000] device wlan0 left promiscuous mode
[ 5716.660000] br-lan: port 2(wlan0) entered disabled state
[ 5717.540000] device wlan0 entered promiscuous mode
[ 5717.610000] br-lan: port 2(wlan0) entered forwarding state
[ 5717.620000] br-lan: port 2(wlan0) entered forwarding state
[ 5719.620000] br-lan: port 2(wlan0) entered forwarding state
[ 5720.640000] device wlan1 entered promiscuous mode
[ 5720.690000] device wlan1 left promiscuous mode
[ 5720.700000] br-lan: port 3(wlan1) entered disabled state
[ 6787.000000] device wlan0 left promiscuous mode
[ 6787.000000] br-lan: port 2(wlan0) entered disabled state
[ 6787.900000] device wlan0 entered promiscuous mode
[ 6787.960000] br-lan: port 2(wlan0) entered forwarding state
[ 6787.970000] br-lan: port 2(wlan0) entered forwarding state
[ 6789.970000] br-lan: port 2(wlan0) entered forwarding state
[ 6790.980000] device wlan1 entered promiscuous mode
[ 6791.030000] device wlan1 left promiscuous mode
[ 6791.040000] br-lan: port 3(wlan1) entered disabled state
[ 6832.140000] device wlan0 left promiscuous mode
[ 6832.140000] br-lan: port 2(wlan0) entered disabled state
[ 6834.080000] device wlan0 entered promiscuous mode
[ 6834.150000] device wlan0 left promiscuous mode
[ 6834.150000] br-lan: port 2(wlan0) entered disabled state
[ 6834.930000] device wlan1 entered promiscuous mode
[ 6834.980000] device wlan1 left promiscuous mode
[ 6834.990000] br-lan: port 2(wlan1) entered disabled state
[ 6850.440000] device wlan0 entered promiscuous mode
[ 6850.500000] device wlan0 left promiscuous mode
[ 6850.510000] br-lan: port 2(wlan0) entered disabled state
[ 6851.370000] device wlan1 entered promiscuous mode
[ 6851.430000] device wlan1 left promiscuous mode
[ 6851.430000] br-lan: port 2(wlan1) entered disabled state
[ 6855.600000] device wlan0 entered promiscuous mode
[ 6855.660000] device wlan0 left promiscuous mode
[ 6855.660000] br-lan: port 2(wlan0) entered disabled state
[ 6856.530000] device wlan1 entered promiscuous mode
[ 6856.580000] device wlan1 left promiscuous mode
[ 6856.580000] br-lan: port 2(wlan1) entered disabled state
[11581.430000] device wlan0 entered promiscuous mode
[11581.490000] device wlan0 left promiscuous mode
[11581.490000] br-lan: port 2(wlan0) entered disabled state
[11582.230000] device wlan1 entered promiscuous mode
[11582.300000] device wlan1 left promiscuous mode
[11582.300000] br-lan: port 2(wlan1) entered disabled state
[12851.970000] device wlan0 entered promiscuous mode
[12852.040000] device wlan0 left promiscuous mode
[12852.040000] br-lan: port 2(wlan0) entered disabled state
[12852.670000] device wlan1 entered promiscuous mode
[12852.730000] device wlan1 left promiscuous mode
[12852.730000] br-lan: port 2(wlan1) entered disabled state
[13765.840000] device wlan0 entered promiscuous mode
[13765.920000] device wlan0 left promiscuous mode
[13765.920000] br-lan: port 2(wlan0) entered disabled state
[13766.540000] device wlan1 entered promiscuous mode
[13766.600000] device wlan1 left promiscuous mode
[13766.610000] br-lan: port 2(wlan1) entered disabled state

2013/4/29 Krishna Chaitanya <chaitanya.mgit at gmail.com>:
> On Mon, Apr 29, 2013 at 2:59 PM, Francisco Cuesta <ndarkness at gmail.com> wrote:
>>
>> By the way, is there any function in hostapd that maps the frequency
>> to channels and channels to frequency? if so, could anyone tell me
>> where they're located?
>>
>> thanks in advance!
>>
>> 2013/4/29 Francisco Cuesta <ndarkness at gmail.com>:
>> > Hi Luciano,
>> >
>> > Thanks in advance,
>> >
>> > I have modified my regulatory data base for USA in order to be able to
>> > use that channel
>> >
>> >  iw reg get
>> > country US:
>> >     (2412 - 2484 @ 40), (3, 27)
>> >     (4400 - 4940 @ 40), (N/A, 31)
>> >     (4910 - 4990 @ 20), (N/A, 31)
>> >     (5170 - 5250 @ 40), (N/A, 31)
>> >     (5250 - 5330 @ 40), (N/A, 31), DFS
>> >     (5490 - 5600 @ 40), (N/A, 31), DFS
>> >     (5650 - 5710 @ 40), (N/A, 31), DFS
>> >     (5735 - 6480 @ 40), (N/A, 31)
>> >
>> > But even though, I was getting the same error, do you have another good idea?
>> >
>> > thanks again!
>> >
>> >
>> >
>> >
>> > 2013/4/29 Luciano Coelho <coelho at ti.com>:
>> >> On Mon, 2013-04-29 at 12:01 +0300, Luciano Coelho wrote:
>> >>> Hi Francisco,
>> >>>
>> >>> On Mon, 2013-04-29 at 10:27 +0200, Francisco Cuesta wrote:
>> >>> > Hello,  thanks for replying,
>> >>> >
>> >>> > I'm using ath9k driver in openwrt with hostapd v2.0-devel.
>> >>> >
>> >>> > iw reg get
>> >>> >     (2412 - 2472 @ 40), (3, 27)
>> >>> >     (5170 - 5250 @ 40), (N/A, 31)
>> >>> >     (5250 - 5330 @ 40), (N/A, 31), DFS
>> >>> >     (5490 - 5600 @ 40), (N/A, 31), DFS
>> >>> >     (5650 - 5710 @ 40), (N/A, 31), DFS
>> >>>
>> >>> Here you can see that the channel you want to use is not allowed by the
>> >>> regulatory code.  It seems that you're using "00" as the country
>> >>> (world).  From the regulatory database [1], you can see that channel 196
>> >>> (4980 MHz) is only allowed in Japan (regulatory country "JP").
>> >>
>> >> Forgot to paste the link to the regulatory database:
>> >>
>> >> http://git.kernel.org/cgit/linux/kernel/git/linville/wireless-regdb.git/tree/db.txt
>> >>
>> >>>
>> >>> > iw list
>> >>> >
>> >>> > Frequencies:
>> >>> >             * 5180 MHz [36] (17.0 dBm)
>> >>> >             * 5200 MHz [40] (21.0 dBm)
>> >>> >             * 5220 MHz [44] (17.0 dBm)
>> >>> >             * 5240 MHz [48] (17.0 dBm)
>> >>> >             * 5260 MHz [52] (17.0 dBm) (radar detection)
>> >>> >             * 5280 MHz [56] (17.0 dBm) (radar detection)
>> >>> >             * 5300 MHz [60] (17.0 dBm) (radar detection)
>> >>> >             * 5320 MHz [64] (17.0 dBm) (radar detection)
>> >>> >             * 5500 MHz [100] (17.0 dBm) (radar detection)
>> >>> >             * 5520 MHz [104] (21.0 dBm) (radar detection)
>> >>> >             * 5540 MHz [108] (21.0 dBm) (radar detection)
>> >>> >             * 5560 MHz [112] (21.0 dBm) (radar detection)
>> >>> >             * 5580 MHz [116] (21.0 dBm) (radar detection)
>> >>> >             * 5600 MHz [120] (disabled)
>> >>> >             * 5620 MHz [124] (disabled)
>> >>> >             * 5640 MHz [128] (disabled)
>> >>> >             * 5660 MHz [132] (17.0 dBm) (radar detection)
>> >>> >             * 5680 MHz [136] (17.0 dBm) (radar detection)
>> >>> >             * 5700 MHz [140] (17.0 dBm) (radar detection)
>> >>> >             * 5745 MHz [149] (21.0 dBm)
>> >>> >             * 5765 MHz [153] (21.0 dBm)
>> >>> >             * 5785 MHz [157] (21.0 dBm)
>> >>> >             * 5805 MHz [161] (21.0 dBm)
>> >>> >             * 5825 MHz [165] (20.0 dBm)
>> >>> >             * 4915 MHz [183] (21.0 dBm)
>> >>> >             * 4920 MHz [184] (21.0 dBm)
>> >>> >             * 4925 MHz [185] (21.0 dBm)
>> >>> >             * 4930 MHz [186] (21.0 dBm)
>> >>> >             * 4935 MHz [187] (21.0 dBm)
>> >>> >             * 4940 MHz [188] (21.0 dBm)
>> >>> >             * 4945 MHz [189] (21.0 dBm)
>> >>> >             * 4960 MHz [192] (21.0 dBm)
>> >>> >             * 4980 MHz [196] (21.0 dBm)
>> >>>
>> >>> This shows that the driver supports 4980, but it won't be able to use it
>> >>> if the regulatory doesn't allow it.
>> >>>
>> >>>
>> >>> > But, could you explain me the reason behing I get this error, I mean,
>> >>> > what does it mean, for instance  problem with the interface, the
>> >>> > channel isn't supported by the driver ..., I would like to understand
>> >>> > it, not just resolve it.
>> >>>
>> >>> This is because the radio regulations in the country you're choosing
>> >>> ("world" is a set of frequencies that is valid in *every* country)
>> >>> doesn't allow WiFi operation on the channel you want to use.  You can
>> >>> only legally use channel 196 in Japan.  So, if you are in Japan, you can
>> >>> do this:
>>
>
> As said earlier, Channel config is not only controlled by hostapd but also
>  cfg80211 and driver.so if you can share the dmesg, then we can see why
> the driver/cfg80211 has disabled that particular channel even though
> its supported.


More information about the HostAP mailing list