[Galaxy S II Q&A, Help & Troubleshooting] PaulKocialkowski:
I am the Replicant developer who worked on Nexus S port and also did the work on aries (galaxy s, galaxy tab) devices and wrote a big part of the free RIL.

Replicant is a fully free Android derivate running on some devices (mostly Google phones).

If you have any question regarding samsung modems in Android phones, i'd be happy to answer them!

I'll attach the mail I sent back to E:V:A next

---------- Post added at 08:27 PM ---------- Previous post was at 08:22 PM ----------

Modems on Android devices is a wide domain.

Phones differ on many things, like:

* modem chipset

* modem firmware

* transport modem <-> AP

* modem protocol

* user-space integration (Android RIL)

First thing is the modem chipset. There are quite a few. For instance on

HTC phones, you'll have the ones included in the MSM or QSD SoCs (which

is quite unusual, modems aren't often part of the SoC) IIRC.

On other devices, it'll be a separate chip connected to the SoC via

various transport methods.

I know better the case of recent Samsung phones, like Nexus S, Galaxy S,

Galaxy Tab (first gen), Galaxy S2, etc.

There, you have the modem, usually an intel x-gold 6xx, that is wired to

the SoC. So transport is done via serial line and/or some dedicated RAM

memory (not from the main sticks).

Even though a phone can have the same modem wired (at hardware level)

the same way, the kernel drivers can be different. That's the case of

nexus s and galaxy s. On the first one, modem Rx/Tx with AP is done via

ioctls while on galaxy s it's done via a PHONET network interface

(svnet0). SO it's not (and particularly on Samsung phones) only a serial

interface you can open with screen: you need to understand how it's done

and write dedicated software to reproduce this (cf. the code on

libsamsung-ipc/devices/ that is device-specific).

So once you have transport set up, you need to know about the protocol

the modem speaks. This depends on the firmware the modem is running.

I know that the modem used in Nexus S is also used in some iPhone (4G

IIRC) but it has a different firmware and so speaks a different

protocol. I suspect it to be AT on the iPhone while Nexus S speaks a

samsung-specific modem protocol. They invented that protocol and

rewritten the modem firmware to use it instead of AT or anything else.

This protocol is usually called "Samsung IPC Protocol" and we have a

free implementation of it in libsamsung-ipc and samsung-ril.

On the Nokia N900, transport is also a PHONET socket and the protocol is

neither AT nor Samsung IPC but some protocol made by nokia and

implemented in ofono.

So you have exemples of different transport methods and modem protocols.

I could give you more exemples.

Of course, on Android, you need to have the user-space programs (the RIL

mainly) to match both the transport scheme and the modem protocol to

have anything working.

> Please have a look at our XDA-forum thread:

>

> "How to talk to the Modem with AT commands":

> http://xdaforums.com/showthread.php?t=1471241

Apparently you were able to contact the modem with some AT commands.

Either the modem has an AT mode that can run along with IPC (would

surprise me, but why not), but it may very well be uncompleted and is

anyway not used at all in official binaries, either this is Android

emulating and AT device while sending back stuff from and to the RIL,

either this is not the modem.

Anyway I can tell you for sure that this is absolutely not the way to

talk to the modem properly. The correct way is to use the IPC protocol

and appropriate transport handling (which is way more complex than only

opening a serial line).

I just started the work on galaxy s2, I'll soon have done the transport

layer and we already know the protocol.