From owner-freebsd-current@FreeBSD.ORG Wed Jun 16 12:33:55 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D57C81065680 for ; Wed, 16 Jun 2010 12:33:55 +0000 (UTC) (envelope-from ganbold@gmail.com) Received: from mail-pw0-f54.google.com (mail-pw0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 969418FC1E for ; Wed, 16 Jun 2010 12:33:55 +0000 (UTC) Received: by pwj10 with SMTP id 10so1213281pwj.13 for ; Wed, 16 Jun 2010 05:33:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=gPAU7LP33OOico0nNrXV3UWaLMW8DhStN+d5xMRn3ck=; b=cho5DlVAFmDbkRIF4UfJSW4VzOVw9MuZ5D0UN6OGmWqyjExBcOdGh/ute78GPy5ZhH JoWMurYlB26wbCuwUeTg5G7AT3QN/tOA4xBI9BaAHtvHiqys/sxU0LLIOq1yk87RUkgY NdbVzZrlSGhDCweIBjYwvq+d6CnrsQ6TlSSgk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=sasHo7MUaErpOjPHZ7d/o6ZVgiJ4ODpvRk1C+ATDXnuUPyzB1hPvbzCHE07oBuqVwE DIIFXkPKk+RfCXa+lJDJCwjW+lyU0xSoDuG9Z56P4LNGy453E/Yw+7SjXOYViGiuKuyk BbNfyaTW/jLdmv56XNihR/mnyf26tnrOcShKk= Received: by 10.114.189.6 with SMTP id m6mr7011274waf.57.1276691634701; Wed, 16 Jun 2010 05:33:54 -0700 (PDT) Received: from beastie.micom.mng.net ([202.179.21.129]) by mx.google.com with ESMTPS id c14sm81379943waa.13.2010.06.16.05.33.50 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 16 Jun 2010 05:33:53 -0700 (PDT) Message-ID: <4C18C4AB.6040205@gmail.com> Date: Wed, 16 Jun 2010 20:33:47 +0800 From: Ganbold User-Agent: Thunderbird 2.0.0.23 (X11/20091011) MIME-Version: 1.0 To: PseudoCylon References: <16641.96608.qm@web51806.mail.re2.yahoo.com> <4BAE01AC.7000509@gmail.com> <623907.37074.qm@web51803.mail.re2.yahoo.com> <4BB3575D.4040506@gmail.com> <87836.79143.qm@web51804.mail.re2.yahoo.com> <4BBB372C.1060302@gmail.com> <665283.95271.qm@web51802.mail.re2.yahoo.com> <4BBDEC8F.9050803@gmail.com> <490521.32714.qm@web51804.mail.re2.yahoo.com> <4BD307DE.5080507@gmail.com> <332448.8676.qm@web51801.mail.re2.yahoo.com> <4BD3F2D4.8000007@gmail.com> <702632.81988.qm@web51803.mail.re2.yahoo.com> <4BDEE393.4080206@gmail.com> <660085.11669.qm@web51802.mail.re2.yahoo.com> <4BFD4806.8070001@gmail.com> <618770.37649.qm@web51807.mail.re2.yahoo.com> <4C0FAEA2.7010204@gmail.com> <94007.38072.qm@web51807.mail.re2.yahoo.com> <4C11188A.1040002@gmail.com> <447555.80295.qm@web51803.mail.re2.yahoo.com> <4C16499A.3050808@gmail.com> <337427.44900.qm@web51804.mail.re2.yahoo.com> <4C1787DA.2070308@gmail.com> <819523.41498.qm@web51805.mail.re2.yahoo.com> In-Reply-To: <819523.41498.qm@web51805.mail.re2.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Ganbold Tsagaankhuu , freebsd-current@freebsd.org Subject: Re: CALL for TEST [HOSTAP] run(4) ralink usb wireless X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Jun 2010 12:33:55 -0000 AK-san, PseudoCylon wrote: >>> >> > > Hello, > > More questions. > > Is freebsd laptop working fine with wlan, or is it connected to ethernet port? > > Does adsl modem still freeze? > > Normally, when you ping from macbook to modem, there will be arp pakets > 'who-has modem tell macbook' and > 'modem is-at xx:xx...' > Do you see these at wlan0 on rspro? > > If rspro can ping patch should be working, but let's make sure it is. Please before starting hostapd, > sysctl hw.usb.run.debug=1 > (If the driver is not compiled with kernel, please apply a patch attached.) > When hostapd is started, it will print out > > Starting hostapd. > Configuration file: /etc/hostapd.conf > Using interface wlan0 with hwaddr 00:22:cf:03:e0:30 and ssid 'bsd' > run_key_set: cmdq_store=0 > run_key_set_cb: associd=0, keyix=1, mode=3, type=group, tx=on, rx=off > run_stop: All Tx cleared > run_newstate: INIT -> INIT > run_newstate: INIT -> SCAN > ... omit some lines ... > > Please confirm there is > run_key_set_cb: associd=0, mode=3, ... > And, associd is '0' (This was the problem before. So, encryption with group key failed.) > It prints: ... run_key_set_cb: associd=0, keyix=1, mode=3, type=group, tx=on, rx=off ... > When macbook associates with AP, it will print > > run_newassoc: cmdq_store=2 > run_newassoc: new assoc isnew=1 associd=c001 addr=00:26:bb:17:f6:61 > run_newassoc: rate=0x82 ridx=0 ctl_ridx=0 > ... omit some lines ... > run_newassoc: rate=0x6c ridx=11 ctl_ridx=8 > run_newassoc: rate=2, mgmt_ridx=0 > run_key_set: cmdq_store=3 > run_key_set_cb: associd=c001, keyix=0, mode=4, type=pairwise, tx=on, rx=on > > Please confirm there is > run_key_set_cb: associd=c001, mode=4, ... > And associd isn't '0'. > It prints: run_newassoc: cmdq_store=3 run_newassoc: new assoc isnew=1 associd=c001 addr=00:26:bb:17:f6:61 ... run_newassoc: rate=2, mgmt_ridx=0 wlan0: STA 00:26:bb:17:f6:61 IEEE 802.11: associated run_key_set: cmdq_store=5 run_key_set_cb: associd=c001, keyix=0, mode=4, type=pairwise, tx=on, rx=on wlan0: STA 00:26:bb:17:f6:61 RADIUS: starting accounting session 4C18B4C8-00000000 wlan0: STA 00:26:bb:17:f6:61 WPA: pairwise key handshake completed (RSN) > If not, I need to fix the driver. If things go accordingly, please compare the mode. With your config, group key uses TKIP (mode 3) and pairwise key uses CCMP (mode 4). And very first arp who-has packet uses group key and other use pairwise key. Maybe, macbook doesn't like mixing the mode. So, please > tcpdump -vvv -xxx -i wlan0 'arp' > 19:34:27.188281 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.50 tell 0.0.0.0, length 28 0x0000: ffff ffff ffff 0026 bb17 f661 0806 0001 0x0010: 0800 0604 0001 0026 bb17 f661 0000 0000 0x0020: 0000 0000 0000 c0a8 0132 19:34:27.188326 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.50 tell 0.0.0.0, length 28 0x0000: ffff ffff ffff 0026 bb17 f661 0806 0001 0x0010: 0800 0604 0001 0026 bb17 f661 0000 0000 0x0020: 0000 0000 0000 c0a8 0132 19:34:27.586863 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.50 tell 0.0.0.0, length 28 0x0000: ffff ffff ffff 0026 bb17 f661 0806 0001 0x0010: 0800 0604 0001 0026 bb17 f661 0000 0000 0x0020: 0000 0000 0000 c0a8 0132 19:34:27.586903 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.50 tell 0.0.0.0, length 28 0x0000: ffff ffff ffff 0026 bb17 f661 0806 0001 0x0010: 0800 0604 0001 0026 bb17 f661 0000 0000 0x0020: 0000 0000 0000 c0a8 0132 19:34:27.989517 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.50 tell 192.168.1.50, length 28 0x0000: ffff ffff ffff 0026 bb17 f661 0806 0001 0x0010: 0800 0604 0001 0026 bb17 f661 c0a8 0132 0x0020: 0000 0000 0000 c0a8 0132 19:34:27.989561 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.50 tell 192.168.1.50, length 28 0x0000: ffff ffff ffff 0026 bb17 f661 0806 0001 0x0010: 0800 0604 0001 0026 bb17 f661 c0a8 0132 0x0020: 0000 0000 0000 c0a8 0132 19:34:28.389609 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.50 tell 192.168.1.50, length 28 0x0000: ffff ffff ffff 0026 bb17 f661 0806 0001 0x0010: 0800 0604 0001 0026 bb17 f661 c0a8 0132 0x0020: 0000 0000 0000 c0a8 0132 19:34:28.389638 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.50 tell 192.168.1.50, length 28 0x0000: ffff ffff ffff 0026 bb17 f661 0806 0001 0x0010: 0800 0604 0001 0026 bb17 f661 c0a8 0132 0x0020: 0000 0000 0000 c0a8 0132 19:34:28.389761 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.1 tell 192.168.1.50, length 28 0x0000: ffff ffff ffff 0026 bb17 f661 0806 0001 0x0010: 0800 0604 0001 0026 bb17 f661 c0a8 0132 0x0020: 0000 0000 0000 c0a8 0101 19:34:28.389790 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.1 tell 192.168.1.50, length 28 0x0000: ffff ffff ffff 0026 bb17 f661 0806 0001 0x0010: 0800 0604 0001 0026 bb17 f661 c0a8 0132 0x0020: 0000 0000 0000 c0a8 0101 19:34:28.390061 ARP, Ethernet (len 6), IPv4 (len 4), Reply 192.168.1.1 is-at 00:30:54:62:3d:24 (oui Unknown), length 46 0x0000: 0026 bb17 f661 0030 5462 3d24 0806 0001 0x0010: 0800 0604 0002 0030 5462 3d24 c0a8 0101 0x0020: 0026 bb17 f661 c0a8 0132 0000 0000 0000 0x0030: 0000 0000 0000 0000 0000 0000 19:34:28.393300 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 169.254.255.255 tell 192.168.1.50, length 28 0x0000: ffff ffff ffff 0026 bb17 f661 0806 0001 0x0010: 0800 0604 0001 0026 bb17 f661 c0a8 0132 0x0020: 0000 0000 0000 a9fe ffff 19:34:28.393341 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 169.254.255.255 tell 192.168.1.50, length 28 0x0000: ffff ffff ffff 0026 bb17 f661 0806 0001 0x0010: 0800 0604 0001 0026 bb17 f661 c0a8 0132 0x0020: 0000 0000 0000 a9fe ffff 19:34:28.793323 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 169.254.255.255 tell 192.168.1.50, length 28 0x0000: ffff ffff ffff 0026 bb17 f661 0806 0001 0x0010: 0800 0604 0001 0026 bb17 f661 c0a8 0132 0x0020: 0000 0000 0000 a9fe ffff 19:34:28.793367 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 169.254.255.255 tell 192.168.1.50, length 28 0x0000: ffff ffff ffff 0026 bb17 f661 0806 0001 0x0010: 0800 0604 0001 0026 bb17 f661 c0a8 0132 0x0020: 0000 0000 0000 a9fe ffff 19:34:29.193817 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 169.254.255.255 tell 192.168.1.50, length 28 0x0000: ffff ffff ffff 0026 bb17 f661 0806 0001 0x0010: 0800 0604 0001 0026 bb17 f661 c0a8 0132 0x0020: 0000 0000 0000 a9fe ffff 19:34:29.193861 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 169.254.255.255 tell 192.168.1.50, length 28 0x0000: ffff ffff ffff 0026 bb17 f661 0806 0001 0x0010: 0800 0604 0001 0026 bb17 f661 c0a8 0132 0x0020: 0000 0000 0000 a9fe ffff 19:34:29.592363 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 169.254.255.255 tell 192.168.1.50, length 28 0x0000: ffff ffff ffff 0026 bb17 f661 0806 0001 0x0010: 0800 0604 0001 0026 bb17 f661 c0a8 0132 0x0020: 0000 0000 0000 a9fe ffff 19:34:29.592402 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 169.254.255.255 tell 192.168.1.50, length 28 0x0000: ffff ffff ffff 0026 bb17 f661 0806 0001 0x0010: 0800 0604 0001 0026 bb17 f661 c0a8 0132 0x0020: 0000 0000 0000 a9fe ffff 19:34:30.421577 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.1 tell 192.168.1.50, length 28 0x0000: ffff ffff ffff 0026 bb17 f661 0806 0001 0x0010: 0800 0604 0001 0026 bb17 f661 c0a8 0132 0x0020: 0000 0000 0000 c0a8 0101 19:34:30.421620 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.1 tell 192.168.1.50, length 28 0x0000: ffff ffff ffff 0026 bb17 f661 0806 0001 0x0010: 0800 0604 0001 0026 bb17 f661 c0a8 0132 0x0020: 0000 0000 0000 c0a8 0101 19:34:30.421909 ARP, Ethernet (len 6), IPv4 (len 4), Reply 192.168.1.1 is-at 00:30:54:62:3d:24 (oui Unknown), length 46 0x0000: 0026 bb17 f661 0030 5462 3d24 0806 0001 0x0010: 0800 0604 0002 0030 5462 3d24 c0a8 0101 0x0020: 0026 bb17 f661 c0a8 0132 0000 0000 0000 0x0030: 0000 0000 0000 0000 0000 0000 19:34:30.469720 ARP, Ethernet (len 6), IPv4 (len 4), Request who-has 192.168.1.50 tell 192.168.1.1, length 46 0x0000: ffff ffff ffff 0030 5462 3d24 0806 0001 0x0010: 0800 0604 0001 0030 5462 3d24 c0a8 0101 0x0020: 0000 0000 0000 c0a8 0132 0000 0000 0000 0x0030: 0000 0000 0000 0000 0000 0000 19:34:30.471838 ARP, Ethernet (len 6), IPv4 (len 4), Reply 192.168.1.50 is-at 00:26:bb:17:f6:61 (oui Unknown), length 28 0x0000: 0030 5462 3d24 0026 bb17 f661 0806 0001 0x0010: 0800 0604 0002 0026 bb17 f661 c0a8 0132 0x0020: 0030 5462 3d24 c0a8 0101 Strange, looks like this time works as expected, but sometimes it doesn't work. In some cases it doesn't work and you can find complete tcpdump output from very beginning to the modem hang: http://pastebin.com/1ALmV7mA > and check if any packet with address of all 'ff'. is sent/received alright. All 'ff 'means using group key. Others use pairwise key. All 'ff is easy to see in output of tcpdump. Or, you can chose one of them, CCMP or TKIP for 'wpa_pairwise=' and see if it makes any difference. > Will test it and let you know. thanks, Ganbold > > Sorry for too many questions. It is working fine here, again. > AK > > --patch Only needed if the driver is not compiled with the kernel-- > > diff --git a/dev/usb/wlan/if_run.c b/dev/usb/wlan/if_run.c > index e4fc8d2..65c1dab 100644 > --- a/dev/usb/wlan/if_run.c > +++ b/dev/usb/wlan/if_run.c > @@ -69,6 +69,7 @@ __FBSDID("$FreeBSD: src/sys/dev/usb/wlan/if_run.c,v 1.11 2010/06/14 23:01:50 jki > #include "usbdevs.h" > > #define USB_DEBUG_VAR run_debug > +#define USB_DEBUG > #include > > #include "if_runreg.h" > > --end patch-- > only one line to add > > > > > -- To err is humor.