From patchwork Wed Apr 25 22:26:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jouni Malinen X-Patchwork-Id: 155124 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "maxx.shmoo.com", Issuer "CA Cert Signing Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 82BBFB6FF2 for ; Thu, 26 Apr 2012 08:27:12 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 2AE019D2A6; Wed, 25 Apr 2012 18:27:08 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iAlx3M-pqEw0; Wed, 25 Apr 2012 18:27:07 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 119A89D2AA; Wed, 25 Apr 2012 18:27:04 -0400 (EDT) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 399009D2AA for ; Wed, 25 Apr 2012 18:27:03 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JIX33O2mTgt7 for ; Wed, 25 Apr 2012 18:26:58 -0400 (EDT) Received: from jmaline2.user.openhosting.com (kvm.w1.fi [128.177.28.162]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 2C97D9D2A6 for ; Wed, 25 Apr 2012 18:26:57 -0400 (EDT) Received: from jm (a91-155-81-182.elisa-laajakaista.fi [91.155.81.182]) (authenticated bits=0) by jmaline2.user.openhosting.com (8.13.8/8.13.8) with ESMTP id q3PMF6su010165 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 25 Apr 2012 18:15:08 -0400 Received: by jm (sSMTP sendmail emulation); Thu, 26 Apr 2012 01:26:51 +0300 Date: Thu, 26 Apr 2012 01:26:51 +0300 From: Jouni Malinen To: hostap@lists.shmoo.com Subject: Re: How to use android branch ? Message-ID: <20120425222651.GA17079@w1.fi> Mail-Followup-To: hostap@lists.shmoo.com References: <20120423221822.GA15132@w1.fi> <4F95F45D.3010903@googlemail.com> <20120424071518.GA2973@w1.fi> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com On Wed, Apr 25, 2012 at 09:18:57PM +0900, Ryu Cheol wrote: > I believe many of you are interested in newer wpa_supplicant for Android, I do too. > I tried to run 'fe53fe' version on android-4.0.4 for Galaxy Nexus, but I failed to get it running. > Before the trying, I just removed hardware/broadcom/wlan/bcmdhd/wpa_supplicant_8_lib. > > I attach two log files of android-4.0.4. The first is the failed one. The second is the log of wpa_supplicant_8 of aosp. It looks like the control interface is configured incorrectly in the /data/misc/wifi/p2p_supplicant.conf file: > D/wpa_supplicant( 762): Reading configuration file '/data/misc/wifi/p2p_supplicant.conf' > D/wpa_supplicant( 762): ctrl_interface='/data/misc/wifi' That should really have been ctrl_interface=wlan0 and not that /data/misc/wifi directory. The wpa_supplicant version in the AOSP repository is hardcoding this in the implementation, but the proper way of doing this would be to fix that configuration file. As a workaround, this change can be applied to the hostap.git version to allow the Wi-Fi framework to talk to wpa_supplicant in Wi-Fi Direct mode: That said, it looks like this is not enough to make Wi-Fi Direct fully functionality with the driver used in Galaxy Nexus. The following P2P_LISTEN command seems to be failing in an nl80211 command to register one of the frame types. diff --git a/wpa_supplicant/ctrl_iface_unix.c b/wpa_supplicant/ctrl_iface_unix.c index 6513604..5c9a81a 100644 --- a/wpa_supplicant/ctrl_iface_unix.c +++ b/wpa_supplicant/ctrl_iface_unix.c @@ -275,7 +275,7 @@ wpa_supplicant_ctrl_iface_init(struct wpa_supplicant *wpa_s) goto fail; #ifdef ANDROID os_snprintf(addr.sun_path, sizeof(addr.sun_path), "wpa_%s", - wpa_s->conf->ctrl_interface); + wpa_s->ifname); priv->sock = android_get_control_socket(addr.sun_path); if (priv->sock >= 0) goto havesock;