Project

General

Profile

RIL implementation question

Added by marco brocanelli almost 3 years ago

Hi,
I am trying to better understand how the radio interface layer in android works. In particular, I would like to understand better how the thread of readerLoop() runs (which reads commands from the baseband). Is readerLoop triggered to run only in occasion of new incoming data or it always run to even when there is no data to read?

Thanks a lot for your hard work on Replicant!


Replies (3)

RE: RIL implementation question - Added by Paul Kocialkowski almost 3 years ago

I think you are talking about the AT reference RIL, which has a very bad design and is not used at all in Replicant. Samsung devices in Replicant use Samsung-RIL, that handles the Samsung IPC protocol (as defined in libsamsung-ipc).

From what I can see, readerLoop is an infinite loop, which calls readline, which itself calls open, that is probably blocking on the modem serial port device node.
You can figure out all the glory details of this by reading the source code!

RE: RIL implementation question - Added by marco brocanelli almost 3 years ago

Thanks for the info!
I went trough the code and I am trying to understand if my conclusions are right or not. I only wanted to confirm that the readerLoop is polling based rather than interrupt based. I will go trough the Samsung-RIL though. :)

Thanks a lot for any info!

RE: RIL implementation question - Added by Gu W 4 months ago

Paul Kocialkowski wrote:

I think you are talking about the AT reference RIL, which has a very bad design and is not used at all in Replicant. Samsung devices in Replicant use Samsung-RIL, that handles the Samsung IPC protocol (as defined in libsamsung-ipc).

Why do you think that it has very bad design?
When writing a new RIL for a non-Samsung device, do you think it would be a better idea to base it on Samsung-RIL instead of the reference RIL, like it is recommended in the old Android RIL documentation?

Android provides a reference Vendor RIL, using the Hayes AT command set, that you can use as a quick start for telephony testing and a guide for commercial vendor RILs.

From https://web.archive.org/web/20131014055623/http://www.kandroid.org/online-pdk/guide/telephony.html?

    (1-3/3)