hostap: Failed to set country code (RT61)

Live forum: http://rt2x00.serialmonkey.com/viewtopic.php?t=5142

Hoso

27-12-2008 03:52:50

I finally managed to compile drivers for RT61 that support master mode by using v2.6.27 of rt2x00 with 004-allow-ap-vlan-modes.patch[/url3hgslp29].
Latest version didn't compile with gcc-4.3.2 and g++-4.3.2.

But now that I try to start hostapd I get
[code3hgslp29]
# hostapd -P /var/run/hostapd.pid -dd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
ctrl_interface_group=0
Opening raw packet socket for ifindex 147424336
BSS count 1, BSSID mask ff:ff:ff:ff:ff:ff (0 bits)
Failed to set country code
wlan0: Unable to setup interface.
rmdir[ctrl_interface]: No such file or directory
[/code3hgslp29]
I have tried country codes FI and US

Here's my hostapd.conf
[code3hgslp29]
interface=wlan0
driver=nl80211

country_code=FI
logger_syslog=-1
logger_syslog_level=2
logger_stdout=1
logger_stdout_level=2
ssid=NSMAS
channel=6
hw_mode=g
macaddr_acl=0
auth_algs=1 # 802.11 Open System Authentication (no WEP)
eap_server=0
own_ip_addr=192.168.2.20
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
[/code3hgslp29]

cengique

15-02-2009 22:45:41

I finally managed to compile drivers for RT61 that support master mode by using v2.6.27 of rt2x00 with 004-allow-ap-vlan-modes.patch[/url221f45dk]. Latest version didn't compile with gcc-4.3.2 and g++-4.3.2.

But now that I try to start hostapd I get[code221f45dk]
Failed to set country code[/code221f45dk][/quote221f45dk]

(I was completely delusional when I last responded, so I edited it out.)

If you get errors about 'cannot set country code' or 'cannot set channel' with the newer kernel drivers and hostapd versions >0.6.6, it's probably because you don't have a recent enough version of udev that can communicate from the the userspace to the kernel for the CRDA regulation system to work. See this post for more details
viewtopic.php?f=5&t=5157&p=32220#p32220