[Bugfix][T106][task-view-794]add initial apn set/get interface

Only Configure: Yes
Affected branch: master
Affected module: data,network
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: No

Change-Id: Ib6df2f6cb0206deec6f634129b8f8ce532769fc5
diff --git a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/commands.h b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/commands.h
index a4a872a..c5c5542 100755
--- a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/commands.h
+++ b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/commands.h
@@ -56,6 +56,11 @@
     {"RIL_REQUEST_DEACTIVATE_DATA_CALL",deactivateDataCall, "deactive data call", RIL_REQUEST_DEACTIVATE_DATA_CALL},
     {"RIL_REQUEST_SET_INITIAL_ATTACH_APN",setInitialAttachApnargc, "intial attach apn", RIL_REQUEST_SET_INITIAL_ATTACH_APN},
     {"RIL_REQUEST_DATA_CALL_LIST",getDataCallList,"get data call list",RIL_REQUEST_DATA_CALL_LIST},
+    //LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_START
+    #ifdef MOBILETEK_TARGET_PLATFORM_T106
+    {"RIL_REQUEST_APN_LIST",getApnList,"get apn list",RIL_REQUEST_APN_LIST},
+    #endif
+    //LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_END
     {"RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE",getLastDataCallFailCause, "last data fail cause" ,RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE},
     {"RIL_REQUEST_SET_DATA_PROFILE",setDataProfile, "set data profile", RIL_REQUEST_SET_DATA_PROFILE},
     {"RIL_REQUEST_SYNC_DATA_SETTINGS_TO_MD",syncDataSettingsToMd, "sync data settings to modem", RIL_REQUEST_SYNC_DATA_SETTINGS_TO_MD},
diff --git a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/data/data.cpp b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/data/data.cpp
index 4e79af6..c6f39fd 100755
--- a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/data/data.cpp
+++ b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/data/data.cpp
@@ -1493,13 +1493,13 @@
     }
     char* username = checkParameters(argv[4]);
     char* password = checkParameters(argv[5]);
+    RLOGD("setInitialAttachApnargc: apn=%s, protocol=%s, authtype=%d, username=%s, password=%s", apn, protocol, authType, username, password);
     writeStringToParcel(p,apn); //apn
     writeStringToParcel(p,protocol); //protocol
     p.writeInt32(authType);  //authType
     writeStringToParcel(p,username);//username
     writeStringToParcel(p,password);//password
     p.setDataPosition(pos);
-
     pRI->pCI->dispatchFunction(p, pRI);
     return 0;
 }
@@ -1517,7 +1517,23 @@
     pRI->pCI->dispatchFunction(p, pRI);
     return 0;
 }
+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_START
+#ifdef MOBILETEK_TARGET_PLATFORM_T106
+int getApnList(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI)
+{
+    if(argc != 1)
+    {
+        free(pRI);
+        RLOGE("the peremeters numbers isn't right , so return");
+        return -1;
+    }
 
+    android::Parcel p;
+    pRI->pCI->dispatchFunction(p, pRI);
+    return 0;
+}
+#endif
+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_END
 int getLastDataCallFailCause(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI)
 {
     if(argc != 1)
diff --git a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/data/data.h b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/data/data.h
index 25c8e89..49793fd 100755
--- a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/data/data.h
+++ b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/data/data.h
@@ -52,6 +52,11 @@
 void updateRILDataCallResponsev11(int num ,RIL_Data_Call_Response_v11* p_cur);
 //xf.il@20230610 modify for T106 data end
 int getDataCallList(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_START
+#ifdef MOBILETEK_TARGET_PLATFORM_T106
+int getApnList(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
+#endif
+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_END
 int getLastDataCallFailCause(int argc, char **argv, RIL_SOCKET_ID socket_id, RequestInfo *pRI);
 #ifdef MOBILETEK_TARGET_PLATFORM_T106
 void handleUnsolDataCalllistChange(int num ,RIL_Data_Call_Response_v11* p_cur);
diff --git a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/mtk_ril_commands.h b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/mtk_ril_commands.h
index 2d17ee3..715a6ad 100755
--- a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/mtk_ril_commands.h
+++ b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/mtk_ril_commands.h
@@ -82,6 +82,12 @@
 { RIL_REQUEST_QUERY_ICCID, dispatchVoid, responseString},
 { RIL_REQUEST_GET_MSISDN, dispatchVoid, responseString},
 { RIL_REQUEST_RESET_SIMCARD, dispatchVoid, responseVoid},
+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_START
+//Data
+#ifdef MOBILETEK_TARGET_PLATFORM_T106
+{RIL_REQUEST_APN_LIST, dispatchVoid, responseApnList},
+#endif
+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_END
 //Keepalive
 #ifdef KEEP_ALIVE
 { RIL_REQUEST_START_KEEPALIVE_PRO,dispatchStartKeepalivePro,responseInts},
diff --git a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/ril.cpp b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/ril.cpp
index 90d3409..35d4268 100755
--- a/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/ril.cpp
+++ b/cap/zx297520v3/src/lynq/framework/lynq-ril-service/src/ril.cpp
@@ -321,6 +321,11 @@
 static int responseSIM_IO(Parcel &p, void *response, size_t responselen);
 static int responseCallForwards(Parcel &p, void *response, size_t responselen);
 static int responseDataCallList(Parcel &p, void *response, size_t responselen);
+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_START
+#ifdef MOBILETEK_TARGET_PLATFORM_T106
+static int responseApnList(Parcel &p, void *response, size_t responselen);
+#endif
+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_END
 static int responseSetupDataCall(Parcel &p, void *response, size_t responselen);
 static int responseRaw(Parcel &p, void *response, size_t responselen);
 static int responseSsn(Parcel &p, void *response, size_t responselen);
@@ -2470,8 +2475,64 @@
 
     return 0;
 }
+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_START
+#ifdef MOBILETEK_TARGET_PLATFORM_T106
+static int responseApnList(Parcel &p, void *response, size_t responselen)
+{
+    RLOGD("responseApnList: responselen = %d, sizeof(RIL_Apn_List_Response) = %d\n", responselen, sizeof(RIL_Apn_List_Response));
+    if (response == NULL && responselen != 0) {
+        RLOGE("invalid response: NULL");
+        return RIL_ERRNO_INVALID_RESPONSE;
+    }
 
+    if (responselen % sizeof(RIL_Apn_List_Response) != 0) {
+        RLOGE("invalid response length %d expected multiple of %d",
+                (int)responselen, (int)sizeof(RIL_Apn_List_Response));
+        return RIL_ERRNO_INVALID_RESPONSE;
+    }
 
+    int num = responselen / sizeof(RIL_Apn_List_Response);
+    p.writeInt32(num);
+    RIL_Apn_List_Response *p_cur = (RIL_Apn_List_Response *) response;
+
+    startResponse;
+    int i;
+    for(i = 0; i < num; i++)
+    {
+        if(p_cur[i].pdp_type == NULL || p_cur[i].apn == NULL || p_cur[i].pdp_addr == NULL)
+        {
+            RLOGE("invalid response: NULL");
+            return RIL_ERRNO_INVALID_RESPONSE;
+        }
+        RLOGI("LYNQ:[cid=%d,%s,%s,%s,%d,%d,%d,%d,%d,%d]",
+        p_cur[i].cid,
+        (char*)p_cur[i].pdp_type,
+        (char*)p_cur[i].apn,
+        (char*)p_cur[i].pdp_addr,
+        p_cur[i].d_comp,
+        p_cur[i].h_comp,
+        p_cur[i].IPv4AddrAlloc,
+        p_cur[i].Emergency_Indication,
+        p_cur[i].P_CSCF_discovery,
+        p_cur[i].IM_CN_Signalling_Flag_Ind);
+
+        p.writeInt32(p_cur[i].cid);
+        writeStringToParcel(p, p_cur[i].pdp_type);
+        writeStringToParcel(p, p_cur[i].apn);
+        writeStringToParcel(p, p_cur[i].pdp_addr);
+        p.writeInt32(p_cur[i].d_comp);
+        p.writeInt32(p_cur[i].h_comp);
+        p.writeInt32(p_cur[i].IPv4AddrAlloc);
+        p.writeInt32(p_cur[i].Emergency_Indication);
+        p.writeInt32(p_cur[i].P_CSCF_discovery);
+        p.writeInt32(p_cur[i].IM_CN_Signalling_Flag_Ind);
+    }
+    removeLastChar;
+    closeResponse;
+    return 0;
+}
+#endif
+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_END
 static int responseDataCallList(Parcel &p, void *response, size_t responselen)
 {
 //xf.il@20230610 modify for T106 data start
@@ -5145,6 +5206,9 @@
         case RIL_REQUEST_QUERY_CLIP: return "RIL_REQUEST_QUERY_CLIP";
         case RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE: return "RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE";
         case RIL_REQUEST_DATA_CALL_LIST: return "RIL_REQUEST_DATA_CALL_LIST";
+        #ifdef MOBILETEK_TARGET_PLATFORM_T106
+        case RIL_REQUEST_APN_LIST: return "RIL_REQUEST_APN_LIST";//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221
+        #endif
         case RIL_REQUEST_RESET_RADIO: return "RIL_REQUEST_RESET_RADIO";
         case RIL_REQUEST_OEM_HOOK_RAW: return "RIL_REQUEST_OEM_HOOK_RAW";
         case RIL_REQUEST_OEM_HOOK_STRINGS: return "RIL_REQUEST_OEM_HOOK_STRINGS";
@@ -5620,6 +5684,7 @@
         case RIL_REQUEST_RESET_SIMCARD: return "RESET SIMCARD";
 #ifdef MOBILETEK_TARGET_PLATFORM_T106 
         case RIL_UNSOL_AUDIO_DEV_SAMPLERATE: return "UNSOL_AUDIO_DEV_SAMPLERATE";
+        case RIL_REQUEST_APN_LIST: return "APN_LIST";//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221
 #endif
         /*warren add for t800 ril service 2022/1/22 end*/
         default: return "<unknown request>";
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-data/include/libdata/lynq_data.h b/cap/zx297520v3/src/lynq/lib/liblynq-data/include/libdata/lynq_data.h
index 42fa806..7f8b0f1 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-data/include/libdata/lynq_data.h
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-data/include/libdata/lynq_data.h
@@ -55,6 +55,23 @@
                                    sent an invalid value */
 } lynq_data_call_response_v11_t;
 
+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_START
+#ifdef MOBILETEK_TARGET_PLATFORM_T106
+typedef struct {
+    int cid;
+    char pdp_type[LYNQ_PDP_TYPE_MAX_LEN];
+    char apn[LYNQ_APN_MAX_LEN];
+    char pdp_addr[LYNQ_PDP_ADDR_MAX_LEN];
+    int d_comp;
+    int h_comp;
+    int IPv4AddrAlloc;
+    int Emergency_Indication;
+    int P_CSCF_discovery;
+    int IM_CN_Signalling_Flag_Ind;
+} lynq_apn_list_response;
+#endif
+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_END
+
 typedef struct
 {
     int index;
@@ -76,6 +93,10 @@
 int lynq_reset_apn(char *result);
 int lynq_get_apn_table(int *size,lynq_apn_info **list);
 void lynq_release_wait_data_call();
+#ifdef MOBILETEK_TARGET_PLATFORM_T106
+int lynq_init_attach_apn(char *apn,char *pdpType,char *user,char *password,char *authType);
+int lynq_get_apn_list(int cid,lynq_apn_list_response *apnList);
+#endif
 
 #ifdef __cplusplus
 }
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-data/lynq_data.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-data/lynq_data.cpp
index ba6b9b7..3d531a4 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-data/lynq_data.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-data/lynq_data.cpp
@@ -1589,7 +1589,218 @@
 
     return 0;
 }
+#ifdef MOBILETEK_TARGET_PLATFORM_T106
+int getApnLists(lynq_apn_list_response apnList[LYNQ_APN_CHANNEL_MAX],int *realNum)
+{
+    Parcel *p = NULL;
+    lynq_client_t client;
+    int resp_type = -1;
+    int token;
+    int request = -1;    
+    int slot_id = -1;
+    int error = -1;
+    int version =0;
+    int num = 0;
+    char *temp_char = NULL;
 
+    if(apnList==NULL)
+    {
+        LYERRLOG("apnList is null!!!");
+        return -1;
+    }
+
+    client.uToken = get_utoken();
+    client.request = 4002;//RIL_REQUEST_APN_LIST
+    client.paramLen = 0;
+    bzero(client.param,LYNQ_REQUEST_PARAM_BUF);
+    LYINFLOG("uToken=%d,request=%d,paralen=%d,param=%s",client.uToken,client.request,client.paramLen,client.param);
+    pthread_mutex_lock(&g_lynq_data_sendto_mutex);
+    if(send_request(lynq_client_sockfd,&client)==-1)
+    {
+        LYERRLOG("send request fail");
+        perror("[LYNQ_DATA] send request fail:");
+        pthread_mutex_unlock(&g_lynq_data_sendto_mutex);
+        return -1;
+    }
+    //get_response(lynq_client_sockfd,p);
+    error = wait_response(lynq_client_sockfd,p,client.uToken,g_wait_time);
+    if(error!=0)
+    {
+        LYERRLOG("wait_response fail,ret:%d",error);
+        pthread_mutex_unlock(&g_lynq_data_sendto_mutex);
+        return error;
+    }
+    pthread_mutex_unlock(&g_lynq_data_sendto_mutex);
+    if(JumpHeader(p,&resp_type,&client.uToken,&request,&slot_id,&error)!=0)
+    {
+        LYERRLOG("JumpHeader fail");
+        free_parcel(p);
+        return -1;
+    }
+    LYINFLOG("resp_type=%d,uToken=%d,request=%d,slot_id=%d,error_code=%d",resp_type,client.uToken,request,slot_id,error);
+    p->readInt32(&num);
+    *realNum = num;
+    for (int i = 0; i < num; i++)
+    {
+        p->readInt32(&apnList[i].cid);
+        temp_char = strdupReadString_p(p);
+        LYINFLOG("[%s][%d]%s",__FUNCTION__,__LINE__,temp_char);
+        if(temp_char)
+        {
+            memcpy(apnList[i].pdp_type,temp_char,strlen(temp_char)+1);
+            free(temp_char);
+        }
+        temp_char = strdupReadString_p(p);
+        LYINFLOG("[%s][%d]%s",__FUNCTION__,__LINE__,temp_char);
+        if(temp_char)
+        {
+            memcpy(apnList[i].apn,temp_char,strlen(temp_char)+1);
+            free(temp_char);
+        }
+        temp_char = strdupReadString_p(p);
+        LYINFLOG("[%s][%d]%s",__FUNCTION__,__LINE__,temp_char);
+        if(temp_char)
+        {
+            memcpy(apnList[i].pdp_addr,temp_char,strlen(temp_char)+1);
+            free(temp_char);
+        }
+        p->readInt32(&apnList[i].d_comp);
+        p->readInt32(&apnList[i].h_comp);
+        p->readInt32(&apnList[i].IPv4AddrAlloc);
+        p->readInt32(&apnList[i].Emergency_Indication);
+        p->readInt32(&apnList[i].P_CSCF_discovery);
+        p->readInt32(&apnList[i].IM_CN_Signalling_Flag_Ind);
+    }
+        
+    free_parcel(p);
+    return error;
+}
+int lynq_get_apn_list(int cid, lynq_apn_list_response *apnList)
+{
+    lynq_apn_list_response interApnList[LYNQ_APN_CHANNEL_MAX]={};
+    int number = 0;
+    int error = -1;
+
+    if (g_lynq_data_init_flag == 0)
+    {
+        LYERRLOG("[%s][%d]Invalid operation, need init",__FUNCTION__,__LINE__);
+        return -1;
+    }
+    if((cid < 0 || cid > LYNQ_APN_CHANNEL_MAX) || (apnList==NULL))
+    {
+        LYERRLOG("cid out of range or apnList is null!!!");
+        return -1;
+    }
+    memset(&interApnList,0,sizeof(interApnList));
+    error = getApnLists(interApnList, &number);
+    if(error == 0)
+    {
+        for(int i = 0;i < number;i++)
+        {
+            if(interApnList[i].cid == cid)
+            {
+                apnList->cid = interApnList[i].cid;
+                memcpy(apnList->pdp_type,interApnList[i].pdp_type,sizeof(interApnList[i].pdp_type));
+                memcpy(apnList->apn,interApnList[i].apn,sizeof(interApnList[i].apn));
+                memcpy(apnList->pdp_addr,interApnList[i].pdp_addr,sizeof(interApnList[i].pdp_addr));
+                apnList->d_comp = interApnList[i].d_comp;
+                apnList->h_comp = interApnList[i].h_comp;
+                apnList->IPv4AddrAlloc = interApnList[i].IPv4AddrAlloc;
+                apnList->Emergency_Indication = interApnList[i].Emergency_Indication;
+                apnList->P_CSCF_discovery = interApnList[i].P_CSCF_discovery;
+                apnList->IM_CN_Signalling_Flag_Ind = interApnList[i].IM_CN_Signalling_Flag_Ind;
+                LYINFLOG("[lynq_get_apn_list]:cid=%d, pdp_type=%s, apn=%s, pdp_addr=%s, d_comp=%d, h_comp=%d, IPv4AddrAlloc=%d, Emergency_Indication=%d, P_CSCF_discovery=%d, IM_CN_Signalling_Flag_Ind=%d\n",
+                    apnList->cid, apnList->pdp_type, apnList->apn, apnList->pdp_addr, apnList->d_comp, apnList->h_comp, apnList->IPv4AddrAlloc, apnList->Emergency_Indication,
+                    apnList->P_CSCF_discovery, apnList->IM_CN_Signalling_Flag_Ind);
+                
+            }
+        }
+    }
+    return error;
+}
+//xf.li@20241221 add start
+int lynq_init_attach_apn(char *apn,char *pdpType,char *authType,char *user,char *password)
+{
+    Parcel *p = NULL;
+    lynq_client_t client;
+    int resp_type = -1;
+    int request = -1;
+    int error = -1;
+    int slot_id = -1;
+    char *argv[10] = {};
+    int utoken = -1;
+
+    char *tmp_msg = NULL;
+    int len = 0;
+
+    LYINFLOG("[%s][%d]",__FUNCTION__,__LINE__);
+    if(user == NULL || strcmp(user, "NULL") == 0 || strlen(user) == 0)
+    {
+        argv[1] = NULL;
+    }
+    else
+    {
+        argv[1] = user;
+    }
+
+    if(password == NULL || strcmp(password, "NULL") == 0 || strlen(password) == 0)
+    {
+        argv[2] = NULL;
+    }
+    else
+    {
+        argv[2] = password;
+    }
+
+    if(authType == NULL || strcmp(authType, "NULL") == 0 || strlen(authType) == 0)
+    {
+        argv[3] = NULL;
+    }
+    else
+    {
+        argv[3] = authType;
+    }
+    if(pdpType==NULL || strlen(pdpType) == 0)
+    {
+        argv[4] = "IP";
+    }
+    else
+    {
+        argv[4] = pdpType;
+    }
+
+    client.uToken = get_utoken();
+    client.request = 111;//RIL_REQUEST_SET_INITIAL_ATTACH_APN
+    client.paramLen = 5;
+    bzero(client.param,LYNQ_REQUEST_PARAM_BUF);
+    sprintf(client.param,"%s %s %s %s %s",apn,argv[4],argv[3],argv[1],argv[2]);
+    LYINFLOG("uToken=%d,request=%d,paralen=%d,param=%s",client.uToken,client.request,client.paramLen,client.param);
+
+    pthread_mutex_lock(&g_lynq_data_sendto_mutex);
+ 
+    if(send_request(lynq_client_sockfd,&client)==-1)
+    {
+        LYERRLOG("send request fail");
+        perror("[LYNQ_DATA] send request fail:");
+        pthread_mutex_unlock(&g_lynq_data_sendto_mutex);
+        return -1;
+    }
+
+    //get_response(lynq_client_sockfd,p);
+    error = wait_response(lynq_client_sockfd,p,client.uToken,50);
+    if(error!=0)
+    {
+        LYERRLOG("wait_response fail,ret:%d",error);
+        pthread_mutex_unlock(&g_lynq_data_sendto_mutex);
+        return error;
+    }
+    pthread_mutex_unlock(&g_lynq_data_sendto_mutex);
+    JumpHeader(p,&resp_type,&client.uToken,&request,&slot_id,&error);
+    LYINFLOG("resp_type=%d,uToken=%d,request=%d,slot_id=%d,error_code=%d",resp_type,client.uToken,request,slot_id,error);
+    free_parcel(p);
+}
+#endif
+//xf.li@20241221 add end
 int lynq_setup_data_call_sp_t106(int *handle,char *apn,char *apnType,char *user,char *password,char *authType,char *normalProtocol,char *roamingProtocol)
 {
     Parcel *p = NULL;
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/include/lynq-qser-data.h b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/include/lynq-qser-data.h
index 33b3504..e7850ce 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/include/lynq-qser-data.h
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/include/lynq-qser-data.h
@@ -276,6 +276,28 @@
  * 
  */
 extern int qser_apn_get_list(qser_apn_info_list_s *apn_list);
+#ifdef MOBILETEK_TARGET_PLATFORM_T106
+/**
+ * set initial apnname
+ *
+ * @param [in] apnname         set the apnname.
+ *
+ * @return 
+ *   On success, 0 is returned.  On error, -1 is returned.
+ * 
+ */
+extern int qser_set_initial_apnname(char *apnname);
+/**
+ * get initial apnname
+ *
+ * @param [out] apnname         get the apnname.
+ *
+ * @return 
+ *   On success, 0 is returned.  On error, -1 is returned.
+ * 
+ */
+extern int qser_get_initial_apnname(char apnname[QSER_APN_NAME_SIZE]);
+#endif
 #ifdef __cplusplus
 }
 #endif
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
index 179e549..094547f 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-data/lynq-qser-data.cpp
@@ -65,6 +65,10 @@
 static int apn_db_query(unsigned char profile_idx,qser_apn_info_s *apn);
 static int apn_db_query_list_cb(void *data, int argc, char **argv, char **azColName);
 static int apn_db_query_list(qser_apn_info_list_s *apn_list);
+#ifdef MOBILETEK_TARGET_PLATFORM_T106
+int qser_set_initial_apnname(char *apnname);
+int qser_get_initial_apnname(char apnname[QSER_APN_NAME_SIZE]);
+#endif
 
 void lynq_ipv4_aton_urc(lynq_data_call_response_v11_t *libdata,qser_data_call_state_s *data_res)
 {
@@ -1679,6 +1683,42 @@
     }
     return ret;
 }
