Unable to setup WPA in Adhoc Mode

Saurav Kumar Barik sauravb at aztecsoft.com
Tue May 15 10:15:28 EDT 2007



Hi,

I am trying WPA in Adhoc Mode.

My set-up is,
	Senao 400mw radio
	Madwifi 0.9.2
	Wpa_supplicant v0.5.7
	Debian 2.6.18

Here is my wpa_supplicant.conf file,

------------------------------------------------------------------------
--------------------------
	ctrl_interface=/var/run/wpa_supplicant

	ap_scan=2
	fast_reauth=1

	network={
        		ssid="adhoc_wpa"
        		#psk="saurav123"
        		mode=1
        		proto=WPA
        		key_mgmt=WPA-NONE
        		pairwise=NONE
        		group=TKIP

psk=d7cb9bba6d1f2c077d51c27fb332a572833de29fc3158144e7a63fada40445f4
		}
------------------------------------------------------------------------
-------------------------------

Please note that I browsed through the mailing list archives and also in
google to find the WPA solution in Adhoc Mode.
Some of the users are claiming to be successful with the setup but some
of the others are not.
So I could not find a conclusion about the problem.

I cross checked several times the wpa_supplicant.conf file and tried
different options like TKIP/CCMP, using PSK in Hex/String etc. but
without success.

WPA_SUPPLICANT LOGS:-
------------------------------------------------------------------------
------------------------------------------
saurav:~# wpa_supplicant -dd -Dmadwifi -iath0 -c/etc/wpa_supplicant.conf
Initializing interface 'ath0' conf '/etc/wpa_supplicant.conf' driver
'madwifi' ctrl_interface 'N/A' bridge 'N/A'
Configuration file '/etc/wpa_supplicant.conf' ->
'/etc/wpa_supplicant.conf'
Reading configuration file '/etc/wpa_supplicant.conf'
ctrl_interface='/var/run/wpa_supplicant'
ap_scan=2
fast_reauth=1
Line: 4 - start of a new network block
ssid - hexdump_ascii(len=9):
     61 64 68 6f 63 5f 77 70 61                        adhoc_wpa      
mode=1 (0x1)
key_mgmt: 0x10
proto: 0x1
pairwise: 0x1
group: 0x8
PSK - hexdump(len=32): [REMOVED]
Priority group 0
   id=0 ssid='adhoc_wpa'
Initializing interface (2) 'ath0'
EAPOL: SUPP_PAE entering state DISCONNECTED
EAPOL: KEY_RX entering state NO_KEY_RECEIVE
EAPOL: SUPP_BE entering state INITIALIZE
EAP: EAP entering state DISABLED
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
ioctl[SIOCSIWMODE]: Invalid argument
Could not configure driver to use managed mode
SIOCGIWRANGE: WE(compiled)=20 WE(source)=13 enc_capa=0xf
  capabilities: key_mgmt 0xf enc 0xf
WEXT: Operstate: linkmode=1, operstate=5
Own MAC address: 00:02:6f:3f:98:60
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
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 'adhoc_wpa'
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 8 pairwise 1 key_mgmt 16 proto 1
WPA: clearing AP WPA IE
WPA: clearing AP RSN IE
WPA: using GTK TKIP
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 02 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=TKIP key_idx=0 set_tx=1 seq_len=6
key_len=32
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=TKIP key_idx=0 set_tx=1 seq_len=6
key_len=32
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
EAPOL: External notification - portControl=ForceAuthorized
RTM_NEWLINK: operstate=1 ifi_flags=0x11003 ([UP][LOWER_UP])
WEXT: Operstate: linkmode=-1, operstate=6
Wireless event: cmd=0x8b1a len=18
RTM_NEWLINK: operstate=1 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'ath0' added
CTRL-EVENT-TERMINATING - signal 2 received
Removing interface ath0
State: COMPLETED -> DISCONNECTED
wpa_driver_wext_set_operstate: operstate 1->0 (DORMANT)
WEXT: Operstate: linkmode=-1, operstate=5
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
EAPOL: External notification - portEnabled=0
EAPOL: External notification - portValid=0
wpa_driver_madwifi_set_drop_unencrypted: enabled=0
wpa_driver_madwifi_set_countermeasures: enabled=0
No keys have been configured - skip key clearing
Cancelling scan request
Cancelling authentication timeout
ioctl[IEEE80211_IOCTL_SETOPTIE]: Invalid argument
wpa_driver_madwifi_deinit: failed to clear WPA IE
WEXT: Operstate: linkmode=0, operstate=6

------------------------------------------------------------------------
-----------------------------------------

Thanks in advance..

With Regards,
Saurav


The information contained in, or attached to, this e-mail, contains confidential information and is intended solely for the use of the individual or entity to whom they are addressed and is subject to legal privilege. If you have received this e-mail in error you should notify the sender immediately by reply e-mail, delete the message from your system and notify your system manager. Please do not copy it for any purpose, or disclose its contents to any other person. The views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. The recipient should check this e-mail and any attachments for the presence of viruses. The company accepts no liability for any damage caused, directly or indirectly, by any virus transmitted in this email.

www.aztecsoft.com



More information about the HostAP mailing list