Hi Shahbaz,

Normally the telephony setup in Android works like this:

Android telephony fwk <-> Android RILD + vendor RIL library (ie. libreference-ril.so) <- AT commands over some link -> Modem stack

When you wish to setup a mobile data connection, it is handled through the vendor RIL library, which then takes care of setting up the underlying modem stack (establishing PDP context & setting up data channel via PPP or some other media). The RIL vendor library (perhaps a derivative of librefence-ril.so) must then answer appropriately to upper layers.

If you have a look inside the reference-ril.c in the function requestSetupDataCall() you do in fact have an example of an implementation using an interface different from ppp (theirs is called rmnet). I have not analyzed the code in full detail, but the approach is simple (and basically the same we do with the PPP solution):

* Send some AT-commands to the modem to setup the PDP context
* Get the network device up (rmnet)
* Reply to upper layers

As far as I can see this impementation is legacy now, since they do not format the reply properly. But if you have a peek at /hardware/ril/include/telephony/ril.h you can see the definition of the return data for RIL_REQUEST_SETUP_DATA_CALL:

 * "response" is a char **
* ((char **)response)[0] indicating PDP CID, which is generated by RIL. This Connection ID is
 *                          used in GSM/UMTS and CDMA
* ((char **)response)[1] indicating the network interface name for GSM/UMTS or CDMA * ((char **)response)[2] indicating the IP address for this interface for GSM/UMTS
 *                          and NULL for CDMA


If you fill this return data properly (ie. "PDP context ID number", "yournetdevicename", "ip-address"), I think it will work.

So basically what you have to do is to make your own derivative of reference-ril.c and step-by-step implement the functionality dictated by ril.h - simple :-)

So how far have you gone down that path? It is not entirely clear to me if you did your own RIL implementation. If you didn't, this is the way to go now...

Good luck!

--
Henrik Uhrenfeldt
Chief Software Engineer
Ixonos Denmark ApS
Niels Jernes Vej 10,
DK-9220 Aalborg Ø, Denmark
mobile +45 4030 2607
email: henrik.uhrenfe...@ixonos.com
http://www.ixonos.com




On 11/24/2010 10:42 AM, mshahbazansari wrote:
Hi all,

Hope you are doing fine. I wanted to get some of you guys help here. I
have telephony stack which is in software and I am bringing it up with
Android Froyo. The setup is that I run Android on a Linux machine and
also the telephony stack on the same machine. Android RIL is
communicating to the telephony stack for AT commands on a socket-
interface between Android and the telephony stack. I have brought up
the telephony stack and a PDP context is also established. Telephony
stack is attached to a Network and we can feed IP packets to the
telephony stack now. Telephony stack provides me an IP interface and I
need Android to forward packets to the IP interface of telephony
stack. How can I setup android to send/receive IP packets to/from IP
interface of the telephony stack so that I can browse internet traffic
on Android browser. I have read all

http://groups.google.com/group/android-porting/browse_thread/thread/b72d1dd74de367de/9f1b194c3cf46a4c?lnk=gst&q=Data+connection+via+cell+modem+(GPRS)#9f1b194c3cf46a4c

and see that it's for modem devices and a PPP link is used but for my
scenario how should I do this? I will appreciate your kind feedback.

Warm Regards,
Shahbaz



--
Henrik Uhrenfeldt
Chief Software Engineer
Ixonos Denmark ApS
Niels Jernes Vej 10,
DK-9220 Aalborg Ø, Denmark
mobile +45 4030 2607
email: henrik.uhrenfe...@ixonos.com
http://www.ixonos.com


--
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to