Re: [ath9k-devel] ath9k not connecting to one particular network..

2013-03-26 Thread Dan Williams
On Tue, 2013-03-26 at 11:58 +0200, Jouni Malinen wrote:
 On Mon, Mar 25, 2013 at 07:12:57PM -0700, Linus Torvalds wrote:
  Nothing sane worked, so I did a brute-force let's just make
  wpa_supplicant a shell-script that adds the debug fields and then runs
  the real wpa_supplicant binary with the extra flags.
 
 Ah, yes. I remember having done that at some point long time ago when
 giving up with NM.. ;-)

That debugging page should really be updated now that most people are on
0.9.  In any case, when developing, to get around systemd + NM
respawning the supplicant when it dies, I typically do:

mv /usr/sbin/wpa_supplicant /
killall -TERM wpa_supplicant
/wpa_supplicant -dddtuK

and then NM will see the supplicant start again, and reconnect, and you
get all the debug logs.  You can also poke the supplicant via D-Bus to
increase the logging level, but I'm not sure if the D-Bus interface
allows exposing the keys.

  The bugzilla at
  
https://bugzilla.redhat.com/show_bug.cgi?id=927191
  
  now has a wpa_supplicant trace with keys and timestamps for the
  non-working NetworkManager case too.
  
  I see no sane difference. There are several dbus-related setup
  differences, but then in the actual handshake, afaik they do the same
  thing, except the non-working one never gets the reply after sending
  EAPOL-Key 2/4. I dunno. I have no idea what that thing is actually
  doing.
 
 I could not find any real difference in the security negotiation of
 EAPOL-Key messages 1-2. The point that Robert made in the bugzilla case
 is interesting, though. I did not notice this at first, but there is
 indeed a clear difference in the driver interface (nl80211 vs. WEXT)
 that is being used here. This should not have really caused the issue
 since both cases used cfg80211 and same set of parameters for
 association. Anyway, that is the only clear difference..

NM has passed nl80211,wext as the supplicant driver for a year or so
now, because we all know nl80211 is the way to go.  Besides that, the
network config sent to the supplicant does not change at all between
nl80211 and wext; you can see the options in /var/log/messages:

info Config: added 'ssid' value 'rio grande'
info Config: added 'scan_ssid' value '1'
info Config: added 'key_mgmt' value 'WPA-PSK'
info Config: added 'psk' value 'omitted'
info Config: added 'proto' value 'WPA RSN'
info Activation (wlan0) Stage 2 of 5 (Device Configure) complete.

NM doesn't dump the key, but that feature seems useful and could be
added with some huge warnings.

 If you still happen to be at the location with this AP, it could be
 useful to confirm that this kernel interface difference is indeed the
 reason by running the manual configuration case with -Dnl80211 added to
 the wpa_supplicant command line to force nl80211 interface to be used.

This would be a great test; obviously if nl80211 fails to work but wext
does work, we need to fix that in the supplicant or kernel.

Dan

 In addition, you could try to collect the frames exchanged by the
 success and failure cases using a monitor interface:
 
 iw wlan0 interface add mon0 type monitor
 ifconfig mon0 up
 dumpcap -i mon0 -w /tmp/capture.pkt
 
 And then run the success/failure case.
 


___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel


Re: [ath9k-devel] [PATCH] ath9k: make driver usable standalone

2011-08-18 Thread Dan Williams
On Thu, 2011-08-18 at 00:01 -0400, Pavel Ivanov wrote:
  Iwconfig and iwlist are themselves deprecated. Iw is the new wireless
  configuration tool.
 
 I've just tried to use iw and it didn't quite work for me. Maybe it's
 interfering with something installed in Ubuntu by default but

Ubuntu installs NetworkManager by default, so if you want to manually
control the wifi card you'll have to tell NM to ignore the wifi device,
or turn NM off temporarily.

 connect/disconnect commands didn't seem to do anything. And why these
 commands can be executed only as root?

Because poking and configuring hardware is a privileged operation; tools
like NetworkManager selectively poke holes through that wall and often
require administrator passwords to do it, but at the end of the day its
an operation that can affect security and stability, and that means it
needs to be privileged.

In the end, you probably want to be using wpa_supplicant instead of
trying to configure stuff with iw directly.

