Project

General

Profile

Actions

Samsung-ipc

Protocol

Many smartphones and tablets made by Samsung uses the samsung-ipc.

At least the following devices use that protocol:
  • Galaxy S II (GT-I9100)
  • Galaxy S III (GT-I9300)
  • Galaxy Note (GT-N7000)
  • Galaxy Note II (GT-N7100)
  • Galaxy Nexus (GT-I9250)
  • Galaxy Tab 2 7.0 GSM (GT-P3100)
  • Galaxy Tab 2 10.1 GSM (GT-P5100)
  • Galaxy Note 8.0 GSM (GT-N5100)
But some are known to use a different protocol like:
  • Galaxy S III 4G (GT-I9305)
  • Galaxy Note II 4G (GT-N7105)

Replicant implementation

The free software implementation is very flexible.

The protocol and most of the logic is implemented in libsamsung-ipc, which enables to reuse it for other operating system (like GNU/Linux) or with different software stack.

In Android, hardware abstraction is not done by the Linux kernel. Instead applications are developed against the Android framework which uses hardware abstraction daemons to do the hardware abstraction.

This way kernel device manufacturers can completely break the kernel interfaces standards to improve time to market.

For the modem the daemon that does the modem protocol abstraction is rild. The rild daemon typically opens a library implementing the modem protocol.

In order to make the design modular, the library opened by the rild daemon is not libsamsung-ipc, but libsamsung-ril which is in charge of creating implementing the interface between Android's rild and libsamsung-ipc.

So we have: rild <-> libsamsung-ril <-> libsamsung-ipc <-> Linux kernel (currently based on Samsung's modified Linux kernels that are specific to a very small number of devices).

Flexibility

Having the modem protocol implemented in libsamsung-ipc enables to reuse it in very different software architectures. For instance there have been patches to use it with ofono.

See Modem-support in the Upstream wiki pages for different ways of reusing libsamsung-ipc.

How easily to contribute to libsamsung-ipc or libsamsung-ril

In the Replicant contributors meetings of July 2019, several presentations were done on Replicant's Samsung-ipc implementation.

They can be found in the Presentations section of the Replicant contributors meetings of July 2019 page:
  • Replicant and modems: introduction
  • Replicant and modems: Samsung IPC

The two presentations explain how the code architecture simply by following what happen in the actual code.

The first presentation starts with a protocol that is much more simple and well known, the the second ones dives into the Replicant Samsung-IPC implementation by following what happens for some of its messages.

So it's a good idea to look at them if you intend to contribute to libsamsung-ipc or libsamsung-ril and that you are not used to dive deep into huge piles of unknown code.

Rebases

Repository path date Tag for the old history Changes Rationale
hardware/ril/samsung-ril 24 July 2019 replicant-6.0-0003 Pointed replicant-6.0 to master * See the libsamsung-ril/libsamsung-ipc: delete or sync master branch? Was: [PATCH 6/6] Fix undefined references to MD5_{Init, Update, Final} thread
* This also has been made to prevent similar mistakes from hapening again
external/libsamsung-ipc 24 July 2019 replicant-6.0-0003 Pointed replicant-6.0 to master * See the libsamsung-ril/libsamsung-ipc: delete or sync master branch? Was: [PATCH 6/6] Fix undefined references to MD5_{Init, Update, Final} thread
* This also has been made to prevent similar mistakes from hapening again

Updated by Denis 'GNUtoo' Carikli 10 months ago · 10 revisions