NetworkManager ofono code shouldn't increase connection timeout if GPRS is not attached

Bug #1204678 reported by Tony Espy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
touch-preview-images
Fix Released
High
Mathieu Trudel-Lapierre

Bug Description

While testing touch image 20130723 on mako, I noticed that the mobile data connection was taking a bit longer than expected to activate.

This can be traced to two factors...

First, for some reason, RILD on mako seems to take a bit longer to settle and auto-connect to GPRS.

 Second, if mobile data is enabled, Network Manager attempts to activate the mobile data connection, and then after multiple attempts which are made roughly 3 seconds apart, ( looks like this is hard-coded to 4 ), gives up and sets a 5m timer. Typically GPRS is attached at this point, so when the NM timer fires, it's able to activate the mobile data connection this time around. This can introduce a delay of nearly 5m till mobile data is activated.

To be clear NM doesn't actually try to activate the data contexts via DBus if GPRS is not attached, however it still has retry logic that runs if mobile data is enabled, and increments an internal counter that eventually causes the retry timeout to be increased.

A better solution would be to either not increase the retry counter if GPRS isn't attached, or possibly not try to connect at all until the GPRS 'Attached' property becomes active.

This image includes network-manager version: 0.9.8.0-0ubuntu16phablet1.

I will attach the relevant syslog messages to the bug.

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

Note, as an aside I created bug #1204683 to track a related issue with ofono and a patch we made to its mbpi provisioning plugin which allows multiple data contexts to be created.

Changed in touch-preview-images:
assignee: nobody → Mathieu Trudel-Lapierre (mathieu-tl)
importance: Undecided → High
Revision history for this message
Tony Espy (awe) wrote :

The initial mobile data connect attempt by NM can be seen at 21:03:46, and then notice the gap between the message at 21:03:55 and 21:08:55.

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

That's a toughie, the retry delay is hard-coded in NM and generic for all devices, though there may be a way to trick it into not setting the connection as invalid; I'll look.

Changed in touch-preview-images:
status: New → Triaged
Revision history for this message
Tony Espy (awe) wrote :

As I mentioned before, NM should never even attempt to activate the data connection if GPRS isn't attached.

Perhaps we need to think of 'Powered' and 'Attached' as soft and hard kill switches for mobile data.

In other words, if 'Attached' is false, it overrides the value of 'Powered', and thus no connection attempts are made.

Note, this is related but different than how airplane mode should be handled ( which requires toggling the master 'Powered' property of ofono's ModemManager interface ).

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

I think this is fixed now, we watch both Powered and Attached to set the modem Enabled; any change on these two properties sets it back to Enabled = false or whatever, based on the states.

Changed in touch-preview-images:
status: Triaged → 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.