Dan

 Well, maybe in Ubuntu 11.10 it will work better.
 
 
 Pavel
 
 
 2011/8/17 Gábor Stefanik netrolller...@gmail.com:
  2011/8/17 Pavel Ivanov paiva...@gmail.com:
  WIRELESS_EXT is not required for configuring wireless on recent
  kernels - in fact, the WEXT API is deprecated in favor of nl80211 now.
 
  Since what version it's deprecated? Do user-space tools know about this 
  new API?
 
  Neither iwconfig nor iwlist worked for me without WIRELESS_EXT.
 
 
  Pavel
 
 
  Iwconfig and iwlist are themselves deprecated. Iw is the new wireless
  configuration tool.
 
 
  2011/8/17 Gábor Stefanik netrolller...@gmail.com:
  On Wed, Aug 17, 2011 at 5:28 AM, Pavel Ivanov paiva...@gmail.com wrote:
  When ath9k is the only wireless driver included in the build
  WIRELESS_EXT configuration option becomes undefined. Because of that
  driver becomes essentially unusable as you can't actually connect to
  any WiFi network. By including WIRELESS_EXT into Kconfig we ensure
  that build with ath9k and without other drivers (having WIRELESS_EXT
  selected in their Kconfig) is actually usable.
 
  WIRELESS_EXT is not required for configuring wireless on recent
  kernels - in fact, the WEXT API is deprecated in favor of nl80211 now.
 
 
  Signed-off-by: Pavel Ivanov paiva...@gmail.com
  ---
 
  diff --git a/drivers/net/wireless/ath/ath9k/Kconfig
  b/drivers/net/wireless/ath/ath9k/Kconfig
  index d9c08c6..2573f77 100644
  --- a/drivers/net/wireless/ath/ath9k/Kconfig
  +++ b/drivers/net/wireless/ath/ath9k/Kconfig
  @@ -11,6 +11,7 @@ config ATH9K
 select LEDS_CLASS
 select NEW_LEDS
 select ATH9K_COMMON
  +   select WIRELESS_EXT
 ---help---
   This module adds support for wireless adapters based on
   Atheros IEEE 802.11n AR5008, AR9001 and AR9002 family
 --
 To unsubscribe from this list: send the line unsubscribe linux-wireless in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html


___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel


Re: [ath9k-devel] [PATCH] ath9k: make driver usable standalone

2011-08-18 Thread Dan Williams
On Wed, 2011-08-17 at 18:51 -0400, valdis.kletni...@vt.edu wrote:
 On Wed, 17 Aug 2011 18:25:49 +0200, Gábor Stefanik said:
 
  Iwconfig and iwlist are themselves deprecated. Iw is the new wireless
  configuration tool.
 
 Somebody better tell Fedora Rawhide - as of the version released on July 27,
 their 'initscripts' RPM was still using iwconfig in 
 /etc/sysconfig/network-scripts/ifup-wireless
 
 So don't be quite so fast to be declaring WIRELESS_EXT dead just yet.

Given that nobody has stepped up to write patches to convert them to use
iw (or wpa_supplicant in the *correct* manner), and that for the most
part wifi on Fedora goes through NetworkManager and/or wpa_supplicant,
it's not surprising.  I don't have any particular interest in keeping
the existing ifup-wireless iwconfig hackery around, instead if it's
converted at all, it should be converted to use wpa_supplicant instead,
in the manner in which I've described in the various bug reports that
keep coming up.  That means not just pointing wpa_supplicant at a config
file, but instead keeping the options in the ifcfg file and writing out
a temporary wpa_supplicant config on-the-fly so that it integrates with
existing administrator expectations and workflow.

Dan

___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel


Re: [ath9k-devel] [PATCH] ath9k: make driver usable standalone

2011-08-18 Thread Dan Williams
On Thu, 2011-08-18 at 15:30 -0400, Pavel Ivanov wrote:
  In the end, you probably want to be using wpa_supplicant instead of
  trying to configure stuff with iw directly.
 
 I see Ubuntu already have wpa_supplicant installed and running.
 Although its command line is not what suggested in documentation and I
 don't see configuration file /etc/wpa_supplicant.conf. Does that mean
 it works somehow differently than stated in documentation? And also
 does all this mean that even if I'll be able to make wpa_supplicant
 work as I need I won't be able to control wireless connection using
 the standard Ubuntu's icon and it won't show me its state correctly?

