creating a hotspot should disconnect from the current AP & prevent NM from auto-connecting to another known AP

Bug #1478009 reported by Ken VanDine
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
High
Bill Filler
indicator-network (Ubuntu)
Fix Released
High
Pete Woods

Bug Description

When creating a new hotspot using the attached script, NM no longer disconnects from the current AP. I'm sure I've looked at this sometime in the past and confirmed it wasn't connected, so this behavior has changed at some point.

I tested this on arale rc-proposed image 68

krillin (stable, #24 ) will cause the current AP to disconnect, however if another known AP is available, it will re-connect.

Tags: hotspot

Related branches

Revision history for this message
Ken VanDine (ken-vandine) wrote :
affects: network-manager (Ubuntu) → indicator-network (Ubuntu)
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

Ran script on krillin and it seemed to work fine. This phone does not have a sim currently

hablet@ubuntu-phablet:~$ nmcli d
DEVICE TYPE STATE CONNECTION
ap0 wifi connected test
wlan0 wifi disconnected --

Revision history for this message
Tony Espy (awe) wrote :

I just checked iOS8 ( on an iPhone 6 ) and AOSP4 ( on a Nexus5 ). Both ensure that WiFi enabled and Hotspot enabled are mutually exclusive. If you enable WiFi, you can't enable hotspot. If hotspot is active and you enabled WiFi, it will kill the hotspot.

I also tested on krillin (stable #23). If I'm connected to a WiFi AP and I enable hotspot, the first time it disconnects, then a minute or two later, the AP is re-connected and the hotspot is deactivated. The second time I tried it, the AP didn't disconnect, however the hotspot again became disabled automatically.

Next I manually "forgot" the connected AP and tried to enable hotspot. It briefly enabled, and then disabled itself a minute or so later.

Revision history for this message
Tony Espy (awe) wrote :

Note, my phone was set to blank the screen after 1m. I changed the setting to 10m and verified that the screen stayed on during testing. After toggling the hotspot on, I saw it automatically disabled about 1-2m after enabling it.

Revision history for this message
Tony Espy (awe) wrote :

I re-tested a fresh flash of krillin ( stable, #24 ). I made sure to remove any connections found in /etc/NetworkManager/system-connections before testing as well.

I no longer see the re-connection problem. I've verfied that that if connected to a WiFi AP when hotspot is enabled, it properly disconnects. So I think this bug is arale-specific.

That said, I did find that the indicator doesn't prevent you from connecting to a WiFi AP that appears in the scan list ( note, the list eventually becomes empty, so you have to do this right away ). Also, if another AP is available that you've previously connected to, although the first AP is disconnected, nothing prevents NM from connecting to the second AP. I'll enter separate bugs for both of these.

Revision history for this message
Tony Espy (awe) wrote :

I extended this bug description to cover the fact that NM is prevented from auto-connecting to another known, available AP.

tags: added: hotspot
summary: - creating a hotspot should disconnect from the current AP
+ creating a hotspot should disconnect from the current AP & prevent NM
+ from auto-connecting to another known AP
description: updated
Revision history for this message
Tony Espy (awe) wrote :

When hotspot is enabled, both arale & krillin create a new WiFi device called "ap0". Krillin seems to do the right thing when the hotspot is activated ( ie. it disconnects the current connection on wlan0 ). Arale on the other hand doesn't.

When hotspot is deactivated, the "ap0" device is removed from the system.

The semi-bad news is that when hotspot is enabled "wlan0" is removed and then re-added as a new device in NM. Likewise when hotspot is disabled, this device is removed and re-added again as well.

So if you start out and "wlan0" is device 6 ( eg. /org/freedesktop/NetworkManager/Devices/6 ), and you enable hotspot, it'll get removed, and then re-added as the next available index. so if 7 was "/ril_0" and was the last device present, when hotspot is enabled, you'd end up with:

/org/freedesktop/NetworkManager/Devices/0
/org/freedesktop/NetworkManager/Devices/1
/org/freedesktop/NetworkManager/Devices/2
/org/freedesktop/NetworkManager/Devices/3
/org/freedesktop/NetworkManager/Devices/4
/org/freedesktop/NetworkManager/Devices/5
/org/freedesktop/NetworkManager/Devices/7
/org/freedesktop/NetworkManager/Devices/8 ( "wlan0" )
/org/freedesktop/NetworkManager/Devices/9 ( "ap0" )

( Note, the ordering of "wlan0" and "ap0" might be reversed ).

So... I think our idea of just setting the "Autoconnect" flag of the WiFi device when enabling hotspot needs to modified slightly. You need to be watch the device list and turn off "Autoconnect" for "wlan0" when it gets re-added. I don't think you'll need to do handle the disable hotspot case, as devices are always added with "Autoconnect=true".

Revision history for this message
Tony Espy (awe) wrote :
Revision history for this message
Tony Espy (awe) wrote :
Revision history for this message
Tony Espy (awe) wrote :
Pete Woods (pete-woods)
Changed in indicator-network (Ubuntu):
assignee: nobody → Pete Woods (pete-woods)
importance: Undecided → High
Pete Woods (pete-woods)
Changed in indicator-network (Ubuntu):
status: New → In Progress
Bill Filler (bfiller)
Changed in canonical-devices-system-image:
milestone: none → ww34-2015
Bill Filler (bfiller)
Changed in canonical-devices-system-image:
assignee: nobody → Bill Filler (bfiller)
importance: Undecided → High
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-network - 0.5.3+15.10.20150818-0ubuntu1

---------------
indicator-network (0.5.3+15.10.20150818-0ubuntu1) wily; urgency=medium

  [ Pete Woods ]
  * Link flight, WiFi and hotspot toggles. (LP: #11478159)
  * Add properties for when different toggles should be enabled. (LP: #1478159)
  * Add hotspot button
  * Add icon to show when hotspot is enabled (LP: #1485491)
  * Clean up connection from connectivity service to manager
  * Disconnect from access points when starting hotspot (LP: #1478009)
  * Enable Wifi when activating hotspot

 -- CI Train Bot <email address hidden> Tue, 18 Aug 2015 08:46:29 +0000

Changed in indicator-network (Ubuntu):
status: In Progress → Fix Released
Bill Filler (bfiller)
Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.