TPE TelephonyPlatform team/TechDiscussion/New mock-gonk for RIL

From MozillaWiki
Jump to: navigation, search

Discussion: 2015-04-21

  • Is this change helpful and sensible?
Yes, we think so. Defining a clear interface b/w gecko RIL and vendor gonk sounds interesting. The major benefit the team could get is that that interface makes simulator implementation easier. The team doesn't encounter serious problems with Android version porting due to the advantage of AOSP ril.h; however, that clear interface will definitely helps that we build a h/w-independent FxOS, not only Android-based.
  • Possible Solution
    • Move gonk code into rilproxy out of gecko ril_worker.js & Define implicit interfaces b/w rilproxy and ril_worker.js
    • gonk code includes: Android parcel coding & decoding, vendor difference abstraction, ... etc
    • rilproxy has its own repository.
    • rilproxy implementation varies with devices. For example, for Android-based devices, rilproxy will need to talk to rild per AOSP ril.h; for other types, rilproxy might directly communicate with modem via AT commands. For Simulator, we do mock stuff in rilproxy.
    • NOTE: this is not the layer CAF RIL ports to. CAF RIL relies on a higher layer. But this is a lower layer to serve hardwares and helps mozRIL porting on different android vendors.
  • Following Steps & Action Items
    1. Clean up ril_worker.js
      1. Split encoding/decoding and logical parts, then move coding part into rilproxy
      2. Bug 831637 - B2G RIL: Each parcel request must has a callback (this helps distinguish coding and logical parts)
    2. Study how to code/decode ril parcels in rilproxy with c++ implementation
    3. Study JsonSocket - send JSON over TCP using sockets (have communication b/w ril_worker.js and rilproxy with ease)
    4. No ideas yet: dynamic control