NetworkManager ofono code shouldn't increase connection timeout if GPRS is not attached
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-
I will attach the relevant syslog messages to the bug.
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.