rt2x00.serialmonkey.com

Support forum for the rt2x00 project
It is currently Fri Sep 10, 2010 6:00 am

All times are UTC




Post new topic Reply to topic  [ 58 posts ]  Go to page Previous  1, 2, 3, 4
Author Message
 Post subject: Re: rt2x00 master mode HOWTO
PostPosted: Sat Feb 28, 2009 6:06 am 
Offline

Joined: Sat Feb 28, 2009 5:53 am
Posts: 6
Location: Yekaterinburg, Russia
Hi all
I' ve been tracking the discussion for a while for I have RaLink RT2561/RT61 card and want to set AP with it. However, I am completely lost in all variants of configuration described in this forum. The one thing which I did for certain is compiling a 2.6.29-rc3-wl git kernel.
Nevertheless, after this I'm unable to set my card in master mode and I suppose I miss some technicality
I've also known from this forum that for some kernels it's necessary to apply something-like-80211-patch, but for 28 and onwards it isn't, yes?
Could you help me for a little?


Top
 Profile  
 
 Post subject: Re: rt2x00 master mode HOWTO
PostPosted: Mon Mar 02, 2009 8:09 pm 
Offline

Joined: Wed Feb 08, 2006 4:13 am
Posts: 18
Crystal wrote:
Hi all
Nevertheless, after this I'm unable to set my card in master mode and I suppose I miss some technicality

Can you be more specific? What happens when you run hostapd? What version of hostapd are you using?

Crystal wrote:
I've also known from this forum that for some kernels it's necessary to apply something-like-80211-patch, but for 28 and onwards it isn't, yes?

No need for a patch if you're compiling the rt2x00 GIT kernel. See the post on at end of page 3 for details.

_________________
--Cengiz


Top
 Profile  
 
 Post subject: Re: rt2x00 master mode HOWTO
PostPosted: Tue Mar 03, 2009 10:29 am 
Offline

Joined: Sat Oct 04, 2008 12:25 am
Posts: 8
I think the thing that is still missing is the hostapd with the nl80211 driver. Binary shipped versions of the hostapd normally don't have this driver compiled in yet. So you need to recompile it for your installation. For the hostapd configuration please see the previous posts by me.

cheers, ganto


Top
 Profile  
 
 Post subject: Re: rt2x00 master mode HOWTO
PostPosted: Sat Mar 07, 2009 7:22 am 
Offline

Joined: Sat Feb 28, 2009 5:53 am
Posts: 6
Location: Yekaterinburg, Russia
my installed hostapd is v0.5.9
then i tried to compile it from sources as it was said a page ago
first i downloaded libnl and got it installed
then i tried to amend def_config file in hostapd sources dir so as paths for libnl are correct
However, i get this output at the attemp of compilation:
Code:
crystal@Crystal:~/OperaDownloads/cogito-0.18.1/hostap/hostapd$ make
cc -MMD -O2 -Wall -g -DHOSTAPD_DUMP_STATE -I../src -I../src/crypto -I../src/utils -I../src/common /usr/local/include -DCONFIG_CTRL_IFACE -DCONFIG_CTRL_IFACE_UNIX -DCONFIG_IAPP -DCONFIG_RSN_PREAUTH -DCONFIG_PEERKEY -DCONFIG_IEEE80211N -DCONFIG_DRIVER_HOSTAP -DCONFIG_DRIVER_NL80211 -DEAP_MD5 -DEAP_TLS -DEAP_PEAP -DEAP_TTLS -DEAP_MSCHAPv2 -DEAP_GTC -DEAP_SERVER -DEAP_TLS_FUNCS -DPKCS12_FUNCS -DINTERNAL_SHA256 -DCONFIG_NO_FIPS186_2_PRF -DCONFIG_NO_T_PRF -DCONFIG_IPV6 -DNEED_MLME   -c -o driver_nl80211.o driver_nl80211.c
driver_nl80211.c: In function ‘send_and_recv_msgs’:
driver_nl80211.c:190: warning: passing argument 1 of ‘nl_send_auto_complete’ from incompatible pointer type
driver_nl80211.c:205: warning: passing argument 1 of ‘nl_recvmsgs’ from incompatible pointer type
driver_nl80211.c: In function ‘i802_init_sockets’:
driver_nl80211.c:2540: warning: implicit declaration of function ‘nl_handle_alloc_cb’
driver_nl80211.c:2540: warning: assignment makes pointer from integer without a cast
driver_nl80211.c:2546: warning: passing argument 1 of ‘genl_connect’ from incompatible pointer type
driver_nl80211.c:2557: warning: passing argument 1 of ‘genl_ctrl_alloc_cache’ from incompatible pointer type
driver_nl80211.c:2557: error: too few arguments to function ‘genl_ctrl_alloc_cache’
driver_nl80211.c: In function ‘i802_deinit’:
driver_nl80211.c:3016: warning: implicit declaration of function ‘nl_handle_destroy’
make: *** [driver_nl80211.o] Error 1


Top
 Profile  
 
 Post subject: Re: rt2x00 master mode HOWTO
PostPosted: Sat Mar 07, 2009 9:13 am 
Offline
Site Admin

Joined: Sun Jun 05, 2005 1:01 pm
Posts: 5880
Location: Haarlem, The Netherlands
Well compile problems for hostapd belong on a hostapd forum or mailinglist where the developers might provide support.

_________________
Regards,
Ivo van Doorn
Project Administrator
http://rt2x00.serialmonkey.com


Top
 Profile  
 
 Post subject: Re: rt2x00 master mode HOWTO
PostPosted: Mon Mar 09, 2009 5:44 pm 
Offline

Joined: Sat Feb 28, 2009 5:53 am
Posts: 6
Location: Yekaterinburg, Russia
the thing was in CONFIG_libnl20 not set
if not set, function applies with two arguments , so call with one was regarded erronous
after i compiled hostapd I had to
Code:
root@Crystal:~# export LD_LIBRARY_PATH=/usr/local/lib
every time I have to run hostapd , otherwise he won't locate libnl2.0
And even after that (and after CRDA was installed in place) and master mode was put in action, I still can't see my network in the available networks list...
Code:
$ sudo cat /etc/hostapd/hostapd.conf | awk /^[^#].*$/
interface=wlan0
driver=nl80211
logger_syslog=0
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
ssid=test
country_code=RU
ieee80211d=1
hw_mode=g
beacon_int=100
dtim_period=2
max_num_sta=255
rts_threshold=2347
fragm_threshold=2346
macaddr_acl=0
auth_algs=3
ignore_broadcast_ssid=0
wme_enabled=1
wme_ac_bk_cwmin=4
wme_ac_bk_cwmax=10
wme_ac_bk_aifs=7
wme_ac_bk_txop_limit=0
wme_ac_bk_acm=0
wme_ac_be_aifs=3
wme_ac_be_cwmin=4
wme_ac_be_cwmax=10
wme_ac_be_txop_limit=0
wme_ac_be_acm=0
wme_ac_vi_aifs=2
wme_ac_vi_cwmin=3
wme_ac_vi_cwmax=4
wme_ac_vi_txop_limit=94
wme_ac_vi_acm=0
wme_ac_vo_aifs=2
wme_ac_vo_cwmin=2
wme_ac_vo_cwmax=3
wme_ac_vo_txop_limit=47
wme_ac_vo_acm=0
wep_default_key=1
wep_key0=9049857783
wep_key1="vwxyz"
eapol_key_index_workaround=0
eap_server=0
own_ip_addr=127.0.0.1

$ iwconfig wlan0
wlan0     IEEE 802.11bg  Mode:Master  Frequency:2.412 GHz  Tx-Power=17 dBm
          Retry min limit:7   RTS thr=2347 B   Fragment thr=2346 B
          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


Top
 Profile  
 
 Post subject: Re: rt2x00 master mode HOWTO
PostPosted: Mon Mar 09, 2009 6:00 pm 
Offline

Joined: Wed Feb 08, 2006 4:13 am
Posts: 18
Crystal wrote:
after i compiled hostapd I had to
Code:
root@Crystal:~# export LD_LIBRARY_PATH=/usr/local/lib
every time I have to run hostapd , otherwise he won't locate libnl2.0

You can add /usr/local/lib to your /etc/ld.so.conf file and rerun 'ldconfig' to avoid that.

Crystal wrote:
And even after that (and after CRDA was installed in place) and master mode was put in action, I still can't see my network in the available networks list...

Can you post a bit of what you get when you run hostapd? To capture the debug meesages produced by hostapd you can run it like this:
Code:
# hostapd -dd /etc/hostapd.conf 2>&1 > output.log

_________________
--Cengiz


Top
 Profile  
 
 Post subject: Re: rt2x00 master mode HOWTO
PostPosted: Mon Mar 09, 2009 7:34 pm 
Offline

Joined: Sat Feb 28, 2009 5:53 am
Posts: 6
Location: Yekaterinburg, Russia
Code:
$ sudo hostapd -ddB /etc/hostapd/hostapd.conf
[sudo] password for crystal:
Configuration file: /etc/hostapd/hostapd.conf
Line 44: DEPRECATED: 'debug' configuration variable is not used anymore
ctrl_interface_group=0
Opening raw packet socket for ifindex 1633878026
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=17 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=17 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=17 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=16 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=16 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=16 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=16 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=16 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=16 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=17 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=17 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=17 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=17 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=17 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=16 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=16 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=16 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=16 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=16 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=16 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=17 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=17 dBm
RATE[0] rate=10 flags=0x2
RATE[1] rate=20 flags=0x6
RATE[2] rate=55 flags=0x6
RATE[3] rate=110 flags=0x6
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Passive scanning not supported
Flushing old station entries
Deauthenticate all stations
Using interface wlan0 with hwaddr 00:21:91:82:6a:7e and ssid 'test'
wlan0: Setup of interface done.


And it prints it only once each time I boot up
after this output looks like
Code:
sudo hostapd -ddB /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
Line 44: DEPRECATED: 'debug' configuration variable is not used anymore
ctrl_interface_group=0
Failed to create interface mon.wlan0.
nl80211 driver initialization failed.
wlan0: Unable to setup interface.


Top
 Profile  
 
 Post subject: Re: rt2x00 master mode HOWTO
PostPosted: Mon Mar 09, 2009 8:19 pm 
Offline

Joined: Wed Feb 08, 2006 4:13 am
Posts: 18
Crystal wrote:
Code:
Configuration file: /etc/hostapd/hostapd.conf
Line 44: DEPRECATED: 'debug' configuration variable is not used anymore
This sounds like you're still using the hostapd.conf file from your old 0.5.X version. I'd copy over the newer hostapd.conf template from your new hostapd installation. It's usually in the source directory.

Crystal wrote:
Code:
...
Deauthenticate all stations
Using interface wlan0 with hwaddr 00:21:91:82:6a:7e and ssid 'test'
wlan0: Setup of interface done.

This looks good. In my working configuration I have an additional line of information that is missing in your case. After the line "Deauthenticate..." and before the line "Using interface...", I get a line that says:
Code:
Mode: IEEE 802.11g  Channel: 7  Frequency: 2442 MHz
that is missing in your case. To get this, you may need to choose the channel in your hostapd.conf file (e.g., "channel=7").

Crystal wrote:
And it prints it only once each time I boot up
after this output looks like
Code:
sudo hostapd -ddB /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
Line 44: DEPRECATED: 'debug' configuration variable is not used anymore
ctrl_interface_group=0
Failed to create interface mon.wlan0.
nl80211 driver initialization failed.
wlan0: Unable to setup interface.
This is weird. Do you kill the previous one before running it again? This looks like the interface already exists.

_________________
--Cengiz


Top
 Profile  
 
 Post subject: Re: rt2x00 master mode HOWTO
PostPosted: Tue Mar 10, 2009 2:30 pm 
Offline

Joined: Sat Feb 28, 2009 5:53 am
Posts: 6
Location: Yekaterinburg, Russia
And the last thing was setting my channel to some value(7)
After that I could see my network in the list from windows laptop
Though gateway doesn't respond(
But that's completely different story, probably..


Top
 Profile  
 
 Post subject: Re: rt2x00 master mode HOWTO
PostPosted: Tue Mar 10, 2009 6:32 pm 
Offline

Joined: Wed Mar 04, 2009 1:27 pm
Posts: 5
Crystal wrote:
the thing was in CONFIG_libnl20 not set
if not set, function applies with two arguments , so call with one was regarded erronous


So please can you tell me what you have changed? I have looked briefly about that, but didn't find the function so far.


Top
 Profile  
 
 Post subject: Re: rt2x00 master mode HOWTO
PostPosted: Tue Mar 10, 2009 7:10 pm 
Offline

Joined: Sat Feb 28, 2009 5:53 am
Posts: 6
Location: Yekaterinburg, Russia
there is line compiling hostapd:
Code:
driver_nl80211.c:2557: error: too few arguments to function ‘genl_ctrl_alloc_cache’

After some hours I went so desperate I dared open the source driver_nl80211.c
Well. i can't locate it now... perhaps, after configuring the variant has gone
But there was #ifdef CONFIG_LIBNL20 statement
And it controlled the way this function is called (with one or two args)
As I had libnl 2.0, the call was supposed to be invoked with only one, but because the define was not set, source was trying to be built to call with 2 which led to error `too few args'
define can be set in .config file in the source folder of hostapd


Top
 Profile  
 
 Post subject: Re: rt2x00 master mode HOWTO
PostPosted: Thu Mar 12, 2009 8:03 pm 
Offline

Joined: Wed Mar 04, 2009 1:27 pm
Posts: 5
Thank you for your reply...
My problem was an old libnl in /usr/local/lib which results in "too many arguments"

After changing everything (kernel, libnl, hostapd,...), i give up for now.

I still have problems getting into Master mode with my rt2500 based PCI card:

a) MGMT (TX callback) fail //only with visible SSID
b) unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
c) iw reg get returns US (startup-value) and not the one set with hostap
d) my card is in master mode, but SSID are not setable (no value shown with iwconfig)
e) => AP not visible


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 58 posts ]  Go to page Previous  1, 2, 3, 4

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group