1

I'm doing some work on RIL, and I am a little confused about RIL_REQUEST_SETUP_DATA_CALL and RIL_REQUEST_SET_INITIAL_ATTACH_APN requests.

I know that if we change the APN setting, the request RIL_REQUEST_SET_INITIAL_ATTACH_APN will be dispatched immediately. And I think that only "setting->APN" can configure APN setting by a user. And there is only one APN for a mobile(regardless mms APN). Then if I setup a data call the APN should be this one.

So does anyone knows that Why the param of RIL_REQUEST_SETUP_DATA_CALL request contains APN? I think is useless and it should be the same APN in RIL_REQUEST_SET_INITIAL_ATTACH_APN request. Thanks!

The following is comments of param for RIL_REQUEST_SETUP_DATA_CALL.

 * "data" is a const char **
 * ((const char **)data)[0] Radio technology to use
 * ((const char **)data)[1] is a RIL_DataProfile
 * ((const char **)data)[2] is the APN to connect
 * ((const char **)data)[3] is the username for APN, or NULL
 * ((const char **)data)[4] is the password for APN, or NULL
 * ((const char **)data)[5] is the PAP / CHAP auth type. Values:
WinnieZ
  • 35
  • 1
  • 5
  • I am no expert of the RIL part but from modem point of view it is a difference between attaching to a network and activating a data call. For LTE you need an APN because you get an initial PDN connection immediately. Additionally you can establish data calls to other APNs. You probably have one APN for browsing the internet and another APN for doing an IMS/VoLTE call. Therefore I assume that the 2 requests map to these different scenarious of attaching vs. establish additional PDN. – Gerhardh Dec 15 '16 at 11:44
  • Thanks for answering, but I think in android there is only one way to set APN, so that i consider the default bearer and data call should using the same APN. Did I missed something? – WinnieZ Dec 16 '16 at 01:41

2 Answers2

1

The APN received in RIL_REQUEST_SET_INITIAL_ATTACH_APN is for the activating the default bearer in LTE. If the default bearer is not established, you can not be registered on an LTE network. There are operators in the world which have different APNs for MMS and Android has to cater that. Have a look at this list: http://www.hw-group.com/products/HWg-Ares/HWg-Ares_GSM_APN_en.html.

Furthermore, the RIL_REQUEST_SETUP_DATA_CALL can establish the data call either on the default bearer or another PDP context. Some network allow you to route your data services through the default bearer but some do not.

Bilal Qamar
  • 322
  • 1
  • 2
  • 9
0

RIL_REQUEST_SETUP_DATA_CALL need a apn context, it can access to network cause to the apn. RIL_REQUEST_SET_INITIAL_ATTACH_APN is activating the default bearer.