Bug 273762 - plasma-widget-networkmanagement doesn't automatically detect ad-hoc type and channel
Summary: plasma-widget-networkmanagement doesn't automatically detect ad-hoc type and ...
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-21 00:13 UTC by Iacopo Benesperi
Modified: 2011-06-13 04:51 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
.xsession-error log (14.66 KB, text/plain)
2011-05-21 19:34 UTC, Iacopo Benesperi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Iacopo Benesperi 2011-05-21 00:13:07 UTC
Version:           unspecified (using KDE 4.4.5) 
OS:                Linux

The plasma widget for network manager (and knetworkmanager before it) is not able to connect to ad-hoc WiFi networks created by JoikuSpot (a quite popular software for smartphones).
I believe it's a plasma-widget-networkmanagement problem and not a network manager one because everything works fine on the same system with Gnome + nm-applet.
I don't know how to debug it, but I'm willing to help if you tell me what to do.

The widget version I'm using now is the one shipped with Debian testing, 0.1+git20110422.8 on top of KDE 4.4.5, NM version 8.4.0

Reproducible: Always

Steps to Reproduce:
1. Switch on JoikuSpot on a smartphone
2. Switch on the WiFi card on PC
3. Open plasma widget and select the JoikuSpot WiFi network

Actual Results:  
Connection to the WiFi fails

Expected Results:  
PC connects to the WiFi and use the net
Comment 1 Lamarque V. Souza 2011-05-21 17:56:38 UTC
Please add the NetworkManager log file and ~/.xsession-errors file
Comment 2 Iacopo Benesperi 2011-05-21 18:51:45 UTC
This is the NetworkManager log with the plasma widget (taken from /var/log/daemon.log, I don't know if there's another log; in case can you give me the path?):
NetworkManager[1868]: <info> Activation (wlan0) starting connection 'trillian'
NetworkManager[1868]: <info> Activation (wlan0/wireless): connection 'trillian' requires no security.  No secrets needed.
NetworkManager[1868]: <info> Config: added 'ssid' value 'trillian'
NetworkManager[1868]: <warn> Activation (wlan0) failed for access point (trillian)
NetworkManager[1868]: <info> Marking connection 'trillian' invalid.

This is the NetworkManager log with nm-applet:
NetworkManager[2147]: <info> Activation (wlan0) starting connection 'Auto trillian'
NetworkManager[2147]: <info> Activation (wlan0/wireless): connection 'Auto trillian' requires no security.  No secrets needed.
NetworkManager[2147]: <info> Config: added 'ssid' value 'trillian'
NetworkManager[2147]: <info> Activation (wlan0/wireless) Stage 2 of 5 (Device Configure) successful.  Connected to wireless network 'trillian'.
NetworkManager[2147]: <info> Policy set 'Auto trillian' (wlan0) as default for IPv4 routing and DNS.

This is the .xsession-errors file:
kwin(3348) KWin::Client::readUserTimeMapTimestamp: User timestamp, initial: 4294967295
kwin(3348) KWin::Client::readUserTimeMapTimestamp: User timestamp, ASN: 32556066
kwin(3348) KWin::Client::readUserTimeMapTimestamp: User timestamp, final: 'ID: 44040226 ;WMCLASS: "kwrite" : "kwrite" ;Caption: ".xsession-errors – KWrite" ' : 32556066
kwin(3348) KWin::Workspace::allowClientActivation: Activation, compared: 'ID: 44040226 ;WMCLASS: "kwrite" : "kwrite" ;Caption: ".xsession-errors – KWrite" ' : 32556066 : 32556066 : true
kwin(3348) KWin::Workspace::updateClientArea: screens:  1 desktops:  4
kwin(3348) KWin::Workspace::updateClientArea: Done.
kwin(3348) KWin::Client::readUserTimeMapTimestamp: User timestamp, initial: 32576330
kwin(3348) KWin::Client::readUserTimeMapTimestamp: User timestamp, ASN: 32576330
kwin(3348) KWin::Client::readUserTimeMapTimestamp: User timestamp, final: 'ID: 33554670 ;WMCLASS: "plasma-desktop" : "plasma-desktop" ;Caption: "plasma-desktop" ' : 32576330
kwin(3348) KWin::Workspace::allowClientActivation: Activation, compared: 'ID: 33554670 ;WMCLASS: "plasma-desktop" : "plasma-desktop" ;Caption: "plasma-desktop" ' : 32576330 : 32558082 : true
kwin(3348) KWin::Workspace::updateClientArea: screens:  1 desktops:  4
kwin(3348) KWin::Workspace::updateClientArea: Done.
kwin(3348) KWin::Workspace::allowClientActivation: Activation: Belongs to active application
QGraphicsLinearLayout::removeAt: invalid index 1
QPixmap::scaled: Pixmap is a null pixmap
kwin(3348) KWin::Workspace::updateClientArea: screens:  1 desktops:  4
kwin(3348) KWin::Workspace::updateClientArea: Done.
Comment 3 Lamarque V. Souza 2011-05-21 19:11:54 UTC
The .xsession-errors file should be much larger than that. Please use kdebugdialog, search for network and activate all checkbox that will appear and try again.

The NetworkManager log also should contain more details. The log does not contain any reason for why the connection did not work.
Comment 4 Iacopo Benesperi 2011-05-21 19:34:10 UTC
Created attachment 60207 [details]
.xsession-error log
Comment 5 Iacopo Benesperi 2011-05-21 19:35:35 UTC
I've checked everything and now things are more verbose. I've attached .xsession-errors log because it's quite long, while this is the NetworkManager log:

NetworkManager[1973]: <info> (wlan0): device state change: 8 -> 3 (reason 0)
NetworkManager[1973]: <info> (wlan0): deactivating device (reason: 0).
NetworkManager[1973]: <info> (wlan0): canceled DHCP transaction, DHCP client pid 9520
NetworkManager[1973]: <info> (wlan0): removing resolv.conf from /sbin/resolvconf
NetworkManager[1973]: <info> Activation (wlan0) starting connection 'trillian'
NetworkManager[1973]: <info> (wlan0): device state change: 3 -> 4 (reason 0)
NetworkManager[1973]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) scheduled...
NetworkManager[1973]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) started...
NetworkManager[1973]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) scheduled...
NetworkManager[1973]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) complete.
NetworkManager[1973]: <info> (wlan0): supplicant connection state:  completed -> disconnected
NetworkManager[1973]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) starting...
NetworkManager[1973]: <info> (wlan0): device state change: 4 -> 5 (reason 0)
NetworkManager[1973]: <info> Activation (wlan0/wireless): connection 'trillian' requires no security.  No secrets needed.
NetworkManager[1973]: <info> Config: added 'ssid' value 'trillian'
NetworkManager[1973]: <info> Config: added 'scan_ssid' value '1'
NetworkManager[1973]: <info> Config: added 'key_mgmt' value 'NONE'
NetworkManager[1973]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) complete.
NetworkManager[1973]: <info> Config: set interface ap_scan to 1
NetworkManager[1973]: <info> (wlan0): supplicant connection state:  disconnected -> scanning
NetworkManager[1973]: <warn> Activation (wlan0/wireless): association took too long, failing activation.
NetworkManager[1973]: <info> (wlan0): device state change: 5 -> 9 (reason 11)
NetworkManager[1973]: <warn> Activation (wlan0) failed for access point (trillian)
NetworkManager[1973]: <info> Marking connection 'trillian' invalid.
NetworkManager[1973]: <warn> Activation (wlan0) failed.
Comment 6 Lamarque V. Souza 2011-05-21 20:00:13 UTC
Can you repeat the nm-applet connection and send me the NetworkManager's log with the same details as the last one? I want to know which scan_ssid value nm-applet uses.

I have never used JoikuSpot, it drains too much battery power, so I do not know if the access point it creates is of type ad-hoc or master. If it is ad-hoc then scan_ssid=1 will not detect it.
Comment 7 Iacopo Benesperi 2011-05-21 20:22:28 UTC
Here you are:

NetworkManager[1973]: <info> (wlan0): device state change: 8 -> 3 (reason 0)
NetworkManager[1973]: <info> (wlan0): deactivating device (reason: 0).
NetworkManager[1973]: <info> (wlan0): canceled DHCP transaction, DHCP client pid 31346
NetworkManager[1973]: <info> (wlan0): removing resolv.conf from /sbin/resolvconf
NetworkManager[1973]: <info> Activation (wlan0) starting connection 'Auto trillian'
NetworkManager[1973]: <info> (wlan0): device state change: 3 -> 4 (reason 0)
NetworkManager[1973]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) scheduled...
NetworkManager[1973]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) started...
NetworkManager[1973]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) scheduled...
NetworkManager[1973]: <info> Activation (wlan0) Stage 1 of 5 (Device Prepare) complete.
NetworkManager[1973]: <info> (wlan0): supplicant connection state:  completed -> disconnected
NetworkManager[1973]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) starting...
NetworkManager[1973]: <info> (wlan0): device state change: 4 -> 5 (reason 0)
NetworkManager[1973]: <info> Activation (wlan0/wireless): connection 'Auto trillian' requires no security.  No secrets needed.
NetworkManager[1973]: <info> Config: added 'ssid' value 'trillian'
NetworkManager[1973]: <info> Config: added 'mode' value '1'
NetworkManager[1973]: <info> Config: added 'key_mgmt' value 'NONE'
NetworkManager[1973]: <info> Activation (wlan0) Stage 2 of 5 (Device Configure) complete.
NetworkManager[1973]: <info> Config: set interface ap_scan to 2
NetworkManager[1973]: <info> (wlan0): supplicant connection state:  disconnected -> scanning
NetworkManager[1973]: <info> (wlan0): supplicant connection state:  scanning -> associating
NetworkManager[1973]: <info> (wlan0): supplicant connection state:  associating -> associated
NetworkManager[1973]: <info> (wlan0): supplicant connection state:  associated -> completed
NetworkManager[1973]: <info> Activation (wlan0/wireless) Stage 2 of 5 (Device Configure) successful.  Connected to wireless network 'trillian'.
NetworkManager[1973]: <info> Activation (wlan0) Stage 3 of 5 (IP Configure Start) scheduled.
NetworkManager[1973]: <info> Activation (wlan0) Stage 3 of 5 (IP Configure Start) started...
NetworkManager[1973]: <info> (wlan0): device state change: 5 -> 7 (reason 0)
NetworkManager[1973]: <info> Activation (wlan0) Beginning DHCPv4 transaction (timeout in 45 seconds)
NetworkManager[1973]: <info> dhclient started with pid 31461
NetworkManager[1973]: <info> Activation (wlan0) Stage 3 of 5 (IP Configure Start) complete.
NetworkManager[1973]: <info> (wlan0): DHCPv4 state changed nbi -> preinit
NetworkManager[1973]: <info> (wlan0): DHCPv4 state changed preinit -> reboot
NetworkManager[1973]: <info> Activation (wlan0) Stage 4 of 5 (IP4 Configure Get) scheduled...
NetworkManager[1973]: <info> Activation (wlan0) Stage 4 of 5 (IP4 Configure Get) started...
NetworkManager[1973]: <info>   address 192.168.2.2
NetworkManager[1973]: <info>   prefix 24 (255.255.255.0)
NetworkManager[1973]: <info>   gateway 192.168.2.1
NetworkManager[1973]: <info>   nameserver '62.13.173.92'
NetworkManager[1973]: <info>   nameserver '62.13.173.93'
NetworkManager[1973]: <info> Scheduling stage 5
NetworkManager[1973]: <info> Activation (wlan0) Stage 5 of 5 (IP Configure Commit) scheduled...
NetworkManager[1973]: <info> Done scheduling stage 5
NetworkManager[1973]: <info> Activation (wlan0) Stage 4 of 5 (IP4 Configure Get) complete.
NetworkManager[1973]: <info> Activation (wlan0) Stage 5 of 5 (IP Configure Commit) started...
NetworkManager[1973]: <info> (wlan0): writing resolv.conf to /sbin/resolvconf
NetworkManager[1973]: <info> (wlan0): device state change: 7 -> 8 (reason 0)
NetworkManager[1973]: <info> Policy set 'Auto trillian' (wlan0) as default for IPv4 routing and DNS.
NetworkManager[1973]: <info> Activation (wlan0) successful, device activated.
NetworkManager[1973]: <info> Activation (wlan0) Stage 5 of 5 (IP Configure Commit) complete.
Comment 8 Lamarque V. Souza 2011-05-21 23:28:33 UTC
(In reply to comment #7)
> Here you are:
> 
> NetworkManager[1973]: <info> Config: set interface ap_scan to 2

Yeah, nm-applet set it to 2 instead of 1. In Plasma NM try changing your wifi connection configuration to "ad-hoc" instead of "Intrastructure", that should let you connect.
Comment 9 Iacopo Benesperi 2011-05-23 22:09:51 UTC
Yes, that worked. I can't believe I didn't set it as ad-hoc for all this time! Anyway, let me do I final summary, and tell me if we should open another bug.
My point is: JoikuSpot advertise itself as an ad-hoc network, and NetworkManager can detect it since nm-applet set it the right way automatically. Shouldn't this autoconfig feature be implemented in the plasma widget, too?

A second problem is that to make the connection work I had to edit JoikuSpot configuration. The default behaviour for JoikuSpot is to pick a random channel for the WiFi when the connection is set up (maybe it checks the surroundings to avoid conflicts). If I set the network as ad-hoc in the widget I'm forced to set a channel for the WiFi, too, and this may lead to a non-working connection. After setting a definite channel on JoikuSpot, it connected. Again, nm-applet is able to deal with the channel discovery, so NetworkManager is capable, too. It would be a great thing to have this feature on the plasma widget, too.
Comment 10 Lamarque V. Souza 2011-05-23 22:46:10 UTC
Yes, both are valid problems to solve. I do not thinkg you need to create other bug entries for them, maybe just change this bug's description.
Comment 11 Iacopo Benesperi 2011-05-23 22:59:26 UTC
Ok, thanks! I'll be here for debugging when needed.
Comment 12 Lamarque V. Souza 2011-06-13 04:49:32 UTC
Git commit 84754993bcf17eab61fe4c5e1fa2fc8ad26451b4 by Lamarque V. Souza.
Committed on 13/06/2011 at 04:38.
Pushed by lvsouza into branch 'master'.

Fill in Wireless80211Widget and WirelessSecuritySettingWidget with
access point info when selecting one in ScanWidget.

BUG: 273762

M  +114  -2    libs/ui/802_11_wirelesswidget.cpp     
M  +8    -1    libs/ui/802_11_wirelesswidget.h     
M  +42   -2    libs/ui/scanwidget.cpp     
M  +1    -1    libs/ui/scanwidget.h     
M  +13   -34   libs/ui/wirelesspreferences.cpp     
M  +3    -0    libs/ui/wirelesspreferences.h     

http://commits.kde.org/networkmanagement/84754993bcf17eab61fe4c5e1fa2fc8ad26451b4
Comment 13 Lamarque V. Souza 2011-06-13 04:51:02 UTC
Git commit cbbc378b84f86ef187737334fcdfb01caa3c59e7 by Lamarque V. Souza.
Committed on 13/06/2011 at 04:48.
Pushed by lvsouza into branch 'nm09'.

Fill in Wireless80211Widget and WirelessSecuritySettingWidget with
access point info when selecting one in ScanWidget.

BUG: 273762

M  +114  -2    libs/ui/802_11_wirelesswidget.cpp     
M  +8    -1    libs/ui/802_11_wirelesswidget.h     
M  +42   -2    libs/ui/scanwidget.cpp     
M  +1    -1    libs/ui/scanwidget.h     
M  +13   -34   libs/ui/wirelesspreferences.cpp     
M  +3    -0    libs/ui/wirelesspreferences.h     

http://commits.kde.org/networkmanagement/cbbc378b84f86ef187737334fcdfb01caa3c59e7