NetworkManager is installed by default, and NM sends configuration to
wpa_supplicant using a different control interface, not the config file.
If you want to take the wifi interface out from NM's control, I think
you can add the interface to /etc/network/interfaces and NM will then
ignore it, and you can run wpa_supplicant manually with the '-i wlan0'
option to point it to the right interface, and when you've got a config
file, use '-c /path/to/config/file' to give it your configuration.

Or, since I'm a NetworkManager developer, is there something that you're
not sure how to make NM do, or are you just looking to experiment?

Dan

 
 Pavel
 
 
 On Thu, Aug 18, 2011 at 3:20 PM, Dan Williams d...@redhat.com wrote:
  On Thu, 2011-08-18 at 00:01 -0400, Pavel Ivanov wrote:
   Iwconfig and iwlist are themselves deprecated. Iw is the new wireless
   configuration tool.
 
  I've just tried to use iw and it didn't quite work for me. Maybe it's
  interfering with something installed in Ubuntu by default but
 
  Ubuntu installs NetworkManager by default, so if you want to manually
  control the wifi card you'll have to tell NM to ignore the wifi device,
  or turn NM off temporarily.
 
  connect/disconnect commands didn't seem to do anything. And why these
  commands can be executed only as root?
 
  Because poking and configuring hardware is a privileged operation; tools
  like NetworkManager selectively poke holes through that wall and often
  require administrator passwords to do it, but at the end of the day its
  an operation that can affect security and stability, and that means it
  needs to be privileged.
 
  In the end, you probably want to be using wpa_supplicant instead of
  trying to configure stuff with iw directly.
 
  Dan
 
  Well, maybe in Ubuntu 11.10 it will work better.
 
 
  Pavel
 
 
  2011/8/17 Gábor Stefanik netrolller...@gmail.com:
   2011/8/17 Pavel Ivanov paiva...@gmail.com:
   WIRELESS_EXT is not required for configuring wireless on recent
   kernels - in fact, the WEXT API is deprecated in favor of nl80211 now.
  
   Since what version it's deprecated? Do user-space tools know about this 
   new API?
  
   Neither iwconfig nor iwlist worked for me without WIRELESS_EXT.
  
  
   Pavel
  
  
   Iwconfig and iwlist are themselves deprecated. Iw is the new wireless
   configuration tool.
  
  
   2011/8/17 Gábor Stefanik netrolller...@gmail.com:
   On Wed, Aug 17, 2011 at 5:28 AM, Pavel Ivanov paiva...@gmail.com 
   wrote:
   When ath9k is the only wireless driver included in the build
   WIRELESS_EXT configuration option becomes undefined. Because of that
   driver becomes essentially unusable as you can't actually connect to
   any WiFi network. By including WIRELESS_EXT into Kconfig we ensure
   that build with ath9k and without other drivers (having WIRELESS_EXT
   selected in their Kconfig) is actually usable.
  
   WIRELESS_EXT is not required for configuring wireless on recent
   kernels - in fact, the WEXT API is deprecated in favor of nl80211 now.
  
  
   Signed-off-by: Pavel Ivanov paiva...@gmail.com
   ---
  
   diff --git a/drivers/net/wireless/ath/ath9k/Kconfig
   b/drivers/net/wireless/ath/ath9k/Kconfig
   index d9c08c6..2573f77 100644
   --- a/drivers/net/wireless/ath/ath9k/Kconfig
   +++ b/drivers/net/wireless/ath/ath9k/Kconfig
   @@ -11,6 +11,7 @@ config ATH9K
  select LEDS_CLASS
  select NEW_LEDS
  select ATH9K_COMMON
   +   select WIRELESS_EXT
  ---help---
This module adds support for wireless adapters based on
Atheros IEEE 802.11n AR5008, AR9001 and AR9002 family
  --
  To unsubscribe from this list: send the line unsubscribe linux-wireless 
  in
  the body of a message to majord...@vger.kernel.org
  More majordomo info at  http://vger.kernel.org/majordomo-info.html
 
 
 
 --
 To unsubscribe from this list: send the line unsubscribe linux-wireless in
 the body of a message to majord...@vger.kernel.org
 More majordomo info at  http://vger.kernel.org/majordomo-info.html


___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel