From owner-freebsd-mobile@FreeBSD.ORG Wed Aug 6 11:27:13 2008 Return-Path: Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DA13106564A for ; Wed, 6 Aug 2008 11:27:13 +0000 (UTC) (envelope-from jhugo@meraka.csir.co.za) Received: from marge.meraka.csir.co.za (marge.meraka.csir.co.za [IPv6:2001:4200:7000:3::1]) by mx1.freebsd.org (Postfix) with ESMTP id 9460D8FC0C for ; Wed, 6 Aug 2008 11:27:10 +0000 (UTC) (envelope-from jhugo@meraka.csir.co.za) Received: from jeep.meraka.csir.co.za (jeep.meraka.csir.co.za [IPv6:2001:4200:7000:3:211:43ff:feba:aff1]) by marge.meraka.csir.co.za (Postfix) with ESMTP id C46B878C57 for ; Wed, 6 Aug 2008 13:27:03 +0200 (SAST) From: Johann Hugo Organization: CSIR To: freebsd-mobile@freebsd.org Date: Wed, 6 Aug 2008 13:27:02 +0200 User-Agent: KMail/1.9.7 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Content-Disposition: inline Message-Id: <200808061327.03028.jhugo@meraka.csir.co.za> Subject: WPA in adhoc mode X-BeenThere: freebsd-mobile@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Mobile computing with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Aug 2008 11:27:13 -0000 I'm trying to setup WPA between two Atheros wifi adapters in adhoc mode, but I cannot get it to work. Any hints to get it to work ? According to the "wpa_supplicant Reference Manual 0.4.x" it should be possible: --------------------------------------------- IEEE 802.11 operation mode (Infrastucture/IBSS). 0 = infrastructure (Managed) mode, i.e., associate with an AP. 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 (either directly or using ASCII passphrase). -------------------------------------------- I'm running 7.0-STABLE, build on 30 Jul 2008. hw.ath.hal.version: 0.9.20.3 ath0: flags=8843 metric 0 mtu 1500 ether 00:80:48:50:9d:dd inet6 fe80::280:48ff:fe50:9ddd%ath0 prefixlen 64 scopeid 0x1 inet6 fd9c:6829:597c:20:280:48ff:fe50:9ddd prefixlen 64 inet6 fd9c:6829:597c:20:: prefixlen 64 anycast media: IEEE 802.11 Wireless Ethernet autoselect mode 11g status: associated ssid ptamesh channel 13 (2472 Mhz 11g) bssid 02:15:6d:53:39:75 authmode OPEN privacy OFF txpower 31.5 scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi11g 7 roam:rate11g 5 protmode CTS burst mesh-9ddd:~ # more /etc/wpa_supplicant.conf ap_scan=2 network={ ssid="ptamesh" mode=1 proto=WPA key_mgmt=WPA-NONE pairwise=NONE group=TKIP psk="mesh-ipv6" } mesh-9ddd:~ # wpa_supplicant -d -i ath0 -c /etc/wpa_supplicant.conf Initializing interface 'ath0' conf '/etc/wpa_supplicant.conf' driver 'default' ctrl_interface 'N/A' bridge 'N/A' Configuration file '/etc/wpa_supplicant.conf' -> '/etc/wpa_supplicant.conf' Reading configuration file '/etc/wpa_supplicant.conf' ap_scan=2 Priority group 0 id=0 ssid='ptamesh' 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 Own MAC address: 00:80:48:50:9d:dd wpa_driver_bsd_set_wpa: enabled=1 wpa_driver_bsd_set_wpa_internal: wpa=3 privacy=1 wpa_driver_bsd_del_key: keyidx=0 wpa_driver_bsd_del_key: keyidx=1 wpa_driver_bsd_del_key: keyidx=2 wpa_driver_bsd_del_key: keyidx=3 wpa_driver_bsd_set_countermeasures: enabled=0 wpa_driver_bsd_set_drop_unencrypted: enabled=1 Setting scan request: 0 sec 100000 usec Added interface ath0 State: DISCONNECTED -> SCANNING Trying to associate with SSID 'ptamesh' Cancelling scan request WPA: clearing own WPA/RSN IE Automatic auth_alg selection: 0x1 wpa_driver_bsd_set_auth_alg alg 0x1 authmode 1 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_bsd_set_key: alg=TKIP addr=ff:ff:ff:ff:ff:ff key_idx=0 set_tx=1 seq_len=6 key_len=32 wpa_driver_bsd_set_drop_unencrypted: enabled=1 State: SCANNING -> ASSOCIATING wpa_driver_bsd_associate: ssid 'ptamesh' wpa ie len 24 pairwise 0 group 2 key mgmt 4 ioctl[SIOCS80211, op 22, len 24]: Invalid argument Association request to the driver failed wpa_driver_bsd_set_key: alg=TKIP addr=ff:ff:ff:ff:ff:ff 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=] EAPOL: External notification - portControl=ForceAuthorized