wpa_supplicant-0.6.1 IBSS Mode

Christian Fackroth Proger
Wed Dec 19 06:16:01 PST 2007


Hi,

I solved the problem. The problem is the driver interface of madwifi.
I changed it to the generic Linux wireless extension and it works fine. :-)

Regards,
 Christian

> Cheers Dan!
> 
> > > Hi,
> > > 
> > > my task is to implement real IBSS mode in wpa_supplicant. The first step to compile the test_wpa.c I have already finished. Now I will test the WPA-NONE mode of wpa_supplicant but it don't work. I use the madwifi driver and configure two stations as follows:
> > > 
> > > wlanconfig ath0 create wlandev wifi0 wlanmode adhoc
> > > sudo iwconfig ath0 essid test-adhoc channel 6
> > > sudo ifconfig ath0 192.168.1.x up
> > > 
> > > After the cells are merged I can transfer data between the two stations. Now I start wpa_supplicant on the stations with the follow configure file:
> > > 
> > > network={
> > >         ssid="test-adhoc"
> > >         mode=1
> > >         frequency=2437
> > >         proto=WPA
> > >         key_mgmt=WPA-NONE
> > >         pairwise=NONE
> > >         group=CCMP
> > >         psk="schluessel"
> > > }
> > > 
> > > The connection can't established because wpa_supplicant show the message "... skip - no WPA/RSN IE" when it scanning. So my question is what do I wrong? Also it will be nice if somebody have additional hints for me which make it easier for me to realise my task.
> > 
> > You're probably not setting ap_scan=2:
> > 
> > # Note: IBSS can only be used with key_mgmt NONE (plaintext and static WEP)
> > # and key_mgmt=WPA-NONE (fixed group key TKIP/CCMP). In addition, ap_scan has
> > # to be set to 2 for IBSS. WPA-None requires following network block options:
> > # proto=WPA, key_mgmt=WPA-NONE, pairwise=NONE, group=TKIP (or CCMP, but not
> > # both), and psk must also be set.
> > 
> > This is the comment in the 'mode' section of the example
> > wpa_supplicant.conf config file.
> > 
> 
> It is correct I forgot to configure the scan mode. Anyway WPA-NONE don't work. :-/
> 
> > > I found in driver_wext.c in line 970 a instruction which makes in my mind no sence.
> > > 
> > > "if (wpa_driver_wext_set_mode(drv, 0) < 0) {"
> > > 
> > > Why is the driver always configured in managed mode? But I'm sure this is not the reason why WPA-NONE not work. ;-)
> > 
> > That part shouldn't really matter, because it's only set to managed when
> > the card is initialized.  The _real_ mode you request is set in the
> > 'associate' hook below around line 1946.  That's the only mode set that
> > really matters.
> 
> I agree with you.
> 
> 
> My complete config file look as follows:
> 
> # mode: IEEE 802.11 operation mode
> # 0 = infrastructure (Managed) mode, i.e., associate with an AP (default)
> # 1 = IBSS (ad-hoc, peer-to-peer)
> # Note: IBSS can only be used with key_mgmt NONE (plaintext and static WEP)
> # and key_mgmt=WPA-NONE (fixed group key TKIP/CCMP). In addition, ap_scan has
> # to be set to 2 for IBSS. WPA-None requires following network block options:
> # proto=WPA, key_mgmt=WPA-NONE, pairwise=NONE, group=TKIP (or CCMP, but not
> # both), and psk must also be set.
> 
> ap_scan=2
> 
> network={
>         ssid="test-adhoc"
>         mode=1
>         frequency=2437
>         proto=WPA
>         key_mgmt=WPA-NONE
>         pairwise=NONE
>         group=CCMP
>         psk="schluessel"
> }
> 
> If I start wpa_supplicant with the command line: 
> 
> > ./wpa_supplicant -i ath0 -D madwifi -c /scratch/wpa_none.conf -dd
> 
> I get follows debug information for the two stations only with different own MAC addresses:
> 
> Initializing interface 'ath0' conf '/scratch/wpa_none.conf' driver 'madwifi' ctrl_interface 'N/A' bridge 'N/A'
> Configuration file '/scratch/wpa_none.conf' -> '/scratch/wpa_none.conf'
> Reading configuration file '/scratch/wpa_none.conf'
> ap_scan=2
> Line: 12 - start of a new network block
> mode=1 (0x1)
> proto: 0x1
> key_mgmt: 0x10
> pairwise: 0x1
> group: 0x10
> PSK (ASCII passphrase) - hexdump_ascii(len=10): [REMOVED]
> PSK (from passphrase) - hexdump(len=32): [REMOVED]
> Priority group 0
>    id=0 ssid=''
> Initializing interface (2) 'ath0'
> ioctl[SIOCSIWMODE]: Invalid argument
> Could not configure driver to use managed mode
> SIOCGIWRANGE: WE(compiled)=22 WE(source)=18 enc_capa=0xf
>   capabilities: key_mgmt 0xf enc 0xf
> WEXT: Operstate: linkmode=1, operstate=5
> 
> Own MAC address: 06:15:6d:10:23:17
> 
> wpa_driver_madwifi_del_key: keyidx=0
> wpa_driver_madwifi_del_key: keyidx=1
> wpa_driver_madwifi_del_key: keyidx=2
> wpa_driver_madwifi_del_key: keyidx=3
> wpa_driver_madwifi_set_countermeasures: enabled=0
> wpa_driver_madwifi_set_drop_unencrypted: enabled=1
> RSN: flushing PMKID list in the driver
> Setting scan request: 0 sec 100000 usec
> Added interface ath0
> RTM_NEWLINK: operstate=0 ifi_flags=0x11003 ([UP][LOWER_UP])
> RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
> State: DISCONNECTED -> SCANNING
> Trying to associate with SSID ''
> Cancelling scan request
> WPA: clearing own WPA/RSN IE
> Automatic auth_alg selection: 0x1
> WPA: No WPA/RSN IE available from association info
> WPA: Set cipher suites based on configuration
> WPA: Selected cipher suites: group 16 pairwise 1 key_mgmt 16 proto 1
> WPA: clearing AP WPA IE
> WPA: clearing AP RSN IE
> WPA: using GTK CCMP
> WPA: using PTK NONE
> WPA: using KEY_MGMT WPA-NONE
> WPA: Set own WPA IE default - hexdump(len=24): dd 16 00 50 f2 01 01 00 00 50 f2 04 01 00 00 50 f2 00 01 00 00 50 f2 00
> No keys have been configured - skip key clearing
> wpa_driver_madwifi_set_key: alg=CCMP key_idx=0 set_tx=1 seq_len=6 key_len=16
> wpa_driver_madwifi_set_drop_unencrypted: enabled=1
> State: SCANNING -> ASSOCIATING
> wpa_driver_wext_set_operstate: operstate 0->0 (DORMANT)
> WEXT: Operstate: linkmode=-1, operstate=5
> wpa_driver_madwifi_associate
> ioctl[IEEE80211_IOCTL_SETOPTIE]: Invalid argument
> Association request to the driver failed
> wpa_driver_madwifi_set_key: alg=CCMP key_idx=0 set_tx=1 seq_len=6 key_len=16
> Cancelling authentication timeout
> State: ASSOCIATING -> COMPLETED
> CTRL-EVENT-CONNECTED - Connection to 00:00:00:00:00:00 completed (auth) [id=-1 id_str=]
> wpa_driver_wext_set_operstate: operstate 0->1 (UP)
> WEXT: Operstate: linkmode=-1, operstate=6
> RTM_NEWLINK: operstate=1 ifi_flags=0x11003 ([UP][LOWER_UP])
> WEXT: Operstate: linkmode=-1, operstate=6
> Wireless event: cmd=0x8b1a len=8
> RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
> RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
> 
> Could it be that there is a problem with the driver interface?
> 
> Regards,
>  Christian
> 


_____________________________________________________________________
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc=100071&distributionid=000000000066





More information about the Hostap mailing list