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". -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to indicator-network in Ubuntu. https://bugs.launchpad.net/bugs/1478009 Title: creating a hotspot should disconnect from the current AP & prevent NM from auto-connecting to another known AP Status in Canonical System Image: New Status in indicator-network package in Ubuntu: New 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. To manage notifications about this bug go to: https://bugs.launchpad.net/canonical-devices-system-image/+bug/1478009/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp