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:
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.