Closed Bug 772750 Opened 12 years ago Closed 9 years ago

B2G AGPS: get mobile connection technology from rilcontext

Categories

(Firefox OS Graveyard :: General, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(firefox41 fixed)

RESOLVED FIXED
2.2 S13 (29may)
Tracking Status
firefox41 --- fixed

People

(Reporter: kanru, Assigned: kanru)

References

Details

Attachments

(1 file, 1 obsolete file)

When setting a reference location, there are three different type we could use: GSM_CELLID, UMTS_CELLID and MAC. MAC is not used and there should be no difference between GSM and UMTS cell id. But in case of there is difference, we could get the connection technology from rilcontext.
Dear Kan-Ru, I found this function in v2.1s >void >GonkGPSGeolocationProvider::SetReferenceLocation() >{ > MOZ_ASSERT(NS_IsMainThread()); > > if (!mRadioInterface || > !mAGpsRilInterface) { > return; > } > > AGpsRefLocation location; > > // TODO: Bug 772750 - get mobile connection technology from rilcontext > location.type = AGPS_REF_LOCATION_TYPE_UMTS_CELLID; Could you help explain why to set "location.type" with a const value (AGPS_REF_LOCATION_TYPE_UMTS_CELLID) here? Do you think it necessary change "location.type" according to the type which ril reported? We found AGPS did not work normally at GSM network, TTFF would be more than 40 min sometimes. Is there something to do with this constant value "location.type"? Thank you.
Flags: needinfo?(kchen)
(In reply to Shiwei Zhang from comment #1) > Dear Kan-Ru, > I found this function in v2.1s > >void > >GonkGPSGeolocationProvider::SetReferenceLocation() > >{ > > MOZ_ASSERT(NS_IsMainThread()); > > > > if (!mRadioInterface || > > !mAGpsRilInterface) { > > return; > > } > > > > AGpsRefLocation location; > > > > // TODO: Bug 772750 - get mobile connection technology from rilcontext > > location.type = AGPS_REF_LOCATION_TYPE_UMTS_CELLID; > > Could you help explain why to set "location.type" with a const value > (AGPS_REF_LOCATION_TYPE_UMTS_CELLID) here? Do you think it necessary change > "location.type" according to the type which ril reported? > > We found AGPS did not work normally at GSM network, TTFF would be more than > 40 min sometimes. > Is there something to do with this constant value "location.type"? > > Thank you. It's best to set the type based on the value reported by ril. That is why this bug exists. There are many factors will affect the TTFF. Does it improve if you change the constant to GSM_CELLID?
Flags: needinfo?(kchen)
(In reply to Kan-Ru Chen [:kanru] from comment #2) Thank you Kan-Ru, > It's best to set the type based on the value reported by ril. That is why > this bug exists. Can we import the type value from ril, could you give a patch for this? The net type will change at any time in China, GSM will be used if there is not a UMTS. So I think we'd better assign a variable value to it. Thanks. > There are many factors will affect the TTFF. Does it improve if you change > the constant to GSM_CELLID? I have not tested the case, since it is a occasional issue, maybe I can have a try, but it is not a good solution.
Flags: needinfo?(kchen)
Attached file MozReview Request: bz://772750/kanru (obsolete) (deleted) —
/r/9339 - Bug 772750 - Get mobile connection technology from rilcontext. r=garvank,echen Pull down this commit: hg pull -r 930d3d544eb3b4ed6b5542f51f2da5eaef8c6f0c https://reviewboard-hg.mozilla.org/gecko/
Attachment #8610087 - Flags: review?(gkeeley)
Attachment #8610087 - Flags: review?(echen)
https://reviewboard.mozilla.org/r/9339/#review8099 ::: dom/system/gonk/GonkGPSGeolocationProvider.cpp:517 (Diff revision 1) > + const char* UMTS_TYPES[] = { "umts", "hspda", "hsupa", "hspa", "hspa+" }; Based on the fact that these constants match: https://dxr.mozilla.org/mozilla-central/source/dom/mobileconnection/interfaces/nsIMobileConnectionInfo.idl#49 And gps.h only has GSM/UMTS and MAC as input types for AGPS ref. location, so this LGTM.
Depends on: 1168068
Attachment #8610087 - Flags: review?(gkeeley) → review+
https://reviewboard.mozilla.org/r/9339/#review8167 Looks good to me, just one thing: please revise the commit message a bit, because the mobile connection technology is no longer being exposed by rilContext, but MobileConnectionService. Thank you.
Attachment #8610087 - Flags: review?(echen) → review+
Assignee: nobody → kchen
Flags: needinfo?(kchen)
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → 2.2 S13 (29may)
Attachment #8610087 - Attachment is obsolete: true
Attachment #8617998 - Flags: review+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: