[Feature][T8TSK-100] RIL3.0 AT partial upgrade
Change-Id: I8740b951a04fc8e1704dd593eb8ba12c43ac22aa
diff --git a/framework/lynq-ril-service/src/ril.cpp b/framework/lynq-ril-service/src/ril.cpp
index e44cd49..ffd80d8 100755
--- a/framework/lynq-ril-service/src/ril.cpp
+++ b/framework/lynq-ril-service/src/ril.cpp
@@ -4220,41 +4220,7 @@
}
break;
}
- case RIL_REQUEST_OEM_HOOK_RAW:
- {
- if(pRI->lynqEvent==1)
- {
- /*lei add for at+cgmr*/
- if(strstr((const char*)response,"+CGMR")){
- lynq_get_version();
- }
- /*lei add for at+cgmr*/
- int n = write(ttyGS3_fd,response,responselen);
- if(n<0)
- {
- perror("lynq resp write:");
- }
- printf("n = %d\n",n);
- }
- /*lei add only for factory test 2022/5/19*/
- if(pRI->lynqEvent==3)
- {
- /*lei add for at+cgir*/
- if(strstr((const char*)response,"+CGMR")){
- lynq_get_inside_version();
- }
- /*lei add for at+cgir*/
- parse_inside_version(response);
- int n = write(ttyGS3_fd,response,responselen);
- if(n<0)
- {
- perror("lynq resp write:");
- }
- printf("n = %d\n",n);
- }
- break;
- }
- /*lei add for AT+CGSN 2022/8/4*/
+ /*lei add for sdk ready 2022/8/17*/
case RIL_REQUEST_DEVICE_IDENTITY:
{
int resp_type;
@@ -4264,9 +4230,8 @@
int error1;
int num;
char imei[32] = {0};
- if(pRI->lynqEvent==1)
+ if(sdk_ready == true)
{
- //printf("lei test %s\n" ,printBuf);
p.setDataPosition(0);
if(p.dataAvail() > 0)
{
@@ -4277,68 +4242,18 @@
p.readInt32(&error1);
if(!error1)
{
- p.readInt32(&num);
- char * test = lynqStrdupReadString(p);
- parse_imei(test);
- if(imei_cnt % 2 == 0)
- {
- sprintf(imei,"%s%s%s", "+CGSN: ", test, "\n");
- int n = write(ttyGS3_fd,imei,strlen(imei));
- if(n<0)
- {
- perror("lynq resp write:");
- }
- }
- else
- {
- sprintf(imei,"%s%s%s", "+CGSN: ", test, "\n");
- int n = write(ttyGS3_fd,imei,strlen(imei));
- if(n<0)
- {
- perror("lynq resp write:");
- }
- char eBuf[64] = {0};
- sprintf(eBuf,"OK\n");
- n = write(ttyGS3_fd,eBuf,strlen(eBuf));
- if(n<0)
- {
- perror("lynq resp write:");
- }
- }
- imei_cnt++;
- free(test);
+ system("uci set lynq_uci.sdk_ready=0");
}
- }
- }
- /*lei add for sdk ready 2022/8/17*/
- else
- {
- if(sdk_ready == true)
- {
- p.setDataPosition(0);
- if(p.dataAvail() > 0)
+ else
{
- p.readInt32(&resp_type);
- p.readInt32(&token);
- p.readInt32(&request);
- p.readInt32(&slot_id);
- p.readInt32(&error1);
- if(!error1)
- {
- system("uci set lynq_uci.sdk_ready=0");
- }
- else
- {
- system("uci set lynq_uci.sdk_ready=2");
- }
+ system("uci set lynq_uci.sdk_ready=2");
}
- sdk_ready = false;
}
+ sdk_ready = false;
}
- /*lei add for sdk ready 2022/8/17*/
break;
}
- /*lei add for AT+CGSN 2022/8/4*/
+ /*lei add for sdk ready 2022/8/17*/
case RIL_REQUEST_OPERATOR:
{
lynq_get_mccmnc(p, mccmnc);
@@ -4347,30 +4262,6 @@
break;
}
}
- /*Warren add for FAW platform 2021/10/8 start*/
- else
- {
- if(pRI->lynqEvent==1)
- {
- char eBuf[64] = {0};
- bzero(eBuf, 64);
- if(e==RIL_E_SUCCESS)
- {
- sprintf(eBuf,"\nOK\n\0");
- }
- else
- {
- sprintf(eBuf,"\nCME ERROR: %d\n\0",e);
- }
- int n = write(ttyGS3_fd,eBuf,strlen(eBuf));
- if(n<0)
- {
- perror("lynq resp write:");
- }
- //printf("n = %d\n",n);
- }
- }
- /*Warren add for FAW platform 2021/10/8 start*/
if (e != RIL_E_SUCCESS) {
appendPrintBuf("%s fails by %s", printBuf, failCauseToString(e));
}
@@ -7220,7 +7111,8 @@
while (s_started == 0) {
pthread_cond_wait(&s_startupCond, &s_startupMutex);
}
- /*mobiletek add*/
+ //warren delete,beacuse of update at fwk.
+ /*mobiletek add*
s_started = 0;
result = pthread_create(&s_tid_dispatch, &attr, eventLoop_at, NULL);
if (result != 0) {
@@ -7231,7 +7123,7 @@
while (s_started == 0) {
pthread_cond_wait(&s_startupCond, &s_startupMutex);
}
- /*mobiletek add*/
+ *mobiletek add*/
result = pthread_create(&s_tid_dispatch, &attr, responseLoop, NULL);
if (result != 0) {
RLOGW("Failed to create response dispatch thread: %s", strerror(result));