+#ifdef MOBILETEK_TARGET_PLATFORM_T106
+int qser_set_initial_apnname(char *apnname)
+{
+    int ret = -1;
+    
+    if(g_lynq_qser_data_init_flag == 0)
+    {
+        return LYNQ_E_NO_INIT;
+    }
+
+    ret = lynq_init_attach_apn(apnname, "IP", "0", "null", "null");
+    return ret;
+}
+int qser_get_initial_apnname(char apnname[QSER_APN_NAME_SIZE])
+{
+    int ret = -1;
+    lynq_apn_list_response apnList = {-1, "", "", "", -1, -1, -1, -1, -1, -1};
+
+    if(g_lynq_qser_data_init_flag == 0)
+    {
+        return LYNQ_E_NO_INIT;
+    }
+
+    if(apnname == NULL)
+    {
+        LYERRLOG("[%s][%d] apnname is NULL",__FUNCTION__,__LINE__);
+    }
+    ret = lynq_get_apn_list(1, &apnList);
+    if(ret == 0)
+    {
+        memcpy(apnname, apnList.apn, sizeof(apnList.apn));
+        LYINFLOG("qser_get_initial_apnname: %s", apnname);
+    }
+    return ret;
+}
+#endif
 int check_pdp_type(qser_apn_pdp_type_e pdp_type)
 {
     switch (pdp_type)
diff --git a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/data.cpp b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/data.cpp
index f69cc13..76e7031 100755
--- a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/data.cpp
+++ b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/data.cpp
@@ -456,3 +456,23 @@
     }

     return ret;

 }

+int lynq_qser_set_initial_apnname(int argc, char *argv[], int sp_test)

+{

+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);

+    int ret = -1;

+

+    ret = qser_set_initial_apnname(argv[1]);

+    printf("%s%d\n",TEST_RESULT,ret);

+    return ret;

+}

+int lynq_qser_get_initial_apnname(int argc, char *argv[], int sp_test)

+{

+    printf("[%s][%d] enter!\n",__FUNCTION__,__LINE__);

+    int ret = -1;

+    char apnname[QSER_APN_NAME_SIZE] = "\0";

+

+    ret = qser_get_initial_apnname(apnname);

+    printf("LYNQ_QSER_GET_INITIAL_APNNAME:apnname is %s\n", apnname);

+    printf("%s%d\n",TEST_RESULT,ret);

+    return ret;

+}
\ No newline at end of file
diff --git a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/data.h b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/data.h
index 33364fb..4bdd23d 100755
--- a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/data.h
+++ b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/data.h
@@ -16,4 +16,6 @@
 int lynq_qser_apn_get(int argc, char *argv[], int sp_test);

 int lynq_qser_apn_add(int argc, char *argv[], int sp_test);

 int lynq_qser_apn_del(int argc, char *argv[], int sp_test);

-int lynq_qser_apn_get_list(int argc, char *argv[], int sp_test);
\ No newline at end of file
+int lynq_qser_apn_get_list(int argc, char *argv[], int sp_test);

+int lynq_qser_get_initial_apnname(int argc, char *argv[], int sp_test);

+int lynq_qser_set_initial_apnname(int argc, char *argv[], int sp_test);
\ No newline at end of file
diff --git a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/lynq.h b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/lynq.h
index 19ec1f0..9256e38 100755
--- a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/lynq.h
+++ b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/lynq.h
@@ -60,6 +60,8 @@
 #define LYNQ_QSER_APN_DEL LYNQ_QSER_DATA + 9
 #define LYNQ_QSER_APN_GET_LIST LYNQ_QSER_DATA + 10
 #define LYNQ_QSER_SETUP_DATA_CALL_ASYNC LYNQ_QSER_DATA + 11
+#define LYNQ_QSER_GET_INITIAL_APNNAME LYNQ_QSER_DATA + 12
+#define LYNQ_QSER_SET_INITIAL_APNNAME LYNQ_QSER_DATA + 13
 
 
 #define LYNQ_QSER_NETWORK LYNQ_BASE + 100
diff --git a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/req_commands.h b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/req_commands.h
index 108fc82..33fa8c8 100755
--- a/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/req_commands.h
+++ b/cap/zx297520v3/src/lynq/packages/apps/Mobiletek_Tester_RDIT/req_commands.h
@@ -52,6 +52,8 @@
     {"LYNQ_QSER_APN_ADD",lynq_qser_apn_add, "set apn", LYNQ_QSER_APN_ADD},
     {"LYNQ_QSER_APN_DEL",lynq_qser_apn_del, "del apn", LYNQ_QSER_APN_DEL},
     {"LYNQ_QSER_APN_GET_LIST",lynq_qser_apn_get_list, "get apn list", LYNQ_QSER_APN_GET_LIST},
+    {"LYNQ_QSER_GET_INITIAL_APNNAME",lynq_qser_get_initial_apnname, "get initial apn", LYNQ_QSER_GET_INITIAL_APNNAME},
+    {"LYNQ_QSER_SET_INITIAL_APNNAME",lynq_qser_set_initial_apnname, "set initial apn", LYNQ_QSER_SET_INITIAL_APNNAME},
 //QSER VOICE
     {"LYNQ_QSER_CALL_INIT",qser_voice_call_client_init_test,"qser_voice_call_client_init_test",LYNQ_QSER_CALL_INIT},
     {"LYNQ_QSER_CALL_DEINIT",qser_voice_call_client_deinit_test,"qser_voice_call_client_deinit_test",LYNQ_QSER_CALL_DEINIT},
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/include/telephony/ril.h b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/include/telephony/ril.h
index 9dfd264..bcfc944 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/include/telephony/ril.h
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/include/telephony/ril.h
@@ -476,6 +476,20 @@
                                    sent an invalid value */
 } RIL_Data_Call_Response_v11;
 
+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_START
+typedef struct {
+    int cid;
+    char *pdp_type;
+    char *apn;
+    char *pdp_addr;
+    int d_comp;
+    int h_comp;
+    int IPv4AddrAlloc;
+    int Emergency_Indication;
+    int P_CSCF_discovery;
+    int IM_CN_Signalling_Flag_Ind;
+} RIL_Apn_List_Response;
+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_END
 typedef enum {
     RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
     RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/include/telephony/zxic_ril_sp.h b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/include/telephony/zxic_ril_sp.h
index 0d506d7..372fe6e 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/include/telephony/zxic_ril_sp.h
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/include/telephony/zxic_ril_sp.h
@@ -8,7 +8,22 @@
 #define RIL_REQUEST_VENDOR_ZXIC_BASE 4000

 #define RIL_REQUEST_GET_MSISDN RIL_REQUEST_VENDOR_ZXIC_BASE+0

 #define RIL_REQUEST_RESET_SIMCARD RIL_REQUEST_VENDOR_ZXIC_BASE+1

-

+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_START

+/**

+ * RIL_REQUEST_APN_LIST

+ *

+ * Get apninfo list.

+ *

+ * "data" is null

+ * "response" is const RIL_Apn_List_Response *

+ *

+ * Valid errors:

+ *

+ * SUCCESS

+ * GENERIC_FAILURE

+ */

+#define RIL_REQUEST_APN_LIST RIL_REQUEST_VENDOR_ZXIC_BASE+2

+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_END

 #define RIL_UNSOL_VENDOR_ZXIC_BASE 5000

 /**

  * RIL_UNSOL_SIM_STATUS_COMMAND

diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/reference-ril.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/reference-ril.c
index d3d73c6..1780825 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/reference-ril.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/reference-ril.c
@@ -156,7 +156,7 @@
 

 	{RIL_REQUEST_GET_CELL_INFO_LIST,							SERVICE_TYPE_MM},

 	{RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE,					SERVICE_TYPE_MM},

-	{RIL_REQUEST_SET_INITIAL_ATTACH_APN,						SERVICE_TYPE_INVALID},

+	{RIL_REQUEST_SET_INITIAL_ATTACH_APN,						SERVICE_TYPE_MM},//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221

 	{RIL_REQUEST_IMS_REGISTRATION_STATE,						SERVICE_TYPE_MM},

 	{RIL_REQUEST_IMS_SEND_SMS,							 		SERVICE_TYPE_SMS},

 	{RIL_REQUEST_SIM_TRANSMIT_APDU_BASIC,						SERVICE_TYPE_INVALID},

@@ -801,6 +801,10 @@
 			stype = SERVICE_TYPE_CC;

 		} else if ((RIL_REQUEST_ECALL_SET_IVS <= request) && (RIL_REQUEST_ECALL_SET_REGISTRATION_STATE >= request)) {

 			stype = SERVICE_TYPE_CC;

+		//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_START

+		} else if (RIL_REQUEST_APN_LIST == request) {

+			stype = SERVICE_TYPE_PS;

+		//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_START

 		}

 	}

 

@@ -1100,6 +1104,9 @@
 	case RIL_REQUEST_GET_IMEI:

 	case RIL_REQUEST_CANCEL_USSD:

 	case RIL_REQUEST_DATA_CALL_LIST:

+	//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_START

+	case RIL_REQUEST_APN_LIST:

+	//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_END

 	case RIL_REQUEST_IMS_REGISTRATION_STATE:

 	case RIL_REQUEST_VOICE_RADIO_TECH:

 	case RIL_REQUEST_GET_PREFERRED_NETWORK_TYPE:

@@ -1191,6 +1198,7 @@
 	case RIL_REQUEST_CHANGE_SIM_PIN2:

 	case RIL_REQUEST_QUERY_FACILITY_LOCK:

 	case RIL_REQUEST_SET_FACILITY_LOCK:

+	case RIL_REQUEST_SET_INITIAL_ATTACH_APN://LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221

 		node = ril_ref_req_packet(request, t);

 		if (NULL == node) {

 			goto error;

diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril.h b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril.h
index 9dfd264..bcfc944 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril.h
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril.h
@@ -476,6 +476,20 @@
                                    sent an invalid value */
 } RIL_Data_Call_Response_v11;
 
+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_START
+typedef struct {
+    int cid;
+    char *pdp_type;
+    char *apn;
+    char *pdp_addr;
+    int d_comp;
+    int h_comp;
+    int IPv4AddrAlloc;
+    int Emergency_Indication;
+    int P_CSCF_discovery;
+    int IM_CN_Signalling_Flag_Ind;
+} RIL_Apn_List_Response;
+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_END
 typedef enum {
     RADIO_TECH_3GPP = 1, /* 3GPP Technologies - GSM, WCDMA */
     RADIO_TECH_3GPP2 = 2 /* 3GPP2 Technologies - CDMA */
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_mm.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_mm.c
index d734936..d8a2e85 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_mm.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_mm.c
@@ -257,7 +257,7 @@
 	int sinrinteger,sinrdecimals;

 	int rssnr_max = 0, rssnr_temp;

 	int i;

-	int path_count_max = 4;//Ŀǰ֧³Ö4·SINRÖµ²éѯ

+	int path_count_max = 4;//Ŀǰ֧��4·SINRֵ��ѯ

 

 	err = at_send_command_singleline_timeout("AT+ZSINR", "+ZSINR:", &response, TIMEOUT_DEFALUT);

 

@@ -270,11 +270,11 @@
 	for(i = 0; i < path_count_max; i ++) {

 		if (at_tok_hasmore(&line)) {

 

-			/*LTEÐźŸÉÈÅÔëÉù±ÈSINRÖµµÄÕûÊý²¿·Ö£¬ÕûÐÍ*/

+			/*LTE�źŸ���������SINRֵ���������֣�����*/

 			err = at_tok_nextint(&line, &sinrinteger);

 			DO_ERROR_JDUGE;

 

-			/*LTEÐźŸÉÈÅÔëÉù±ÈSINRÖµµÄСÊý²¿·Ö£¬ÕûÐÍ£¬È¡Öµ·¶Î§[0,9]*/

+			/*LTE�źŸ���������SINRֵ��С�����֣����ͣ�ȡֵ��Χ[0,9]*/

 			err = at_tok_nextint(&line, &sinrdecimals);

 			DO_ERROR_JDUGE;

 

@@ -285,7 +285,7 @@
 			else {

 				rssnr_temp = sinrinteger * 10 + sinrdecimals;

 			}

-			/*È¡×î´óһ·ÐÅÔë±È*/

+			/*ȡ���һ·�����*/

 			rssnr_max = rssnr_max < rssnr_temp ? rssnr_temp : rssnr_max;			

 		}

 	}

@@ -561,7 +561,7 @@
 		ci[0].timeStamp = curTime;

 

 		/* Started by AICoder, pid:2519bke8b0693bf146b60bd2d0dd98183ab64021 */

-		/*ÓÉÓÚatoiÖ»ÄÜ´¦ÀíÊ®½øÖÆ£¬µ±smccΪ"fff"ʱ£¬atoi²»ÄÜ´¦Àí£¬·µ»ØÖµÎª0¡£Òò´ËÒµÎñ²ãÐèÒªÅжÏmcc/mncΪ0ʱ£¬ÊÇÎÞЧֵ*/

+		/*����atoiֻ�ܴ���ʮ���ƣ���smccΪ"fff"ʱ��atoi���ܴ���������ֵΪ0�����ҵ�����Ҫ�ж�mcc/mncΪ0ʱ������Чֵ*/

 		snprintf(smcc, 4, "%x%x%x", pNasInfo->bMCC1, pNasInfo->bMCC2, pNasInfo->bMCC3);

 		smcc[3] = '\0';

 		if(pNasInfo->bMNC3 == 0xf){

@@ -573,10 +573,10 @@
 		}

 		plte->cellIdentityLte.mcc = atoi(smcc);

 		plte->cellIdentityLte.mnc = atoi(smnc);

-		plte->cellIdentityLte.ci = tLteEmInfo->dwCellId; //Ð¡ÇøID

+		plte->cellIdentityLte.ci = tLteEmInfo->dwCellId; //��ID

 		plte->cellIdentityLte.pci = tLteEmInfo->wPci; //PCI

 		plte->cellIdentityLte.tac = tLteEmInfo->wTac;

-		plte->cellIdentityLte.earfcn = tLteEmInfo->dwEarfcn; //Ƶµã

+		plte->cellIdentityLte.earfcn = tLteEmInfo->dwEarfcn; //Ƶ��

 	    /* Ended by AICoder, pid:2519bke8b0693bf146b60bd2d0dd98183ab64021 */

 		

 		if((255 == tLteEmInfo->bRssiInt) || (199 == tLteEmInfo->bRssiInt)) {

@@ -624,7 +624,7 @@
 		ci[0].timeStamp = curTime;

 

 		/* Started by AICoder, pid:1e1a8w5abfe05111497509dca024911c72e2ca9f */

-		/*ÓÉÓÚatoiÖ»ÄÜ´¦ÀíÊ®½øÖÆ£¬µ±smccΪ"fff"ʱ£¬atoi²»ÄÜ´¦Àí£¬·µ»ØÖµÎª0¡£Òò´ËÒµÎñ²ãÐèÒªÅжÏmcc/mncΪ0ʱ£¬ÊÇÎÞЧֵ*/

+		/*����atoiֻ�ܴ���ʮ���ƣ���smccΪ"fff"ʱ��atoi���ܴ���������ֵΪ0�����ҵ�����Ҫ�ж�mcc/mncΪ0ʱ������Чֵ*/

 		snprintf(smcc, 4, "%x%x%x", tNasInfo->bMCC1, tNasInfo->bMCC2, tNasInfo->bMCC3);

 		smcc[3] = '\0';

 		if(tNasInfo->bMNC3 == 0xf){

@@ -637,7 +637,7 @@
 		gsm->cellIdentityGsm.mcc = atoi(smcc);

 		gsm->cellIdentityGsm.mnc = atoi(smnc);

 		gsm->cellIdentityGsm.lac = tGsmEmInfo->wLac;

-		gsm->cellIdentityGsm.cid = tGsmEmInfo->dwCellId; //Ð¡ÇøID

+		gsm->cellIdentityGsm.cid = tGsmEmInfo->dwCellId; //��ID

 		/* Ended by AICoder, pid:1e1a8w5abfe05111497509dca024911c72e2ca9f */

 		if(tGsmEmInfo->bRssi == 255) {

 			gsm->signalStrengthGsm.signalStrength = 99;

@@ -661,7 +661,7 @@
 		ci[0].timeStamp = curTime;		

 

 		/* Started by AICoder, pid:gc84eh585e12ba414dc108a0a0fbeb135d7212aa */

-		/*ÓÉÓÚatoiÖ»ÄÜ´¦ÀíÊ®½øÖÆ£¬µ±smccΪ"fff"ʱ£¬atoi²»ÄÜ´¦Àí£¬·µ»ØÖµÎª0¡£Òò´ËÒµÎñ²ãÐèÒªÅжÏmcc/mncΪ0ʱ£¬ÊÇÎÞЧֵ*/

+		/*����atoiֻ�ܴ���ʮ���ƣ���smccΪ"fff"ʱ��atoi���ܴ���������ֵΪ0�����ҵ�����Ҫ�ж�mcc/mncΪ0ʱ������Чֵ*/

 		snprintf(smcc, 4, "%x%x%x", twcdmaEmInfo->tPlmn.bMCC1, twcdmaEmInfo->tPlmn.bMCC2, twcdmaEmInfo->tPlmn.bMCC3);

 		smcc[3] = '\0';

 		if(twcdmaEmInfo->tPlmn.bMNC3 == 0xf){

@@ -675,7 +675,7 @@
 		pwcdma->cellIdentityWcdma.mcc = atoi(smcc);

 		pwcdma->cellIdentityWcdma.mnc = atoi(smnc);

 		pwcdma->cellIdentityWcdma.lac = twcdmaEmInfo->wLac;

-		pwcdma->cellIdentityWcdma.cid = twcdmaEmInfo->dwCellId; //Ð¡ÇøID

+		pwcdma->cellIdentityWcdma.cid = twcdmaEmInfo->dwCellId; //��ID

 		/* Ended by AICoder, pid:gc84eh585e12ba414dc108a0a0fbeb135d7212aa */

 		//RLOGD("parseCellInfo wcdma mcc: %d, mnc:%d, lac:%d, cid:%d", pwcdma->cellIdentityWcdma.mcc, pwcdma->cellIdentityWcdma.mnc, pwcdma->cellIdentityWcdma.lac,

 

@@ -746,17 +746,17 @@
 		ci[0].timeStamp = curTime;

 

 		/* Started by AICoder, pid:2519bke8b0693bf146b60bd2d0dd98183ab64021 */

-		/*ÓÉÓÚatoiÖ»ÄÜ´¦ÀíÊ®½øÖÆ£¬µ±smccΪ"fff"ʱ£¬atoi²»ÄÜ´¦Àí£¬·µ»ØÖµÎª0¡£Òò´ËÒµÎñ²ãÐèÒªÅжÏmcc/mncΪ0ʱ£¬ÊÇÎÞЧֵ*/

+		/*����atoiֻ�ܴ���ʮ���ƣ���smccΪ"fff"ʱ��atoi���ܴ���������ֵΪ0�����ҵ�����Ҫ�ж�mcc/mncΪ0ʱ������Чֵ*/

 		snprintf(smcc, 4, "%x%x%x", pNasInfo->tPlmnId.bMCC1, pNasInfo->tPlmnId.bMCC2, pNasInfo->tPlmnId.bMCC3);

 		smcc[3] = '\0';

 		snprintf(smnc, 3, "%x%x", pNasInfo->tPlmnId.bMNC1, pNasInfo->tPlmnId.bMNC2);

 		smnc[2] = '\0';

 		plte->cellIdentityLte.mcc = atoi(smcc);

 		plte->cellIdentityLte.mnc = atoi(smnc);

-		plte->cellIdentityLte.ci = tScellInfo->dwCellId; //Ð¡ÇøID

+		plte->cellIdentityLte.ci = tScellInfo->dwCellId; //��ID

 		plte->cellIdentityLte.pci = tScellInfo->wPci; //PCI

 		plte->cellIdentityLte.tac = pNasInfo->wTac;

-		plte->cellIdentityLte.earfcn = tScellInfo->dwEarfcn; //Ƶµã

+		plte->cellIdentityLte.earfcn = tScellInfo->dwEarfcn; //Ƶ��

 		/* Ended by AICoder, pid:2519bke8b0693bf146b60bd2d0dd98183ab64021 */

 		if(255 == tLteEmInfo->tMeasInfo.bScellRsrp) {

 			plte->signalStrengthLte.signalStrength = 99;

@@ -797,7 +797,7 @@
 		ci[0].timeStamp = curTime;

 

 		/* Started by AICoder, pid:1e1a8w5abfe05111497509dca024911c72e2ca9f */

-		/*ÓÉÓÚatoiÖ»ÄÜ´¦ÀíÊ®½øÖÆ£¬µ±smccΪ"fff"ʱ£¬atoi²»ÄÜ´¦Àí£¬·µ»ØÖµÎª0¡£Òò´ËÒµÎñ²ãÐèÒªÅжÏmcc/mncΪ0ʱ£¬ÊÇÎÞЧֵ*/

+		/*����atoiֻ�ܴ���ʮ���ƣ���smccΪ"fff"ʱ��atoi���ܴ���������ֵΪ0�����ҵ�����Ҫ�ж�mcc/mncΪ0ʱ������Чֵ*/

 		snprintf(smcc, 4, "%x%x%x", tNasInfo->tPlmn.bMCC1, tNasInfo->tPlmn.bMCC2, tNasInfo->tPlmn.bMCC3);

 		smcc[3] = '\0';

 		snprintf(smnc, 3, "%x%x", tNasInfo->tPlmn.bMNC1, tNasInfo->tPlmn.bMNC2);

@@ -805,7 +805,7 @@
 		gsm->cellIdentityGsm.mcc = atoi(smcc);

 		gsm->cellIdentityGsm.mnc = atoi(smnc);

 		gsm->cellIdentityGsm.lac = tNasInfo->wLac;

-		gsm->cellIdentityGsm.cid = tScellInfo->dwCellId; //Ð¡ÇøID

+		gsm->cellIdentityGsm.cid = tScellInfo->dwCellId; //��ID

 		/* Ended by AICoder, pid:1e1a8w5abfe05111497509dca024911c72e2ca9f */

 

 		if (tMeasInfo->bRssi > 99 && tMeasInfo->bRssi < 200) {

@@ -835,7 +835,7 @@
 		//RLOGD("parseCellInfo wcdma bMCC1:%d, bMCC2:%d, bMCC3:%d", pNasInfo->tPlmn.bMCC1, pNasInfo->tPlmn.bMCC2, pNasInfo->tPlmn.bMCC3);

 		//RLOGD("parseCellInfo wcdma bMNC1:%d, bMNC2:%d", pNasInfo->tPlmn.bMNC1, pNasInfo->tPlmn.bMNC2);

 		/* Started by AICoder, pid:gc84eh585e12ba414dc108a0a0fbeb135d7212aa */

-		/*ÓÉÓÚatoiÖ»ÄÜ´¦ÀíÊ®½øÖÆ£¬µ±smccΪ"fff"ʱ£¬atoi²»ÄÜ´¦Àí£¬·µ»ØÖµÎª0¡£Òò´ËÒµÎñ²ãÐèÒªÅжÏmcc/mncΪ0ʱ£¬ÊÇÎÞЧֵ*/

+		/*����atoiֻ�ܴ���ʮ���ƣ���smccΪ"fff"ʱ��atoi���ܴ���������ֵΪ0�����ҵ�����Ҫ�ж�mcc/mncΪ0ʱ������Чֵ*/

 		snprintf(smcc, 4, "%x%x%x", pNasInfo->tPlmn.bMCC1, pNasInfo->tPlmn.bMCC2, pNasInfo->tPlmn.bMCC3);

 		smcc[3] = '\0';

 		snprintf(smnc, 3, "%x%x", pNasInfo->tPlmn.bMNC1, pNasInfo->tPlmn.bMNC2);

@@ -843,7 +843,7 @@
 		pwcdma->cellIdentityWcdma.mcc = atoi(smcc);

 		pwcdma->cellIdentityWcdma.mnc = atoi(smnc);

 		pwcdma->cellIdentityWcdma.lac = pNasInfo->wLac;

-		pwcdma->cellIdentityWcdma.cid = pwcamppara->dwCellId; //Ð¡ÇøID

+		pwcdma->cellIdentityWcdma.cid = pwcamppara->dwCellId; //��ID

 		/* Ended by AICoder, pid:gc84eh585e12ba414dc108a0a0fbeb135d7212aa */

 

 		//RLOGD("parseCellInfo wcdma mcc: %d, mnc:%d, lac:%d, cid:%d", pwcdma->cellIdentityWcdma.mcc, pwcdma->cellIdentityWcdma.mnc, pwcdma->cellIdentityWcdma.lac,

@@ -1750,9 +1750,9 @@
 			response.WCDMA_SignalStrength.signalStrength = changeCSQdbmToLevel(rxlev - 116, 5);

 		}		

 		

-		/*ÓÉÓÚZSCIQ²»Éϱ¨ÎóÂëÂÊ£¬Ìîд99*/

+		/*����ZSCIQ���ϱ������ʣ���д99*/

 		response.WCDMA_SignalStrength.bitErrorRate = 99;

-		//ЭÒéÕ»¶Ô±¨ÉÏÀ´µÄRSCPµÄÖµ½øÐÐÁË-5²Ù×÷£¬ËùÒÔ´Ë´¦+5ÒÔ»ñÈ¡ÕæÊµÖµ

+		//Э��ջ�Ա�������RSCP��ֵ������-5���������Դ˴�+5�Ի�ȡ��ʵֵ

 		response.WCDMA_SignalStrength.rscp = twcdmaEmInfo->bRscp+5;		

 		response.WCDMA_SignalStrength.ecno = twcdmaEmInfo->bEcNo;	

 	}	

@@ -1761,7 +1761,7 @@
 		T_zAt_Lte_SCellInfo   *tLteEmInfo = &pEmInfo_Ind->uScellInfo.tLteScellInfo;		

 		

 		rxlev = tLteEmInfo->bRssiInt;

-		/*rssi ÕûÐÍ£¬È¡Öµ·¶Î§0-124,255*/		

+		/*rssi ���ͣ�ȡֵ��Χ0-124,255*/		

 		if((255 == rxlev) || (199 == rxlev)) {

 			response.LTE_SignalStrength.signalStrength = 99;

 		}

@@ -1795,7 +1795,7 @@
 			response.LTE_SignalStrength.rsrq = 0x7FFFFFFF;

 		}

 	}

-	/*ÎÞ·þÎñ»ò±£Áô*/

+	/*�޷������*/

 	else {

 		RLOGD("%s: No service.\n", __FUNCTION__);

 	}	

@@ -1832,8 +1832,120 @@
 

 	at_response_free(p_response);

 }

+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_START

+void requestSetInitialAttachApn(void *data, size_t datalen, RIL_Token t)

+{

+	char atstr[MAX_AT_LENGTH + 1];

+	char *cmd = atstr;

+	int err;

+	RIL_InitialAttachApn *apn_data;

+	ATResponse *p_response = NULL;

+ 

+	const char *apn = NULL;

+	const char *pdp_type = NULL;

+	int authtype = -1;

+	const char *username = NULL;

+	const char *password = NULL;

+	char nv_pdp_type[12] = {0};

 

+	char default_cid[30] = {0};

+	int cid = 1;

+ 

+	memset(default_cid, 0, sizeof(default_cid));

+	sc_cfg_get("default_cid", default_cid, sizeof(default_cid));

+ 

+	if (strlen(default_cid)) {

+		cid = atoi(default_cid);

+	}

+	if(cid < 0 || cid > 8){

+		cid = 1;

+	}

+ 

+ 

+	if (NULL != data) {

+		apn_data = (RIL_InitialAttachApn *)data;

+		apn = apn_data->apn;

+		pdp_type = apn_data->protocol;

+		authtype = apn_data->authtype;

+		username = apn_data->username;

+		password = apn_data->password;

+		if(authtype > 3 || authtype < 0){

+			authtype = -1;

+		}

+	}

+ 

+	RLOGI("requestSetInitialAttachApn: apn=%s,username=%s,passwd=%s,auth_type=%d,pdp_type=%s", \

+    	apn ? apn : "NULL", username ? username : "NULL", password ? password : "NULL", authtype, pdp_type? pdp_type : "NULL");

+ 

+	if (NULL == pdp_type) {

+		sc_cfg_get("pdp_type", nv_pdp_type, sizeof(nv_pdp_type));

+		pdp_type = nv_pdp_type;

+	} else {

+		if (0 != strncmp(pdp_type, "IP", strlen("IP")) &&

+			0 != strncmp(pdp_type, "IPV6", strlen("IPV6")) &&

+			0 != strncmp(pdp_type, "IPV4V6", strlen("IPV4V6"))) {

+			RLOGE("requesting set initial apn to pdp_type '%s' no support, use default.", pdp_type);

+			sc_cfg_get("pdp_type", nv_pdp_type, sizeof(nv_pdp_type));

+			pdp_type = nv_pdp_type;

+		}

+	}

+ 

+	RLOGI("requestSetInitialAttachApn last:pdp_type=%s, int_auth_type:%d", pdp_type, authtype);

+ 

+	memset(atstr, 0, sizeof(atstr));

 

+/*AT+ZGPCOAUTH=<cid>[,<user_name>,<password>,<auth_type>]*/

+	if (authtype <0 || authtype > 3) {

+		snprintf(cmd, sizeof(atstr) - strlen(atstr) - 1, "AT+ZGPCOAUTH=%d", cid);//clean auth

+	} else {

+		snprintf(cmd, sizeof(atstr) - strlen(atstr) - 1, "AT+ZGPCOAUTH=%d", cid);

+		cmd = atstr + strlen(atstr);

+		if (NULL == username) {

+			snprintf(cmd, sizeof(atstr) - strlen(atstr) - 1, ",\"\"");

+		} else {

+			snprintf(cmd, sizeof(atstr) - strlen(atstr) - 1, ",\"%s\"", username);

+		}

+ 

+		cmd = atstr + strlen(atstr);

+		if (NULL == password) {

+			snprintf(cmd, sizeof(atstr) - strlen(atstr) - 1, ",\"\"");

+		} else {

+			snprintf(cmd, sizeof(atstr) - strlen(atstr) - 1, ",\"%s\"", password);

+		}

+		cmd = atstr + strlen(atstr);

+		snprintf(cmd, sizeof(atstr) - strlen(atstr) - 1, ",%d\r\n", authtype);

+	}

+	RLOGI("requestSetInitialAttachApn auth atstr:%s", atstr);

+	err = at_send_command(atstr, &p_response);

+	if (err < 0 || p_response->success == 0) {

+		goto error;

+	}

+	at_response_free(p_response);

+ 

+	memset(atstr, 0, sizeof(atstr));

+	cmd = atstr;

+/*AT+CGDCONT=[<cid>[,<PDP_type>[,<APN>[,<PDP_addr>[,<d_comp>[,<h_comp>[,<IPv4AddrAlloc>[,<emergency?indication>[,<P-CSCF_discovery>[,<IM_CN_Signalling_Flag_Ind>]]]]]]]]]] */

+	if (NULL != apn) {

+		snprintf(cmd, sizeof(atstr) - 1, "AT+CGDCONT=%d,\"%s\",\"%s\"", cid, pdp_type, apn);

+	} else {

+		snprintf(cmd, sizeof(atstr) - 1, "AT+CGDCONT=%d,\"%s\",\"\"", cid, pdp_type);

+	}

+	RLOGI("requestSetInitialAttachApn apn set atstr:%s", atstr);

+	err = at_send_command(atstr, &p_response);

+	if (err < 0 || p_response->success == 0) {

+		goto error;

+	}

+ 

+	at_response_free(p_response);

+	RIL_onRequestComplete(t, RIL_E_SUCCESS, NULL, 0);

+ 

+	return;

+error:

+	RLOGE("requestSetInitialAttachApn return an error");

+	at_response_free(p_response);

+	RIL_onRequestComplete(t, RIL_E_GENERIC_FAILURE, NULL, 0);

+}

+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_END

 void requestSetCellInfoListRate(void *data, size_t datalen, RIL_Token t)

 {

 	int err;

@@ -2304,7 +2416,7 @@
 	RIL_SignalStrength_v10  result;

 

 	int rxlev = 0;	

-	int ber = 0;/*¸Ã²ÎÊýGSMģʽÏÂÓÐЧ*/

+	int ber = 0;/*�ò���GSMģʽ����Ч*/

 	int act = 0;

 	int ecno = 0;

 	int sinrInt = 0;

@@ -2351,14 +2463,14 @@
 	

 	/*GSM/GPRS ģʽ*/

 	if (3 == act) {

-		/*rssi ÕûÐÍ£¬È¡Öµ·¶Î§0-31£¬99*/

+		/*rssi ���ͣ�ȡֵ��Χ0-31��99*/

 		result.GW_SignalStrength.signalStrength = rxlev;

 		result.GW_SignalStrength.bitErrorRate = ber;

 		result.GW_SignalStrength.timingAdvance = 0;

 	}

-	/*WCDMA ģʽ£¬CSQºÍZSQRµÄÐźÅÇ¿¶ÈÖµÊÇCESQÖµ¼õ5*/

+	/*WCDMA ģʽ��CSQ��ZSQR���ź�ǿ��ֵ��CESQֵ��5*/

 	else if (5 == act) {

-		/*rssi ÕûÐÍ£¬È¡Öµ·¶Î§100-191,199*/

+		/*rssi ���ͣ�ȡֵ��Χ100-191,199*/

 		if(100 < rxlev) {

 			rxlev -= 100;

 		}

@@ -2369,9 +2481,9 @@
 			result.WCDMA_SignalStrength.signalStrength = changeCSQdbmToLevel(rxlev - 116, act);

 		}

 

-		/*ÓÉÓÚzsqr²»Éϱ¨ÎóÂëÂÊ£¬Ìîд99*/

+		/*����zsqr���ϱ������ʣ���д99*/

 		result.WCDMA_SignalStrength.bitErrorRate = 99;

-		/*½«rssiתΪrscp£¬Valid values are (0-96, 255)*/

+		/*��rssiתΪrscp��Valid values are (0-96, 255)*/

 		if(99 == rxlev) {

 			result.WCDMA_SignalStrength.rscp = 255;

 		}

@@ -2381,9 +2493,9 @@
 		

 		result.WCDMA_SignalStrength.ecno = ecno;		

 	}

-	/*TD-SCDMA ģʽ, CSQºÍZSQRµÄÐźÅÇ¿¶ÈÖµÊÇCESQÖµ¼õ5*/

+	/*TD-SCDMA ģʽ, CSQ��ZSQR���ź�ǿ��ֵ��CESQֵ��5*/

 	else if (15 == act) {

-		/*rssi ÕûÐÍ£¬È¡Öµ·¶Î§100-191,199*/

+		/*rssi ���ͣ�ȡֵ��Χ100-191,199*/

 		if(100 < rxlev) {

 			rxlev -= 100;

 		}

@@ -2403,7 +2515,7 @@
 	}

 	/*LTE ģʽ*/

 	else if (17 == act) {		

-		/*rssi ÕûÐÍ£¬È¡Öµ·¶Î§0-125,255, ÕæÊµÖµÈ¡Öµ·¶Î§: -129~-4*/		

+		/*rssi ���ͣ�ȡֵ��Χ0-125,255, ��ʵֵȡֵ��Χ: -129~-4*/		

 		if(255 == rssi) {

 			result.LTE_SignalStrength.signalStrength = 99;

 		}

@@ -2438,7 +2550,7 @@
 			result.LTE_SignalStrength.rsrq = 0x7FFFFFFF;

 		}

 	}

-	/*ÎÞ·þÎñ»ò±£Áô*/

+	/*�޷������*/

 	else {

 		RLOGD("%s: No service.\n", __FUNCTION__);

 	}

@@ -2461,7 +2573,7 @@
 	RIL_SignalStrength_v10  result;

 

 	int rssi = 0;

-	int ber = 0;/*¸Ã²ÎÊýGSMģʽÏÂÓÐЧ*/

+	int ber = 0;/*�ò���GSMģʽ����Ч*/

 	int act = 0;

 

 	line = s;

@@ -2481,14 +2593,14 @@
 	

 	/*GSM/GPRS ģʽ*/

 	if (3 == act) {

-		/*rssi ÕûÐÍ£¬È¡Öµ·¶Î§0-31£¬99*/

+		/*rssi ���ͣ�ȡֵ��Χ0-31��99*/

 		result.GW_SignalStrength.signalStrength = rssi;

 		result.GW_SignalStrength.bitErrorRate = ber;

 		result.GW_SignalStrength.timingAdvance = 0;

 	}

-	/*WCDMA ģʽ£¬CSQºÍZSQRµÄÐźÅÇ¿¶ÈÖµÊÇCESQÖµ¼õ5*/

+	/*WCDMA ģʽ��CSQ��ZSQR���ź�ǿ��ֵ��CESQֵ��5*/

 	else if (5 == act) {

-		/*rssi ÕûÐÍ£¬È¡Öµ·¶Î§100-191,199*/

+		/*rssi ���ͣ�ȡֵ��Χ100-191,199*/

 		if(100 < rssi) {

 			rssi -= 100;

 		}

@@ -2507,22 +2619,22 @@
 			result.WCDMA_SignalStrength.rscp = 121 - rssi;

 		}

 #else

-		/*ÓÉÓÚzsqr²»Éϱ¨ÎóÂëÂÊ£¬Ìîд99*/

+		/*����zsqr���ϱ������ʣ���д99*/

 		result.WCDMA_SignalStrength.bitErrorRate = 99;

-		/*½«rssiתΪrscp£¬Valid values are (0-96, 255)*/

+		/*��rssiתΪrscp��Valid values are (0-96, 255)*/

 		if(99 == rssi) {

 			result.WCDMA_SignalStrength.rscp = 255;

 		}

 		else {

 			result.WCDMA_SignalStrength.rscp = rssi + 5;

 		}

-		/*ÓÉÓÚzsqr²»Éϱ¨ecno£¬Ìîд255*/

+		/*����zsqr���ϱ�ecno����д255*/

 		result.WCDMA_SignalStrength.ecno = 255;

 #endif		

 	}

-	/*TD-SCDMA ģʽ, CSQºÍZSQRµÄÐźÅÇ¿¶ÈÖµÊÇCESQÖµ¼õ5*/

+	/*TD-SCDMA ģʽ, CSQ��ZSQR���ź�ǿ��ֵ��CESQֵ��5*/

 	else if (15 == act) {

-		/*rssi ÕûÐÍ£¬È¡Öµ·¶Î§100-191,199*/

+		/*rssi ���ͣ�ȡֵ��Χ100-191,199*/

 		if(100 < rssi) {

 			rssi -= 100;

 		}

@@ -2542,7 +2654,7 @@
 	}

 	/*LTE ģʽ*/

 	else if (17 == act) {

-		/*rssi ÕûÐÍ£¬È¡Öµ·¶Î§100-197,199*/

+		/*rssi ���ͣ�ȡֵ��Χ100-197,199*/

 		if(100 < rssi) {

 			rssi -= 100;

 		}

@@ -2559,7 +2671,7 @@
 		}

 		result.LTE_SignalStrength.rssnr = getRssnr();

 	}

-	/*ÎÞ·þÎñ»ò±£Áô*/

+	/*�޷������*/

 	else {

 		RLOGD("%s: No service.\n", __FUNCTION__);

 	}

diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ps.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ps.c
index 0cd2921..ba4aaf3 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ps.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ps.c
@@ -1010,7 +1010,140 @@
 {

 	requestOrSendDataCallList(&t);

 }

