Closed Bug 728886 Opened 13 years ago Closed 13 years ago

B2G RIL: support RIL_VERSION = 6

Categories

(Core :: DOM: Device Interfaces, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla14

People

(Reporter: ferjm, Assigned: philikon)

References

Details

Attachments

(3 files, 2 obsolete files)

The SMSC can´t be retrieved using Akami devices. It just shows 'Cannot send the SMS. Need to get the SMSC address first.' message. I´ll give further info (RIL data) as soon as I get an akami again...
Blocks: 726233
This may sound like a firmware issue. Anyway, we would probably want to deal with this TODO -> https://hg.mozilla.org/mozilla-central/file/0a7410527788/dom/system/b2g/ril_worker.js#l2039
Digging a bit deeper, it seems that the radio state isn't notified beyond RADIO_STATE_SIM_NOT_READY. First I'm getting a notification for RADIO_STATE_UNAVAILABLE = 1 (the initial value being RADIO_STATE_UNAVAILABLE = 1): I/Gecko ( 83): RIL Worker: Handling parcel as UNSOLICITED_RESPONSE_RADIO_STATE_CHANGED I/Gecko ( 83): RIL Worker: Radio state changed from 1 to 1 Then, surprisingly, I get a notification for UNSOLICITED_RESPONSE_SIM_STATUS_CHANGED. AFAIUI, this is an invitation to query REQUEST_GET_SIM_STATUS = 1 which is what the RIL worker does immediately, but it gets an error: I/Gecko ( 83): RIL Worker: Parcel (size 12): 0,0,0,0,1,0,0,0,1,0,0,0 I/Gecko ( 83): RIL Worker: We have at least one complete parcel. I/Gecko ( 83): RIL Worker: Received error 1 for solicited parcel type 1 Later, we get another UNSOLICITED_RESPONSE_RADIO_STATE_CHANGED notification for RADIO_STATE_OFF = 0: I/Gecko ( 83): RIL Worker: Handling parcel as UNSOLICITED_RESPONSE_RADIO_STATE_CHANGED I/Gecko ( 83): RIL Worker: Radio state changed from 1 to 0 The last radio state notification I get is for RADIO_STATE_SIM_NOT_READY = 2; I/Gecko ( 83): RIL Worker: Handling parcel as UNSOLICITED_RESPONSE_RADIO_STATE_CHANGED I/Gecko ( 83): RIL Worker: Radio state changed from 0 to 2 After this I don't get any UNSOLICITED_RESPONSE_RADIO_STATE_CHANGED or UNSOLICITED_RESPONSE_SIM_STATUS_CHANGED anymore, even though clearly later the SIM card comes online (e.g. signal strength is notified, calls can be made, etc.). Could this be a rild bug on the akami?
Component: General → DOM: Device Interfaces
Product: Boot2Gecko → Core
QA Contact: general → device-interfaces
Summary: [B2G] SMSC cannot be retrieved on akami device → B2G RIL on akami device: UNSOLICITED_RESPONSE_RADIO_STATE_CHANGED is not notified past RADIO_STATE_SIM_NOT_READY
Version: unspecified → Trunk
Yeaaaah, so it turns out our Gonk is just stuck in the past and the akami's RIL is newer. Header file changed pretty dramatically. Working on a fix.
Assignee: nobody → philipp
Summary: B2G RIL on akami device: UNSOLICITED_RESPONSE_RADIO_STATE_CHANGED is not notified past RADIO_STATE_SIM_NOT_READY → B2G RIL: support RIL_VERSION = 6
Blocks: gonk-ics
Going to attach these patches without much testing to get the review off the ground while my build monster is churning through several builds in parallel. Here's some trivial stuff to warm up!
Attachment #607793 - Flags: review?(kyle)
Pretty mechanical stuff: add/change some consts according to ril.h v6. And, in some cases, the ril.h on Maguro/Akami. Which is slightly different. Kill me now.
Attachment #607795 - Flags: review?(kyle)
Attachment #607793 - Flags: review?(kyle) → review+
Comment on attachment 607795 [details] [diff] [review] Part 1 (v1): Introduce ril.h v6 consts Review of attachment 607795 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/system/gonk/RadioInterfaceLayer.js @@ +201,3 @@ > this.updateDataConnection(state); > > //TODO for simplicity's sake, for now we only look at Nit: space between // and TODO
Attachment #607795 - Flags: review?(kyle) → review+
This adds support for RIL v6 parcels, disabled for now. We need to figure out a runtime way of detecting the RIL version. I'd like to punt on that for now, at least in this patch, but possibly even this bug. To summarize this patch: * Several parcels have changed structure, so in some cases we now have readFoobar_v5 and readFoobar_v6. In other other cases, when the delta is small, it's an inline check. * Radio state and card state are handled differently now. The existing code is one of the oldest pieces in RIL that I wrote when I really didn't know much about what the state machine would look like. We have a better idea now. Also, RIL v6 handles radio state and card state separately, whereas v5 conflated the two ideas. So we have to work around that a little, basically deferring all things that depend on the card being ready to the actual REQUEST_GET_SIM_STATUS handler.
Attachment #607802 - Flags: review?(kyle)
Comment on attachment 607802 [details] [diff] [review] Part 2 (v1): Support RIL v6 parcels (off by default) Review of attachment 607802 [details] [diff] [review]: ----------------------------------------------------------------- ::: dom/system/gonk/ril_consts.js @@ +1215,5 @@ > +const DATACALL_FAIL_SIGNAL_LOST = -3; > +const DATACALL_FAIL_PREF_RADIO_TECH_CHANGED = -4; > +const DATACALL_FAIL_RADIO_POWER_OFF = -5; > +const DATACALL_FAIL_TETHERED_CALL_ACTIVE = -6; > +const DATACALL_FAIL_ERROR_UNSPECIFIED = 0xffff; Are these our consts? 'cause the sign bit on the unspecified error not being flipped seems weird. But if we're just copying, ignore me.
Attachment #607802 - Flags: review?(kyle) → review+
(In reply to Kyle Machulis [:kmachulis] [:qdot] from comment #8) > Comment on attachment 607802 [details] [diff] [review] > Part 2 (v1): Support RIL v6 parcels (off by default) > > Review of attachment 607802 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: dom/system/gonk/ril_consts.js > @@ +1215,5 @@ > > +const DATACALL_FAIL_SIGNAL_LOST = -3; > > +const DATACALL_FAIL_PREF_RADIO_TECH_CHANGED = -4; > > +const DATACALL_FAIL_RADIO_POWER_OFF = -5; > > +const DATACALL_FAIL_TETHERED_CALL_ACTIVE = -6; > > +const DATACALL_FAIL_ERROR_UNSPECIFIED = 0xffff; > > Are these our consts? 'cause the sign bit on the unspecified error not being > flipped seems weird. But if we're just copying, ignore me. Just copying from the RIL_DataCallFailCause struct in ril.h.
A few more missing constants and a typo fix.
Attachment #607795 - Attachment is obsolete: true
Attachment #609895 - Flags: review?(kyle)
There were some typos and incomplete implementations of the v6 parcels in the v1 patch. These are all fixed now and tested on the Nexus S + ICS gonk. We also auto-detect RIL v6 now.
Attachment #607802 - Attachment is obsolete: true
Attachment #609896 - Flags: review?(kyle)
Attachment #609895 - Flags: review?(kyle) → review+
Attachment #609896 - Flags: review?(kyle) → review+
Depends on: 740231
No longer depends on: 740231
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: