I cant scan my AP ssid using RT61 by hostapd

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

bonfig

12-01-2009 09:45:40

I cant see the AP from another machine. I compile rt2x00 kernel and hostap.git in Fedora 10, and recompile libnl-1.1 ,why?


ifconfig
[code1kio0nsy]
mon.wlan0 Link encap:UNSPEC HWaddr 00-19-DB-98-CC-5B-F4-2F-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:353 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:25165 (24.5 KiB) TX bytes:0 (0.0 b)

wlan0 Link encap:Ethernet HWaddr 00:19:DB:98:CC:5B
inet6 addr: fe80::219:dbff:fe98:cc5b/64 Scope:Link
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:576 (576.0 b)

wmaster0 Link encap:UNSPEC HWaddr 00-19-DB-98-CC-5B-F4-2F-00-00-00-00-00-00-00-00
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
[/code1kio0nsy]

iwconfig
[code1kio0nsy]
wlan0 IEEE 802.11bg Mode:Master Frequency:2.412 GHz Tx-Power=15 dBm
Retry min limit:7 RTS thr:off Fragment thr=2352 B
Encryption key:1D89-BD7A-3F1E-E4F3-7493-B238-6D0F-6F40-EDDE-7526-3088-ACBD-211D-3821-E16D-BAA8 [2]
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

mon.wlan0 IEEE 802.11bg Mode:Monitor Frequency:2.412 GHz Tx-Power=15 dBm
Retry min limit:7 RTS thr:off Fragment thr=2352 B
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

[/code1kio0nsy]



hostapd.conf
[code1kio0nsy]
interface=wlan0
driver=nl80211

logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2

dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=Tux
macaddr_acl=0
auth_algs=3
eap_server=0
eap_message=hello
eapol_key_index_workaround=0
own_ip_addr=127.0.0.1
wpa=3
ieee8021x=0
wpa_passphrase=secretpassword
wpa_key_mgmt=WPA-PSK
wpa_pairwise=CCMP TKIP
hw_mode=g
channel=1

[/code1kio0nsy]

bonfig

13-01-2009 02:05:52

What mistakes? I see other people's information is as follows

[code39q2aego]
iwconfig wlan0
wlan0 IEEE 802.11bg ESSID:"molihua-test"
Mode:Master Frequency:2.447 GHz Tx-Power=16 dBm
Retry min limit:7 RTS thr:off Fragment thr=2352 B
Encryption key:****-****-****-****-****-****-****-**** [3]
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0[/code39q2aego]

but my info is
[code39q2aego]
wlan0 IEEE 802.11bg Mode:Master Frequency:2.412 GHz Tx-Power=15 dBm
Retry min limit:7 RTS thr=2347 B Fragment thr=2346 B
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
[/code39q2aego]

I cant see essid in the above info, does this mean there is a problem?
and i cant see the AP from another machine, who can help me !

CheerfulBoy

20-01-2009 19:51:27

r u sure, that hostapd is running?
Latest kernel included new interface for cfg80211 calling CRDA. It's disallow using channel hostapd option. For example

[code2wn8qgen]# uname -r
2.6.28-gentoo-r1

# hostapd -v
hostapd v0.6.7

# cat /etc/hostapd/hostapd.conf | egrep ^channel
channel=7[/code2wn8qgen]

[code2wn8qgen]# /etc/init.d/hostapd restart
* Stopping hostapd ...
* Starting hostapd ...
Configuration file: /etc/hostapd/hostapd.conf
Mode: IEEE 802.11g Channel: 7 Frequency: 2442 MHz
Could not set channel for kernel driver
rmdir[ctrl_interface]: No such file or directory[/code2wn8qgen]

IvD

20-01-2009 22:08:57

As you said, CRDA is blocking the channel switch. This means you must specify the correct country code in your configuration, and make sure you country allows the channel you want to switch to.

CheerfulBoy

20-01-2009 22:23:50

IvD, can u help me? I have problem with scanning my AP.

[code13b2dw31][b]hostapd.conf[/b]

interface=wlan0
driver=nl80211
logger_syslog=-1
logger_syslog_level=2
logger_stdout=-1
logger_stdout_level=2
dump_file=/tmp/hostapd.dump
ctrl_interface=/var/run/hostapd
ctrl_interface_group=0
ssid=Homenetwork
country_code=RU-KYA
hw_mode=g
[b]#channel=7[/b][/code13b2dw31]

[code13b2dw31][b]dmesg[/b]

cfg80211: Calling CRDA for country: RU
cfg80211: Regulatory domain changed to country: RU
(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
(2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)[/code13b2dw31]

[code13b2dw31]# iw phy phy0 info
Wiphy phy0
Band 1:
Frequencies:
* 2412 MHz [1]
* 2417 MHz [2]
* 2422 MHz [3]
* 2427 MHz [4]
* 2432 MHz [5]
* 2437 MHz [6]
* 2442 MHz [7]
* 2447 MHz [8]
* 2452 MHz [9]
* 2457 MHz [10]
* 2462 MHz [11]
* 2467 MHz [12]
* 2472 MHz [13]
* 2484 MHz [14] (disabled)
Bitrates:
* 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
Supported interface modes:
* IBSS
* Station
* AP
* AP(VLAN)
* Monitor[/code13b2dw31]

As I can understand from latest listing - I can switch channel from 1 to 14. This is right? But after uncomment channel=7 in hostapd.conf and restarted that I got error "Could not set channel for kernel driver". I'd try many numbers of channels with same results. Wherein hostapd 0.6.6 works fine with channel option. What's going on?

IvD

20-01-2009 22:27:14

Try posting this issue on the hostapd mailinglist, they know more about configuring hostapd.

mizvekov

31-01-2009 00:00:33

I'm having exactly the same problem.
Tried setting a channel manually after hostapd starts, using iwconfig or iw,
but that makes no difference too.

IvD

31-01-2009 09:03:22

Well for obvious reasons my previous comment applied to you then as well
[quote3vhf1n1g]Try posting this issue on the hostapd mailinglist, they know more about configuring hostapd.[/quote3vhf1n1g]

cengique

17-02-2009 16:44:46

IvD, can u help me? I have problem with scanning my AP.
[code10osrqdo][b]dmesg[/b]

cfg80211: Calling CRDA for country: RU
cfg80211: Regulatory domain changed to country: RU
(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
(2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)[/code10osrqdo]

As I can understand from latest listing - I can switch channel from 1 to 14. This is right? But after uncomment channel=7 in hostapd.conf and restarted that I got error "Could not set channel for kernel driver". I'd try many numbers of channels with same results. Wherein hostapd 0.6.6 works fine with channel option. What's going on?[/quote10osrqdo]

I had the same problem and I solved it by upgrading my udev to 0.125-7. I also installed CRDA, but I am not sure if it was essential. I got the hint from the hostapd mailing list

http//lists.shmoo.com/pipermail/hostap ... 19292.html

After you get udev (and crda?) working, you should get a list of allowed channels in your hostapd output [code10osrqdo]Configuration file: /etc/hostapd/hostapd-crda.conf
ctrl_interface_group=0
Opening raw packet socket for ifindex -1
BSS count 1, BSSID mask ff:ff:ff:ff:ff:ff (0 bits)
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
nl80211: Added 802.11b mode based on 802.11g information
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=4 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=4 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=4 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=4 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=5 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=5 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=5 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=5 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=6 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=6 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=6 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=4 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=4 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=4 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=4 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=5 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=5 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=5 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=5 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=6 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=6 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=6 dBm
[/code10osrqdo]

I am using Debian testing/unstable with rt2x00 git kernel 2.6.29-rc3 and the git 0.7.0 version of hostapd. Both libnl1.1 and lib2.0 works. There's no crda package in Debian, so I installed it from http//wireless.kernel.org/en/developer ... atory/CRDA

There is a post in this forum describing the procedure viewtopic.php?f=5&t=4963&p=32214&hilit=crda+udev#p32214

Good luck! Mine works with WPA2 now! D