+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_START

+void requestApnList(void *data, size_t datalen, RIL_Token t)

+{

+	ATResponse *p_response;

+	ATLine *p_cur;

+	int err;

+	int n = 0;

+	char *out;

 

+	int i;

+

+	err = at_send_command_multiline("AT+CGDCONT?", "+CGDCONT:", &p_response);

+	if (err != 0 || p_response->success == 0) {

+		RIL_onRequestComplete(t, RIL_E_GENERIC_FAILURE, NULL, 0);

+		at_response_free(p_response);

+		return;

+	}

+	

+	for (p_cur = p_response->p_intermediates; p_cur != NULL; p_cur = p_cur->p_next) {

+		n++;

+	}

+

+	RIL_Apn_List_Response *responses =

+	    alloca(n * sizeof(RIL_Apn_List_Response));

+

+	for (i = 0; i < n; i++) {

+		responses[i].cid = -1;

+		responses[i].pdp_type = "";

+		responses[i].apn = "";

+		responses[i].pdp_addr = "";

+		responses[i].d_comp = -1;

+		responses[i].h_comp = -1;

+		responses[i].IPv4AddrAlloc = -1;

+		responses[i].Emergency_Indication = -1;

+		responses[i].P_CSCF_discovery = -1;

+		responses[i].IM_CN_Signalling_Flag_Ind = -1;

+	}

+

+	

+	for (p_cur = p_response->p_intermediates,i = 0; p_cur != NULL; p_cur = p_cur->p_next, i++)

+	{

+		char *line = p_cur->line;

+		int cid = -1;

+		char *pdp_type = NULL;

+		char *apn = NULL;

+		char *pdp_addr = NULL;

+		int d_comp = -1;

+		int h_comp = -1;

+		int IPv4AddrAlloc = -1;

+		int Emergency_Indication = -1;

+		int P_CSCF_discovery = -1;

+		int IM_CN_Signalling_Flag_Ind = -1;

+

+		err = at_tok_start(&line);

+		if (err < 0)

+			goto error;

+

+		//cid

+		err = at_tok_nextint(&line, &responses[i].cid);

+		if (err < 0)

+			goto error;

+

+		// pdp_type

+		err = at_tok_nextstr(&line, &out);

+		if (err < 0)

+			goto error;

+		responses[i].pdp_type = alloca(strlen(out) + 1);

+		strcpy(responses[i].pdp_type, out);

+

+		// apn

+		err = at_tok_nextstr(&line, &out);

+		if (err < 0)

+			goto error;

+		responses[i].apn = alloca(strlen(out) + 1);

+		strcpy(responses[i].apn, out);

+

+		// pdp_addr

+		err = at_tok_nextstr(&line, &out);

+		if (err < 0)

+			goto error;

+		responses[i].pdp_addr = alloca(strlen(out) + 1);

+		strcpy(responses[i].pdp_addr, out);

+

+		// d_comp

+		err = at_tok_nextint(&line, &responses[i].d_comp);

+		if (err < 0)

+			goto error;

+

+		// h_comp

+		err = at_tok_nextint(&line, &responses[i].h_comp);

+		if (err < 0)

+			goto error;

+

+		// IPv4AddrAlloc

+		err = at_tok_nextint(&line, &responses[i].IPv4AddrAlloc);

+		if (err < 0)

+			goto error;

+

+		// Emergency_Indication

+		err = at_tok_nextint(&line, &responses[i].Emergency_Indication);

+		if (err < 0)

+			goto error;

+

+		// P_CSCF_discovery

+		err = at_tok_nextint(&line, &responses[i].P_CSCF_discovery);

+		if (err < 0)

+			goto error;

+

+		// IM_CN_Signalling_Flag_Ind

+		err = at_tok_nextint(&line, &responses[i].IM_CN_Signalling_Flag_Ind);

+		if (err < 0)

+			goto error;

+		RLOGD("apn list: line[%d], cid=%d, pdp_type=%s, apn=%s, pdp_addr=%s, d_comp=%d, h_comp=%d, IPv4AddrAlloc=%d, Emergency_Indication=%d, P_CSCF_discovery=%d, IM_CN_Signalling_Flag_Ind=%d\n",

+							 		i, responses[i].cid, 

+									responses[i].pdp_type, 

+									responses[i].apn, 	

+									responses[i].pdp_addr, 

+									responses[i].d_comp, 

+									responses[i].h_comp, 

+									responses[i].IPv4AddrAlloc, 

+									responses[i].Emergency_Indication, 

+									responses[i].P_CSCF_discovery, 

+									responses[i].IM_CN_Signalling_Flag_Ind);

+	}

+	at_response_free(p_response);

+	RIL_onRequestComplete(t, RIL_E_SUCCESS, responses, n * sizeof(RIL_Apn_List_Response));

+	return;

+

+error:

+	RIL_onRequestComplete(t, RIL_E_GENERIC_FAILURE, NULL, 0);

+	at_response_free(p_response);

+	return;

+}

+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_END

 void onDataCallListChanged(void *param __unused)

 {

 	requestOrSendDataCallList(NULL);

diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ref.c b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ref.c
index b308041..ca0e2ee 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ref.c
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ref.c
@@ -404,7 +404,7 @@
 	RLOGD("initializeCallback end");
 }
 
-void requestProc(int request, void *data, size_t datalen, RIL_Token t)
+void requestProc(unsigned int request, void *data, size_t datalen, RIL_Token t)//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221
 {
 	ATResponse *p_response;
 	ATRequest at_request;
@@ -510,7 +510,11 @@
 	case RIL_REQUEST_DATA_CALL_LIST:
 		requestDataCallList(data, datalen, t);
 		break;
-
+	//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_START
+	case RIL_REQUEST_APN_LIST:
+		requestApnList(data, datalen, t);
+		break;
+	//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_END
 	case RIL_REQUEST_SMS_ACKNOWLEDGE:
 		requestSMSAcknowledge(data, datalen, t);
 		break;
@@ -598,7 +602,11 @@
 	case RIL_REQUEST_GET_CELL_INFO_LIST:
 		requestGetCellInfoList(data, datalen, t);
 		break;
-
+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_START
+	case RIL_REQUEST_SET_INITIAL_ATTACH_APN:
+        requestSetInitialAttachApn(data, datalen, t);
+        break;
+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_END
 	case RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE:
 		requestSetCellInfoListRate(data, datalen, t);
 		break;
@@ -828,6 +836,10 @@
 		return "LAST_DATA_CALL_FAIL_CAUSE";
 	case RIL_REQUEST_DATA_CALL_LIST:
 		return "DATA_CALL_LIST";
+	//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_START
+	case RIL_REQUEST_APN_LIST:
+		return "APN_LIST";
+	//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_END
 	case RIL_REQUEST_RESET_RADIO:
 		return "RESET_RADIO";
 	case RIL_REQUEST_OEM_HOOK_RAW:
@@ -925,7 +937,7 @@
 	case RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE:
 		return"SET_UNSOL_CELL_INFO_LIST_RATE";
 	case RIL_REQUEST_SET_INITIAL_ATTACH_APN:
-		return "RIL_REQUEST_SET_INITIAL_ATTACH_APN";
+		return "REQUEST_SET_INITIAL_ATTACH_APN";//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221
 	case RIL_REQUEST_IMS_REGISTRATION_STATE:
 		return "IMS_REGISTRATION_STATE";
 	case RIL_REQUEST_IMS_SEND_SMS:
diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ref.h b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ref.h
index 91edb0e..da3fe82 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ref.h
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/ril_ref.h
@@ -146,7 +146,7 @@
 RIL_RadioState getRadioState(void);

 int isRadioOn(void);

 void initializeCallback(void *param);

-void requestProc(int request, void *data, size_t datalen, RIL_Token t);

+void requestProc(unsigned int request, void *data, size_t datalen, RIL_Token t);//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221

 const char *requestToString(int request);

 

 /*ril_mm.c*/

@@ -169,6 +169,7 @@
 void ril_request_signal_strength(void *data, size_t datalen, RIL_Token token);

 void requestSignalStrength(void *data, size_t datalen, RIL_Token t);

 void requestGetCellInfoList(void *data, size_t datalen, RIL_Token t);

+void requestSetInitialAttachApn(void *data, size_t datalen, RIL_Token t);//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221

 void requestSetCellInfoListRate(void *data, size_t datalen, RIL_Token t);

 void handle_zemsci(const char *s, const char *smsPdu);

 void handle_zscind(const char *s, const char *smsPdu);

@@ -217,6 +218,7 @@
 void handle_dsci(const char *s, const char *smsPdu);

 /*ril_ps.c*/

 void requestDataCallList(void *data, size_t datalen, RIL_Token t);

+void requestApnList(void *data, size_t datalen, RIL_Token t);//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221

 void onDataCallListChanged(void *param);

 void requestDeactiveDataCall(void **data, size_t datalen, RIL_Token t);

 void requestSetupDataCall(void *data, size_t datalen, RIL_Token t);

diff --git a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/zxic_ril_sp.h b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/zxic_ril_sp.h
index 0d506d7..372fe6e 100755
--- a/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/zxic_ril_sp.h
+++ b/cap/zx297520v3/zxic_code/zxic_source/zxic_app_open/sdk/ril/reference-ril/zxic_ril_sp.h
@@ -8,7 +8,22 @@
 #define RIL_REQUEST_VENDOR_ZXIC_BASE 4000

 #define RIL_REQUEST_GET_MSISDN RIL_REQUEST_VENDOR_ZXIC_BASE+0

 #define RIL_REQUEST_RESET_SIMCARD RIL_REQUEST_VENDOR_ZXIC_BASE+1

-

+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_START

+/**

+ * RIL_REQUEST_APN_LIST

+ *

+ * Get apninfo list.

+ *

+ * "data" is null

+ * "response" is const RIL_Apn_List_Response *

+ *

+ * Valid errors:

+ *

+ * SUCCESS

+ * GENERIC_FAILURE

+ */

+#define RIL_REQUEST_APN_LIST RIL_REQUEST_VENDOR_ZXIC_BASE+2

+//LYNQ_MODIFY_ZXW_TASK794_CR2024120449D612E5_XF.Li_20241221_END

 #define RIL_UNSOL_VENDOR_ZXIC_BASE 5000

 /**

  * RIL_UNSOL_SIM_STATUS_COMMAND