Hotspot not working with NM 1.2

Bug #1579221 reported by Pat McGowan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
Critical
Tony Espy
indicator-network (Ubuntu)
Fix Released
Critical
Pete Woods

Bug Description

While testing network-manager 1.1.93-0ubuntu1~vivid1 we noticed that hotspot no longer worked on arale or krillin ( it's not enabled on mako ).

The first issue was that if no NM connection file yet existed for the hotspot, indicator-network would fail creating one due to a DBus error:

void nmofono::HotspotManager::Priv::addConnection() Adding new hotspot connection
Failed to add connection: "ipv4.dns: can't set property of type 'au' from value of type 'as'"

This was due to indicator-network using the following code to set this setting:

ipv4[QStringLiteral("dns")] = QVariant(QStringList());

My guess is that NM's re-factoring of it's DBus code to use gdbus instead of dbus-glib, resulting in NM being a bit more strict in it's parameter checking.

Removing this, and the same for the 'addresses' and 'routes' settings allows indicator-network to create hotspot connection files once again.
See the associated branch for the update.

If a connection file already exists, or one is created with the fix from the merge proposal, then the current problem is that when 'Start' is pressed, the UI displays a spinner which is never dismissed.

Testing has shown that the hotspot is actually activated, can be seen from other devices and connected to.

Testing has also shown that it's possible to activate the hotspot using nmcli directly, and the result is usable from other clients.

Related branches

Changed in indicator-network (Ubuntu):
status: New → In Progress
Changed in canonical-devices-system-image:
status: Confirmed → In Progress
Changed in indicator-network (Ubuntu):
importance: Undecided → Critical
Revision history for this message
Tony Espy (awe) wrote :

Also should note that a version of indicator-network with the settings fix for hotspot can be found in the following CI ticket / silo:

https://requests.ci-train.ubuntu.com/#/ticket/1338
https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/landing-019

description: updated
Tony Espy (awe)
Changed in indicator-network (Ubuntu):
assignee: nobody → Alfonso Sanchez-Beato (alfonsosanchezbeato)
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

It looks like the reason for this is a race condition that was not triggered before. In indicator-network, we enable the FW in HotspotManager::setEnabled() doing:

d->createApDevice();

which loads AP firmware, and if that is successful, immediately after that

d->enable(device);

However, NM returns an error because the device is in state NM_DEVICE_STATE_UNAVAILABLE. Introducing a waiting time between both calls makes it work.

The right solution for this is to track the device state in indicator-network so we do not enable until state > NM_DEVICE_STATE_UNAVAILABLE. Note that this happens in krillin/arale because for them we create a new device when activating hotspot (ap0), while in turbo we are still using wlan0 and changing the fw does not move the state to "unavailable".

Changed in indicator-network (Ubuntu):
assignee: Alfonso Sanchez-Beato (alfonsosanchezbeato) → Pete Woods (pete-woods)
Revision history for this message
Pete Woods (pete-woods) wrote :

In silo #19 we now have the following changes:
  * Fix limitations property (Lorn's patch)
  * Remember hotspot UUID (stop NM warning about changing UUID)
  * Wait for hotspot device to be ready, not just present (as per Alfonso's recommendation)
  * Don't create NM ipv4 settings with empty values (Tony's fix)

Revision history for this message
Pete Woods (pete-woods) wrote :

This fixes all the of issues I am *aware* of in indicator-network. However when enabling hotspot on Krillin channel 'ubuntu-touch/rc-proposed/bq-aquaris.en' r329 I seem to get kernel panics some of the time. Additionally I also have seen a network-manager crash:

http://people.canonical.com/~pete/nm-debugging/

Revision history for this message
Pete Woods (pete-woods) wrote :

I've added an additional fix to the indicator in the silo that waits for the hotspot connection state to turn active before releasing control to the user.

Changed in canonical-devices-system-image:
status: In Progress → Fix Committed
Pete Woods (pete-woods)
Changed in indicator-network (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package indicator-network - 0.7.1+16.04.20160511-0ubuntu1

---------------
indicator-network (0.7.1+16.04.20160511-0ubuntu1) xenial; urgency=medium

  [ Pete Woods ]
  * Fix limitations property (LP: #1547194)
  * Remember hotspot UUID
  * Store information about which device we are using in a member
    variable
  * Wait for hotspot device to be ready, not just present (LP: #1579221)
  * Wait for hotspot to finish activating

  [ Tony Espy ]
  * hotspot: Don't create NM ipv4 settings with empty values. (LP:
    #1579221)

 -- Tony Espy <email address hidden> Wed, 11 May 2016 16:57:39 +0000

Changed in indicator-network (Ubuntu):
status: Fix Committed → Fix Released
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.