Bug 699203

Summary: Unable to connect to ad-hoc WiFi network using nl80211
Product: [Fedora] Fedora Reporter: Michal Hlavinka <mhlavink>
Component: NetworkManagerAssignee: Dan Williams <dcbw>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 15CC: awilliam, contact, csaavedra, dcbw, fabrice, gansalmon, hedayatv, itamar, jklimes, jonathan, kernel-maint, kronenpj, linville, madhu.chinakonda, mike, rh
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: NetworkManager-0.8.4-2.git20110622.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-27 20:23:08 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
var log messages
none
output of dmesg
none
wpa_supplicant log; connecting to ad-hoc failed (nl80211)
none
wpa_supplicant log; connecting to ad-hoc succeeded (wext)
none
/var/log/messages File Unable to connect to Adhoc network created. (Was able to do in F14, where i could then connect this adhoc n/w to my mobile) none

Description Michal Hlavinka 2011-04-24 07:51:27 UTC
Description of problem:
In Fedora 15 I can't connect to wifi network (it's wep protected) nor create wifi network (share wired connection). It was working fine in Fedora 14.

Version-Release number of selected component (if applicable):
NetworkManager-glib-0.8.998-3.git20110419.fc15.x86_64
NetworkManager-gnome-0.8.998-3.git20110419.fc15.x86_64
NetworkManager-0.8.998-3.git20110419.fc15.x86_64
NetworkManager-vpnc-0.8.998-1.git20110405.fc15.x86_6

How reproducible:
always

Steps to Reproduce:
1.network applet ->connect to wifi
2.
3.
  
Actual results:
trying to connect for some time, then give up 

Expected results:
connected

Additional info:
Tried from KDE, KDE&nm-applet, Gnome shell but none of them works.
Atheros (ath9k) wifi

Manual connection:
ifconfig wlan0 down
iwconfig wlan0 mode ad-hoc essid <essid> key s:<password>
ifconfig wlan0 up
dhclient wlan0

works fine

Comment 1 Michal Hlavinka 2011-04-24 08:03:13 UTC
> Actual results:
> trying to connect for some time, then give up 

It tries to connect and asks for password again and again

selinux is in permissive mode

Comment 2 Michal Hlavinka 2011-04-24 08:04:16 UTC
Created attachment 494498 [details]
var log messages

Comment 3 Michal Hlavinka 2011-04-24 08:06:30 UTC
Created attachment 494499 [details]
output of dmesg

Comment 4 Jirka Klimes 2011-05-05 17:22:19 UTC
The problem connecting to the ad-hoc network is a bug in nl80211 driver and/or its interaction with wpa_supplicant.
It occurs now (in F15) because NetworkManager started to instruct wpa_supplicant to use nl80211 driver instead of deprecated wext (used in F14). Actually it sends "nl80211,wext" to wpa_supplicant.

I tested a connection to an ad-hoc network (WEP):
- with T400 with PRO/Wireless 5100 AGN [Shiloh] (iwlagn)
- and wlan USB stick WL-167g (rt2500usb) with the same result:

* with nl80211 and it fails with:
nl80211: set_key failed; err=-67 Link has been severed)
and later
nl80211: Join IBSS failed: ret=-22 (Invalid argument)
Association request to the driver failed
 - wpa_supplicant log in comment #5

* when using wext, wpa_supplicant successfully connects
(changing driver string sent to supplicant from "80211,wext" to "wext" in NM's src/supplicant-manager/nm-supplicant-interface.c)
 - wpa_supplicant log in comment #6

My kernel is 2.6.38.5-22.fc15.x86_64.

I've also found this interesting discussion comparing wext and nl80211:
http://lists.shmoo.com/pipermail/hostap/2009-September/020268.html
(still the same bug as in Sep 2009 ? :( )

Assigning to kernel in order an expert can look at it.


The second problem is that Gnome shell applet still lacks lot of functionality on old nm-applet. There is no entry in the applet to create new ad-hoc network.
Nonetheless, there is a workaround:
1. run nm-connection-editor and create an ad-hoc connection
2. go to Network Settings (control-center -> network), click on Wireless
3. open "Network Name" combobox and click to "Other..."
4. in the "Hidden wireless network" click to Connection combo with "New..."
5. select your network created in step 1.
6. click Connect

Comment 5 Jirka Klimes 2011-05-05 17:24:14 UTC
Created attachment 497168 [details]
wpa_supplicant log; connecting to ad-hoc failed  (nl80211)

Comment 6 Jirka Klimes 2011-05-05 17:25:05 UTC
Created attachment 497170 [details]
wpa_supplicant log; connecting to ad-hoc succeeded  (wext)

Comment 7 Jirka Klimes 2011-05-09 08:50:45 UTC
*** Bug 702115 has been marked as a duplicate of this bug. ***

Comment 8 Jirka Klimes 2011-05-09 09:42:05 UTC
*** Bug 698348 has been marked as a duplicate of this bug. ***

Comment 9 Adam Williamson 2011-05-24 14:56:31 UTC

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers

Comment 10 Dan Williams 2011-05-24 17:42:25 UTC
Apparently the issue is that NM isn't always sending a starting frequency when attempting to create or join an Ad-Hoc network.  I can't reproduce locally, but I've applied a fix upstream that will always send a valid IBSS frequency to the supplicant.

0b5ab39dbf14b4d3d34c4a37b10fa084d0fb272a (master)
836e461b481bd54c2fd3f3b24425aae1625c5d6b (0.8.x)

Comment 11 Delicostea Daniel 2011-05-24 18:18:25 UTC
cannot find any networkmanager yet in repo

Comment 12 Fedora Update System 2011-05-26 16:23:39 UTC
NetworkManager-0.8.999-3.git20110526.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/NetworkManager-0.8.999-3.git20110526.fc15

Comment 13 Fedora Update System 2011-05-26 21:56:34 UTC
Package NetworkManager-0.8.999-3.git20110526.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing NetworkManager-0.8.999-3.git20110526.fc15'
as soon as you are able to, then reboot.
Please go to the following url:
https://admin.fedoraproject.org/updates/NetworkManager-0.8.999-3.git20110526.fc15
then log in and leave karma (feedback).

Comment 14 Delicostea Daniel 2011-05-27 00:59:29 UTC
this is a joke??

[root@ASUS daniel]# yum update --enablerepo=updates-testing NetworkManager-0.8.999-3.git20110526.fc15
Loaded plugins: langpacks, presto, refresh-packagekit
Setting up Update Process
No Match for argument: NetworkManager-0.8.999-3.git20110526.fc15
No package NetworkManager-0.8.999-3.git20110526.fc15 available.
No Packages marked for Update

also i search in rawhide and nothing, here in fri 03:59 gmt+2

Comment 15 Delicostea Daniel 2011-05-27 01:15:31 UTC
i change metadata_exipre to 1d and:

Running Transaction
  Updating   : 1:NetworkManager-glib-0.8.999-3.git20110526.fc15.x86_64                                                                           1/6 
  Updating   : 1:NetworkManager-0.8.999-3.git20110526.fc15.x86_64                                                                                2/6 
  Updating   : 1:NetworkManager-gnome-0.8.999-3.git20110526.fc15.x86_64 

starting NetworkManager

success, now is working, is connected at my ad-hoc network, thanx

Comment 16 Fedora Update System 2011-05-27 20:22:41 UTC
NetworkManager-0.8.999-3.git20110526.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Paul Kronenwetter 2011-05-29 18:28:05 UTC
I'm having the same problems with the new NM (NetworkManager-0.8.999-3.git20110526.fc15) as with the previous version (NetworkManager-0.8.999-2.git20110509.fc15).

I need to stop the NM service, use iwconfig to set up the wireless interface, give it an IP (static or dhcp), then things start working...

I also tried the workaround in Comment 4, but it doesn't work either.  Maybe it doesn't work with 0.8.999-3 - I'd already upgraded before I found this bug report.  

What other information can I provide?

Comment 18 Delicostea Daniel 2011-05-29 21:16:30 UTC
For me with 0.8.999-3 it is working, my problem was to connect to an ad-hoc network, i repet, NOW IS WORKING PERFECT

Comment 19 Michael Colligan 2011-06-09 05:04:48 UTC
This bug should be re-opened.  I am experiencing the exact same behavior as reported in original bug report.  I can access ad-hoc network fine manually with NM disabled but not using NM and any Gnome 3 interfaces.

Info:

F15 up to date.

NetworkManager-gnome-0.8.9997-1.git20110531.fc15.i686

08:00.0 Network controller: Atheros Communications Inc. AR9285 Wireless Network Adapter (PCI-Express) (rev 01)


What can I do to help?

Comment 20 Fedora Update System 2011-06-22 18:55:58 UTC
NetworkManager-0.8.4-2.git20110622.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/NetworkManager-0.8.4-2.git20110622.fc14

Comment 21 harsh1492 2011-07-09 10:00:44 UTC
Created attachment 512036 [details]
/var/log/messages File
Unable to connect to Adhoc network created. 
(Was able to do in F14, where i could then connect this adhoc n/w to my mobile)

# cat /var/log/wpa_supplicant.log 
No network configuration found for the current AP
Trying to associate with SSID 'fedora_adhoc'
Associated with 36:a7:fa:2e:6c:a7
CTRL-EVENT-CONNECTED - Connection to 36:a7:fa:2e:6c:a7 completed (auth) [id=0 id_str=]
Trying to associate with SSID 'fedora_adhoc'
Associated with 36:63:2e:7c:37:06
CTRL-EVENT-CONNECTED - Connection to 36:63:2e:7c:37:06 completed (reauth) [id=0 id_str=]
Trying to associate with SSID 'fedora_adhoc'
Associated with 7e:26:a3:cc:eb:d9
CTRL-EVENT-CONNECTED - Connection to 7e:26:a3:cc:eb:d9 completed (reauth) [id=0 id_str=]

Comment 22 harsh1492 2011-07-09 10:02:54 UTC
Comment on attachment 512036 [details]
/var/log/messages File
Unable to connect to Adhoc network created. 
(Was able to do in F14, where i could then connect this adhoc n/w to my mobile)

Not able to connect to ad-hoc network

Please let me know if more details are required.

Comment 23 Jirka Klimes 2011-07-11 07:59:10 UTC
To harsh1492:
According the log, wpa_supplicant succesfully connected to the AP. What is the problem is that you don't get an IP via DHCP. Please ensure you have dnsmasq installed on the machine with 'fedora_adhoc'.
And don't hijack this bug, rather open new one if you still have an issue.

Comment 24 Fedora Update System 2011-08-12 10:53:19 UTC
NetworkManager-0.8.4-2.git20110622.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 25 Fedora Update System 2011-08-12 18:22:53 UTC
NetworkManager-0.8.4-2.git20110622.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 26 Adam Williamson 2011-11-08 06:14:43 UTC

-- 
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers