Project

General

Profile

Actions

Feature #1945

open

Evaluate more in depth the android_frameworks_opt_telephony_ril_ofono RIL

Added by Denis 'GNUtoo' Carikli over 4 years ago. Updated about 3 years ago.

Status:
New
Priority:
Normal
Assignee:
Category:
Telephony and mobile data
Target version:
Start date:
07/24/2019
Due date:
% Done:

0%

Estimated time:
Resolution:
Device:
Grant:
Type of work:
Any programming languages (scripts, C, etc)

Description

The android_frameworks_opt_telephony_ril_ofono looks interesting.

It could enable to use ofono on Android.


Files


Related issues

Related to Replicant - Feature #1813: Modem support for i9305NewWolfgang Wiedmeyer06/18/2017

Actions
Related to Replicant - Feature #1958: Note II LTE modem (ofono Java RIL)In ProgressJoey Hewitt

Actions
Actions #1

Updated by Denis 'GNUtoo' Carikli over 4 years ago

TODO:
  • Look if the BuildRilWrapper.java uses introspection to build the API between the Framework and android_frameworks_opt_telephony_ril_ofono (See the Official documentation for more background information) and evaluate how sustainable this is (how much maintenance would it need over time).
  • Test it on the Galaxy SIII 4G
Documentation:
Actions #2

Updated by Joey Hewitt over 4 years ago

I'm the author of this RIL. I added some detail to GNUtoo's graph, attached. (Sorry it's weird; I don't know graphviz.)

Since my repo is lacking in documentation, some notes:

Why Java?

I didn't want to deal with C or the rild <-> libril interface, so I implemented a Java RIL class that replaces the one that usually talks to rild. Android is directed to use my class by a build.prop.

BuildRilWrapper

BuildRilWrapper runs at build time, and autogenerates code to dispatch incoming method calls to the corresponding module (e.g. SmsModule.) Most methods are asynchronous and cannot run on the thread that received the method call, so a Runnable is posted to another thread that does the necessary work and then invokes the callback.

I find my way far more convenient than the Message junk, so I wonder if there is some performance reason (memory usage?) it isn't usually done this way. Or maybe it is just the legacy of starting over 10 years ago.

The target method is found by looking for a method amongst the modules with a matching signature (same argument types, except omitting the Message that is for the callback.)

Modules

Modules are methods grouped by functionality type, and correspond closely to oFono interfaces. When oFono notifies that a given interface has loaded/unloaded, we load/unload the corresponding module. When a module is not loaded and the framework requests something that is implemented in the module, BuildRilWrapper's generated code detects this condition and reports an error to the framework.

Actions #3

Updated by Kurtis Hanna over 4 years ago

A video presentation and the corresponding slides related to oFono in Replicant can be viewed here: https://redmine.replicant.us/projects/replicant/wiki/ContributorsMeetingJuly2019#Presentations

Actions #4

Updated by Kurtis Hanna over 4 years ago

Actions #5

Updated by Kurtis Hanna over 4 years ago

Here's a program that does baseband diagnostics via USB that might come in handy: https://github.com/fgsect/scat

Actions #6

Updated by Kurtis Hanna over 4 years ago

xc-racer99 has been working on an oFono driver for Samsung-IPC: https://github.com/PabloPL/linux/issues/23#issuecomment-531039814

They wonder if we have plans to upstream the Samsung IPC driver.

Actions #7

Updated by Kurtis Hanna over 4 years ago

Joey reported on IRC that initial SMS tests were successful and voice calls had partial success on Note 2 LTE with his RIL.

Actions #8

Updated by Kurtis Hanna over 4 years ago

  • Related to Feature #1958: Note II LTE modem (ofono Java RIL) added
Actions #9

Updated by _I3^ RELATIVISM about 3 years ago

  • Type of work Any programming languages (scripts, C, etc) added
Actions

Also available in: Atom PDF