Add cell get/set API for V2.

Change-Id: I7a001cd0f091a199ef0f7583becead01c38e1777
diff --git a/mbtk/mbtk_rild_v2/src/main.c b/mbtk/mbtk_rild_v2/src/main.c
index 45a30f6..24a74a3 100755
--- a/mbtk/mbtk_rild_v2/src/main.c
+++ b/mbtk/mbtk_rild_v2/src/main.c
@@ -51,6 +51,7 @@
 static bool ril_server_ready = FALSE;  // Only one time.

 ril_band_info_t band_info;

 ril_info_t ril_info;

+extern mbtk_cell_pack_info_t cell_info;

 

 // int urc_msg_distribute(bool async_process, info_urc_msg_id_enum msg, void *data, int data_len);

 // int mbtk_signal_log(char *data);

@@ -281,16 +282,651 @@
     }
 }

 

+static void urc_cell_process(const char *s, const char *sms_pdu)

+{

+    /*

+    // <mcc>, <length of mnc>, <mnc>, <tac>, <PCI>, <dlEuarfcn>, < ulEuarfcn >, <band>, <dlBandwidth>,

+    // <rsrp>,<rsrq>, <sinr>,

+    // errcModeState,emmState,serviceState,IsSingleEmmRejectCause,EMMRejectCause,mmeGroupId,mmeCode,mTmsi,

+    // cellId,subFrameAssignType,specialSubframePatterns,transMode

+    // mainRsrp,diversityRsrp,mainRsrq,diversityRsrq,rssi,cqi,pathLoss,tb0DlTpt,tb1DlTpt,tb0DlPeakTpt,tb1DlPeakTpt,tb0UlPeakTpt,

+    // tb1UlPeakTpt,dlThroughPut,dlPeakThroughPut,averDlPRB,averCQITb0,averCQITb1,rankIndex,grantTotal,ulThroughPut,ulPeakThroughPut,currPuschTxPower,averUlPRB,

+    // dlBer, ulBer,

+    // diversitySinr, diversityRssi

+    +EEMLTESVC: 1120, 2, 0, 33584, 430, 40936, 40936, 41, 20,

+    0, 0, 0,

+    1, 10, 0, 1, 0, 1059, 78, 3959566565,

+    105149248, 2, 7, 7,

+    0, 0, 0, 0, 0, 0, 0, 1190919, 0, 0, 0, 16779777,

+    0, 5112867, 3959566565, 2, 0, 0, 0, 0, 0, 0, 0, 0,

+    0, 0,

+    7, 44

+    */

+    if(strStartsWith(s, "+EEMLTESVC:"))   // LTE Server Cell

+    {

+        // tac, PCI, dlEuarfcn, ulEuarfcn, band

+        if(cell_info.running) {

+            int tmp_int;

+            int i = 0;

+            char* tmp_s = memdup(s,strlen(s));

+            char* free_ptr = tmp_s;

+            char *line = tmp_s;

+            if (at_tok_start(&line) < 0)

+            {

+                goto EEMLTESVC_EXIT;

+            }

+

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMLTESVC_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value6 = (uint32)tmp_int;    //mcc

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMLTESVC_EXIT;

+            }

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMLTESVC_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value7 = (uint32)tmp_int;    //mnc

+            /*

+            // Jump 2 integer.

+            i = 0;

+            while(i < 2) {

+                if (at_tok_nextint(&line, &tmp_int) < 0)

+                {

+                    goto EEMLTESVC_EXIT;

+                }

+                i++;

+            }

+            */

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMLTESVC_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value1 = (uint32)tmp_int;    //tac

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMLTESVC_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value2 = (uint32)tmp_int;    //pci

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMLTESVC_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value3 = (uint32)tmp_int;    //dl arfcn

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMLTESVC_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value4 = (uint32)tmp_int;    //ul arfcn

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMLTESVC_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value5 = (uint32)tmp_int;    //band

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMLTESVC_EXIT;

+            }

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMLTESVC_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value8 = (uint32)tmp_int;    //cid

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMLTESVC_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value9 = (uint32)tmp_int;    //rsrp

+

+            for(i =0; i < 10; i++)

+            {

+                if (at_tok_nextint(&line, &tmp_int) < 0)

+                {

+                    goto EEMLTESVC_EXIT;

+                }

+            }

+			cell_info.cell_list.cell[cell_info.cell_list.num].value10 = (uint32)tmp_int;   //cell identiy

+

+            cell_info.cell_list.num++;

+

+EEMLTESVC_EXIT:

+            free(free_ptr);

+        }

+    }

+    /*

+    // index,phyCellId,euArfcn,rsrp,rsrq

+    +EEMLTEINTER: 0, 65535, 38950, 0, 0

+    */

+    else if(strStartsWith(s, "+EEMLTEINTER:") || strStartsWith(s, "+EEMLTEINTRA:")) // LTE ÒìÆµ/Í¬ÆµÐ¡Çø

+    {

+        // phyCellId,euArfcn,rsrp,rsrq

+        if(cell_info.running) {

+            int tmp_int;

+            char* tmp_s = memdup(s,strlen(s));

+            char* free_ptr = tmp_s;

+            char *line = tmp_s;

+            if (at_tok_start(&line) < 0)

+            {

+                goto EEMLTEINTER_EXIT;

+            }

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMLTEINTER_EXIT;

+            }

+            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int <= 0 || tmp_int > 503)

+            {

+                goto EEMLTEINTER_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value1 = (uint32)tmp_int;

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMLTEINTER_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value2 = (uint32)tmp_int;

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMLTEINTER_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value3 = (uint32)tmp_int;

+            LOG("cell line : %s", line);

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMLTEINTER_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value4 = (uint32)tmp_int;

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                LOG("cell tmp_int : %d", tmp_int);

+                goto EEMLTEINTER_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value5 = (uint32)tmp_int;

+            LOG("cell value5 : %d", cell_info.cell_list.cell[cell_info.cell_list.num].value5);

+            cell_info.cell_list.num++;

+EEMLTEINTER_EXIT:

+            free(free_ptr);

+        }

+    }

+    // Do nothing

+    else if(strStartsWith(s, "+EEMLTEINTERRAT:")) // LTE RATÐ¡ÇøÐÅÏ¢

+    {

+        if(cell_info.running) {

+

+        }

+    }

+    // WCDMA

+    /*

+    // Mode, sCMeasPresent, sCParamPresent, ueOpStatusPresent,

+

+    // if sCMeasPresent == 1

+    // cpichRSCP, utraRssi, cpichEcN0, sQual, sRxLev, txPower,

+    // endif

+

+    // if sCParamPresent == 1

+    // rac, nom, mcc, mnc_len, mnc, lac, ci,

+    // uraId, psc, arfcn, t3212, t3312, hcsUsed, attDetAllowed,

+    // csDrxCycleLen, psDrxCycleLen, utranDrxCycleLen, HSDPASupport, HSUPASupport,

+    // endif

+

+    // if ueOpStatusPresent == 1

+    // rrcState, numLinks, srncId, sRnti,

+    // algPresent, cipherAlg, cipherOn, algPresent, cipherAlg, cipherOn,

+    // HSDPAActive, HSUPAActive, MccLastRegisteredNetwork, MncLastRegisteredNetwork, TMSI, PTMSI, IsSingleMmRejectCause, IsSingleGmmRejectCause,

+    // MMRejectCause, GMMRejectCause, mmState, gmmState, gprsReadyState, readyTimerValueInSecs, NumActivePDPContext, ULThroughput, DLThroughput,

+    // serviceStatus, pmmState, LAU_status, LAU_count, RAU_status, RAU_count

+    // endif

+    //

+    +EEMUMTSSVC: 3, 1, 1, 1,

+    -80, 27, -6, -18, -115, -32768,

+    1, 1, 1120, 2, 1, 61697, 168432821,

+    15, 24, 10763, 0, 0, 0, 0,

+    128, 128, 65535, 0, 0,

+    2, 255, 65535, 4294967295,

+    0, 0, 0, 0, 0, 0,

+    0, 0, 0, 0, 0, 0, 1, 1,

+    28672, 28672, 0, 0, 0, 0, 0, 0, 0,

+    0, 0, 0, 0, 0, 0

+    */

+    else if(strStartsWith(s, "+EEMUMTSSVC:")) // WCDMA Server Cell

+    {

+        // lac, ci, arfcn

+        if(cell_info.running) {

+            int tmp_int;

+            int i = 0;

+            char* tmp_s = memdup(s,strlen(s));

+            char* free_ptr = tmp_s;

+            char *line = tmp_s;

+            if (at_tok_start(&line) < 0)

+            {

+                goto EEMUMTSSVC_EXIT;

+            }

+            // Jump 12 integer.

+            i = 0;

+            while(i < 12) {

+                if (at_tok_nextint(&line, &tmp_int) < 0)

+                {

+                    goto EEMUMTSSVC_EXIT;

+                }

+                i++;

+            }

+            // mcc

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMUMTSSVC_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value4= (uint32)tmp_int;

+            // mnc

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMUMTSSVC_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value5= (uint32)tmp_int;

+            // lac

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMUMTSSVC_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value1 = (uint32)tmp_int;

+            // ci

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMUMTSSVC_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value2 = (uint32)tmp_int;

+

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMUMTSSVC_EXIT;

+            }

+            // cpi

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMUMTSSVC_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value6= (uint32)tmp_int;

+            /*

+            // Jump 2 integer.

+            i = 0;

+            while(i < 2) {

+                if (at_tok_nextint(&line, &tmp_int) < 0)

+                {

+                    goto EEMUMTSSVC_EXIT;

+                }

+                i++;

+            }

+            */

+            // arfcn

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                goto EEMUMTSSVC_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value3 = (uint32)tmp_int;

+

+            cell_info.cell_list.num++;

+EEMUMTSSVC_EXIT:

+            free(free_ptr);

+        }

+    }

+    /*

+    // index, cpichRSCP, utraRssi, cpichEcN0, sQual, sRxLev ,mcc, mnc, lac, ci, arfcn, psc

+    +EEMUMTSINTRA: 0, -32768, -1, -32768, -18, -115, 0, 0, 65534, 1, 10763, 32

+    */

+    else if(strStartsWith(s, "+EEMUMTSINTRA:")) // WCDMAÁÙ½üÐ¡Çø

+    {

+        // lac, ci, arfcn

+        if(cell_info.running) {

+            int tmp_int;

+            int i = 0;

+            char* tmp_s = memdup(s,strlen(s));

+            char* free_ptr = tmp_s;

+            char *line = tmp_s;

+            if (at_tok_start(&line) < 0)

+            {

+                goto EEMUMTSINTRA_EXIT;

+            }

+            // Jump 8 integer.

+            i = 0;

+            while(i < 8) {

+                if (at_tok_nextint(&line, &tmp_int) < 0)

+                {

+                    goto EEMUMTSINTRA_EXIT;

+                }

+                i++;

+            }

+

+            // lac

+            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int <= 0 || tmp_int >= 65536)

+            {

+                goto EEMUMTSINTRA_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value1 = (uint32)tmp_int;

+

+            // ci

+            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int <= 0 || tmp_int >= 65536)

+            {

+                goto EEMUMTSINTRA_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value2 = (uint32)tmp_int;

+

+            // arfcn

+            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int <= 0 || tmp_int >= 65536)

+            {

+                goto EEMUMTSINTRA_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value3 = (uint32)tmp_int;

+

+            cell_info.cell_list.num++;

+EEMUMTSINTRA_EXIT:

+            free(free_ptr);

+        }

+    }

+    /*

+    // index,gsmRssi,rxLev,C1,C2,mcc,mnc,lac,ci,arfcn,bsic

+    +EEMUMTSINTERRAT: 0, -32768, -107, -1, -1, 0, 0, 65534, 0, 117, 36

+    */

+    else if(strStartsWith(s, "+EEMUMTSINTERRAT:")) // WCDMA RATÐ¡ÇøÐÅÏ¢

+    {

+        // lac, ci, arfcn

+        if(cell_info.running) {

+            int tmp_int;

+            int i = 0;

+            char* tmp_s = memdup(s,strlen(s));

+            char* free_ptr = tmp_s;

+            char *line = tmp_s;

+            if (at_tok_start(&line) < 0)

+            {

+                goto EEMUMTSINTERRAT_EXIT;

+            }

+            // Jump 7 integer.

+            i = 0;

+            while(i < 7) {

+                if (at_tok_nextint(&line, &tmp_int) < 0)

+                {

+                    goto EEMUMTSINTERRAT_EXIT;

+                }

+                i++;

+            }

+

+            // lac

+            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int <= 0 || tmp_int >= 65536)

+            {

+                goto EEMUMTSINTERRAT_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value1 = (uint32)tmp_int;

+

+            // ci

+            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int <= 0 || tmp_int >= 65536)

+            {

+                goto EEMUMTSINTERRAT_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value2 = (uint32)tmp_int;

+

+            // arfcn

+            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int <= 0 || tmp_int >= 65536)

+            {

+                goto EEMUMTSINTERRAT_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value3 = (uint32)tmp_int;

+

+            cell_info.cell_list.num++;

+EEMUMTSINTERRAT_EXIT:

+            free(free_ptr);

+        }

+    }

+    // GSM

+    // +EEMGINFOBASIC: 2

+    // Do nothing.

+    else if(strStartsWith(s, "+EEMGINFOBASIC:")) // Basic information in GSM

+        // 0: ME in Idle mode   1: ME in Dedicated mode   2: ME in PS PTM mode

+    {

+        if(cell_info.running) {

+

+        }

+    }

+    /*

+    // mcc, mnc_len, mnc, lac, ci, nom, nco,

+    // bsic, C1, C2, TA, TxPwr,

+    // RxSig, RxSigFull, RxSigSub, RxQualFull, RxQualSub,

+    // ARFCB_tch, hopping_chnl, chnl_type, TS, PacketIdle, rac, arfcn,

+    // bs_pa_mfrms, C31, C32, t3212, t3312, pbcch_support, EDGE_support,

+    // ncc_permitted, rl_timeout, ho_count, ho_succ, chnl_access_count, chnl_access_succ_count,

+    // gsmBand,channelMode

+    +EEMGINFOSVC: 1120, 2, 0, 32784, 24741, 2, 0,

+    63, 36, 146, 1, 7,

+    46, 42, 42, 7, 0,

+    53, 0, 8, 0, 1, 6, 53,

+    2, 0, 146, 42, 54, 0, 1,

+    1, 32, 0, 0, 0, 0,

+    0, 0

+    */

+    else if(strStartsWith(s, "+EEMGINFOSVC:")) // GSM Server Cell

+    {

+        // lac, ci, arfcn, bsic

+        LOG("+EEMGINFOSVC: 1= %d\n.",cell_info.running);

+        if(cell_info.running) {

+            int tmp_int;

+            int i = 0;

+            char* tmp_s = memdup(s,strlen(s));

+            char* free_ptr = tmp_s;

+            char *line = tmp_s;

+            if (at_tok_start(&line) < 0)

+            {

+                goto EEMGINFOSVC_EXIT;

+            }

+

+            // mcc

+            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int <= 0 || tmp_int >= 65536)

+            {

+                goto EEMGINFOSVC_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value5 = (uint32)tmp_int;

+

+            //mnc_len

+            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int <= 0 || tmp_int >= 65536)

+            {

+                goto EEMGINFOSVC_EXIT;

+            }

+            // mnc

+            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int <= 0 || tmp_int >= 65536)

+            {

+                goto EEMGINFOSVC_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value6 = (uint32)tmp_int;

+

+            /*

+            // Jump 3 integer.

+            i = 0;

+            while(i < 3) {

+                if (at_tok_nextint(&line, &tmp_int) < 0)

+                {

+                    goto EEMGINFOSVC_EXIT;

+                }

+                i++;

+            }

+            */

+            // lac

+            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int < 0 || tmp_int >= 65536)

+            {

+                goto EEMGINFOSVC_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value1 = (uint32)tmp_int;

+

+            // ci

+            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int < 0 || tmp_int >= 65536)

+            {

+                goto EEMGINFOSVC_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value2 = (uint32)tmp_int;

+

+            // Jump 2 integer.

+            i = 0;

+            while(i < 2) {

+                if (at_tok_nextint(&line, &tmp_int) < 0)

+                {

+                    goto EEMGINFOSVC_EXIT;

+                }

+                i++;

+            }

+

+            // bsic

+            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int < 0 || tmp_int >= 65536)

+            {

+                goto EEMGINFOSVC_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value4 = (uint32)tmp_int;

+

+            // Jump 15 integer.

+            i = 0;

+            while(i < 15) {

+                if (at_tok_nextint(&line, &tmp_int) < 0)

+                {

+                    goto EEMGINFOSVC_EXIT;

+                }

+                i++;

+            }

+

+            // arfcn

+            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int < 0 || tmp_int >= 65536)

+            {

+                goto EEMGINFOSVC_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value3 = (uint32)tmp_int;

+

+            cell_info.cell_list.num++;

+EEMGINFOSVC_EXIT:

+            free(free_ptr);

+        }

+    }

+    /*

+    // PS_attached, attach_type, service_type, tx_power, c_value,

+    // ul_ts, dl_ts, ul_cs, dl_cs, ul_modulation, dl_modulation,

+    // gmsk_cv_bep, 8psk_cv_bep, gmsk_mean_bep, 8psk_mean_bep, EDGE_bep_period, single_gmm_rej_cause

+    // pdp_active_num, mac_mode, network_control, network_mode, EDGE_slq_measurement_mode, edge_status

+    +EEMGINFOPS: 1, 255, 0, 0, 0,

+    0, 0, 268435501, 1, 0, 0,

+    4, 0, 96, 0, 0, 0,

+    0, 0, 0, 65535, 0, 13350

+    */

+    // Do nothing.

+    else if(strStartsWith(s, "+EEMGINFOPS:")) // PSÐÅÏ¢

+    {

+        if(cell_info.running) {

+

+        }

+    }

+    else if(strStartsWith(s, "+EEMGINFONC:")) // cell

+    {

+        if(cell_info.running) {

+            int tmp_int;

+            int i = 0;

+            char* tmp_s = memdup(s,strlen(s));

+            char* free_ptr = tmp_s;

+            char *line = tmp_s;

+            if (at_tok_start(&line) < 0)

+            {

+                goto EEMGINFOPS_EXIT;

+            }

+

+            // nc_num

+            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int < 0 || tmp_int >= 65536)

+            {

+                LOG("cell_info.running 1= %d\n.",cell_info.running);

+                goto EEMGINFOPS_EXIT;

+            }

+            // mcc

+            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int < 0 || tmp_int >= 65536)

+            {

+                LOG("cell_info.running 2= %d\n.",cell_info.running);

+                goto EEMGINFOPS_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value5 = (uint32)tmp_int;

+

+            // mnc

+            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int < 0 || tmp_int >= 65536)

+            {

+                LOG("cell_info.running 3= %d\n.",cell_info.running);

+                goto EEMGINFOPS_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value6 = (uint32)tmp_int;

+

+            // lac

+            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int < 0 || tmp_int >= 65536)

+            {

+                LOG("cell_info.running 4= %d\n.",cell_info.running);

+                goto EEMGINFOPS_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value1 = (uint32)tmp_int;

+

+            // rac

+            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int < 0 || tmp_int >= 65536)

+            {

+                LOG("cell_info.running 5= %d\n.",cell_info.running);

+                goto EEMGINFOPS_EXIT;

+            }

+

+            // ci

+            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int < 0 || tmp_int >= 65536)

+            {

+                LOG("cell_info.running 6= %d\n.",cell_info.running);

+                goto EEMGINFOPS_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value2 = (uint32)tmp_int;

+

+            // rx_lv

+            if (at_tok_nextint(&line, &tmp_int) < 0)

+            {

+                LOG("cell_info.running 7= %d\n.",cell_info.running);

+                goto EEMGINFOPS_EXIT;

+            }

+

+            // bsic

+            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int < 0 || tmp_int >= 65536)

+            {

+                LOG("cell_info.running 8= %d\n.",cell_info.running);

+                goto EEMGINFOPS_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value4 = (uint32)tmp_int;

+

+            // Jump 2 integer.

+            i = 0;

+            while(i < 2) {

+                if (at_tok_nextint(&line, &tmp_int) < 0)

+                {

+                    LOG("cell_info.running 9= %d\n.",cell_info.running);

+                    goto EEMGINFOPS_EXIT;

+                }

+                i++;

+            }

+

+            // arfcn

+            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int < 0 || tmp_int >= 65536)

+            {

+                LOG("cell_info.running 10 = %d\n.",cell_info.running);

+                goto EEMGINFOPS_EXIT;

+            }

+            cell_info.cell_list.cell[cell_info.cell_list.num].value3 = (uint32)tmp_int;

+

+            cell_info.cell_list.num++;

+EEMGINFOPS_EXIT:

+            free(free_ptr);

+        }

+    } else {

+        LOGW("Unknown CELL URC : %s", s);

+    }

+}

+

 

 static void onUnsolicited(const char *s, const char *sms_pdu)

 {

     LOGD("URC : %s", s);

-#if 0

     // MBTK_AT_READY

     if (strStartsWith(s, "MBTK_AT_READY")) // AT ready.

     {

 

     }

+#if 0

     else if(strStartsWith(s, "*RADIOPOWER:")) // "*RADIOPOWER: 1"

     {

         const char* ptr = s + strlen("*RADIOPOWER:");

@@ -943,634 +1579,15 @@
         free(free_ptr);

     }

 #endif

-    /*

-    // <mcc>, <length of mnc>, <mnc>, <tac>, <PCI>, <dlEuarfcn>, < ulEuarfcn >, <band>, <dlBandwidth>,

-    // <rsrp>,<rsrq>, <sinr>,

-    // errcModeState,emmState,serviceState,IsSingleEmmRejectCause,EMMRejectCause,mmeGroupId,mmeCode,mTmsi,

-    // cellId,subFrameAssignType,specialSubframePatterns,transMode

-    // mainRsrp,diversityRsrp,mainRsrq,diversityRsrq,rssi,cqi,pathLoss,tb0DlTpt,tb1DlTpt,tb0DlPeakTpt,tb1DlPeakTpt,tb0UlPeakTpt,

-    // tb1UlPeakTpt,dlThroughPut,dlPeakThroughPut,averDlPRB,averCQITb0,averCQITb1,rankIndex,grantTotal,ulThroughPut,ulPeakThroughPut,currPuschTxPower,averUlPRB,

-    // dlBer, ulBer,

-    // diversitySinr, diversityRssi

-    +EEMLTESVC: 1120, 2, 0, 33584, 430, 40936, 40936, 41, 20,

-    0, 0, 0,

-    1, 10, 0, 1, 0, 1059, 78, 3959566565,

-    105149248, 2, 7, 7,

-    0, 0, 0, 0, 0, 0, 0, 1190919, 0, 0, 0, 16779777,

-    0, 5112867, 3959566565, 2, 0, 0, 0, 0, 0, 0, 0, 0,

-    0, 0,

-    7, 44

-    */

-    else if(strStartsWith(s, "+EEMLTESVC:"))   // LTE Server Cell

-    {

-        // tac, PCI, dlEuarfcn, ulEuarfcn, band

-        if(cell_info.running) {

-            int tmp_int;

-            int i = 0;

-            char* tmp_s = memdup(s,strlen(s));

-            char* free_ptr = tmp_s;

-            char *line = tmp_s;

-            if (at_tok_start(&line) < 0)

-            {

-                goto EEMLTESVC_EXIT;

-            }

 

-            if (at_tok_nextint(&line, &tmp_int) < 0)

-            {

-                goto EEMLTESVC_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value6 = (uint32)tmp_int;    //mcc

-            if (at_tok_nextint(&line, &tmp_int) < 0)

-            {

-                goto EEMLTESVC_EXIT;

-            }

-            if (at_tok_nextint(&line, &tmp_int) < 0)

-            {

-                goto EEMLTESVC_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value7 = (uint32)tmp_int;    //mnc

-            /*

-            // Jump 2 integer.

-            i = 0;

-            while(i < 2) {

-                if (at_tok_nextint(&line, &tmp_int) < 0)

-                {

-                    goto EEMLTESVC_EXIT;

-                }

-                i++;

-            }

-            */

-            if (at_tok_nextint(&line, &tmp_int) < 0)

-            {

-                goto EEMLTESVC_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value1 = (uint32)tmp_int;    //tac

-            if (at_tok_nextint(&line, &tmp_int) < 0)

-            {

-                goto EEMLTESVC_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value2 = (uint32)tmp_int;    //pci

-            if (at_tok_nextint(&line, &tmp_int) < 0)

-            {

-                goto EEMLTESVC_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value3 = (uint32)tmp_int;    //dl arfcn

-            if (at_tok_nextint(&line, &tmp_int) < 0)

-            {

-                goto EEMLTESVC_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value4 = (uint32)tmp_int;    //ul arfcn

-            if (at_tok_nextint(&line, &tmp_int) < 0)

-            {

-                goto EEMLTESVC_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value5 = (uint32)tmp_int;    //band

-            if (at_tok_nextint(&line, &tmp_int) < 0)

-            {

-                goto EEMLTESVC_EXIT;

-            }

-            if (at_tok_nextint(&line, &tmp_int) < 0)

-            {

-                goto EEMLTESVC_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value8 = (uint32)tmp_int;    //cid

-            if (at_tok_nextint(&line, &tmp_int) < 0)

-            {

-                goto EEMLTESVC_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value9 = (uint32)tmp_int;    //rsrp

-

-            for(i =0; i < 10; i++)

-            {

-                if (at_tok_nextint(&line, &tmp_int) < 0)

-                {

-                    goto EEMLTESVC_EXIT;

-                }

-            }

-			cell_info.cell[cell_info.cell_num].value10 = (uint32)tmp_int;   //cell identiy

-

-            cell_info.cell_num++;

-

-EEMLTESVC_EXIT:

-            free(free_ptr);

-        }

-    }

-    /*

-    // index,phyCellId,euArfcn,rsrp,rsrq

-    +EEMLTEINTER: 0, 65535, 38950, 0, 0

-    */

-    else if(strStartsWith(s, "+EEMLTEINTER:") || strStartsWith(s, "+EEMLTEINTRA:")) // LTE ÒìÆµ/Í¬ÆµÐ¡Çø

-    {

-        // phyCellId,euArfcn,rsrp,rsrq

-        if(cell_info.running) {

-            int tmp_int;

-            char* tmp_s = memdup(s,strlen(s));

-            char* free_ptr = tmp_s;

-            char *line = tmp_s;

-            if (at_tok_start(&line) < 0)

-            {

-                goto EEMLTEINTER_EXIT;

-            }

-            if (at_tok_nextint(&line, &tmp_int) < 0)

-            {

-                goto EEMLTEINTER_EXIT;

-            }

-            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int <= 0 || tmp_int > 503)

-            {

-                goto EEMLTEINTER_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value1 = (uint32)tmp_int;

-            if (at_tok_nextint(&line, &tmp_int) < 0)

-            {

-                goto EEMLTEINTER_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value2 = (uint32)tmp_int;

-            if (at_tok_nextint(&line, &tmp_int) < 0)

-            {

-                goto EEMLTEINTER_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value3 = (uint32)tmp_int;

-            LOG("cell line : %s", line);

-            if (at_tok_nextint(&line, &tmp_int) < 0)

-            {

-                goto EEMLTEINTER_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value4 = (uint32)tmp_int;

-            if (at_tok_nextint(&line, &tmp_int) < 0)

-            {

-                LOG("cell tmp_int : %d", tmp_int);

-                goto EEMLTEINTER_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value5 = (uint32)tmp_int;

-            LOG("cell value5 : %d", cell_info.cell[cell_info.cell_num].value5);

-            cell_info.cell_num++;

-EEMLTEINTER_EXIT:

-            free(free_ptr);

-        }

-    }

-    // Do nothing

-    else if(strStartsWith(s, "+EEMLTEINTERRAT:")) // LTE RATÐ¡ÇøÐÅÏ¢

-    {

-        if(cell_info.running) {

-

-        }

-    }

-    // WCDMA

-    /*

-    // Mode, sCMeasPresent, sCParamPresent, ueOpStatusPresent,

-

-    // if sCMeasPresent == 1

-    // cpichRSCP, utraRssi, cpichEcN0, sQual, sRxLev, txPower,

-    // endif

-

-    // if sCParamPresent == 1

-    // rac, nom, mcc, mnc_len, mnc, lac, ci,

-    // uraId, psc, arfcn, t3212, t3312, hcsUsed, attDetAllowed,

-    // csDrxCycleLen, psDrxCycleLen, utranDrxCycleLen, HSDPASupport, HSUPASupport,

-    // endif

-

-    // if ueOpStatusPresent == 1

-    // rrcState, numLinks, srncId, sRnti,

-    // algPresent, cipherAlg, cipherOn, algPresent, cipherAlg, cipherOn,

-    // HSDPAActive, HSUPAActive, MccLastRegisteredNetwork, MncLastRegisteredNetwork, TMSI, PTMSI, IsSingleMmRejectCause, IsSingleGmmRejectCause,

-    // MMRejectCause, GMMRejectCause, mmState, gmmState, gprsReadyState, readyTimerValueInSecs, NumActivePDPContext, ULThroughput, DLThroughput,

-    // serviceStatus, pmmState, LAU_status, LAU_count, RAU_status, RAU_count

-    // endif

-    //

-    +EEMUMTSSVC: 3, 1, 1, 1,

-    -80, 27, -6, -18, -115, -32768,

-    1, 1, 1120, 2, 1, 61697, 168432821,

-    15, 24, 10763, 0, 0, 0, 0,

-    128, 128, 65535, 0, 0,

-    2, 255, 65535, 4294967295,

-    0, 0, 0, 0, 0, 0,

-    0, 0, 0, 0, 0, 0, 1, 1,

-    28672, 28672, 0, 0, 0, 0, 0, 0, 0,

-    0, 0, 0, 0, 0, 0

-    */

-    else if(strStartsWith(s, "+EEMUMTSSVC:")) // WCDMA Server Cell

-    {

-        // lac, ci, arfcn

-        if(cell_info.running) {

-            int tmp_int;

-            int i = 0;

-            char* tmp_s = memdup(s,strlen(s));

-            char* free_ptr = tmp_s;

-            char *line = tmp_s;

-            if (at_tok_start(&line) < 0)

-            {

-                goto EEMUMTSSVC_EXIT;

-            }

-            // Jump 12 integer.

-            i = 0;

-            while(i < 12) {

-                if (at_tok_nextint(&line, &tmp_int) < 0)

-                {

-                    goto EEMUMTSSVC_EXIT;

-                }

-                i++;

-            }

-            // mcc

-            if (at_tok_nextint(&line, &tmp_int) < 0)

-            {

-                goto EEMUMTSSVC_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value4= (uint32)tmp_int;

-            // mnc

-            if (at_tok_nextint(&line, &tmp_int) < 0)

-            {

-                goto EEMUMTSSVC_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value5= (uint32)tmp_int;

-            // lac

-            if (at_tok_nextint(&line, &tmp_int) < 0)

-            {

-                goto EEMUMTSSVC_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value1 = (uint32)tmp_int;

-            // ci

-            if (at_tok_nextint(&line, &tmp_int) < 0)

-            {

-                goto EEMUMTSSVC_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value2 = (uint32)tmp_int;

-

-            if (at_tok_nextint(&line, &tmp_int) < 0)

-            {

-                goto EEMUMTSSVC_EXIT;

-            }

-            // cpi

-            if (at_tok_nextint(&line, &tmp_int) < 0)

-            {

-                goto EEMUMTSSVC_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value6= (uint32)tmp_int;

-            /*

-            // Jump 2 integer.

-            i = 0;

-            while(i < 2) {

-                if (at_tok_nextint(&line, &tmp_int) < 0)

-                {

-                    goto EEMUMTSSVC_EXIT;

-                }

-                i++;

-            }

-            */

-            // arfcn

-            if (at_tok_nextint(&line, &tmp_int) < 0)

-            {

-                goto EEMUMTSSVC_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value3 = (uint32)tmp_int;

-

-            cell_info.cell_num++;

-EEMUMTSSVC_EXIT:

-            free(free_ptr);

-        }

-    }

-    /*

-    // index, cpichRSCP, utraRssi, cpichEcN0, sQual, sRxLev ,mcc, mnc, lac, ci, arfcn, psc

-    +EEMUMTSINTRA: 0, -32768, -1, -32768, -18, -115, 0, 0, 65534, 1, 10763, 32

-    */

-    else if(strStartsWith(s, "+EEMUMTSINTRA:")) // WCDMAÁÙ½üÐ¡Çø

-    {

-        // lac, ci, arfcn

-        if(cell_info.running) {

-            int tmp_int;

-            int i = 0;

-            char* tmp_s = memdup(s,strlen(s));

-            char* free_ptr = tmp_s;

-            char *line = tmp_s;

-            if (at_tok_start(&line) < 0)

-            {

-                goto EEMUMTSINTRA_EXIT;

-            }

-            // Jump 8 integer.

-            i = 0;

-            while(i < 8) {

-                if (at_tok_nextint(&line, &tmp_int) < 0)

-                {

-                    goto EEMUMTSINTRA_EXIT;

-                }

-                i++;

-            }

-

-            // lac

-            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int <= 0 || tmp_int >= 65536)

-            {

-                goto EEMUMTSINTRA_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value1 = (uint32)tmp_int;

-

-            // ci

-            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int <= 0 || tmp_int >= 65536)

-            {

-                goto EEMUMTSINTRA_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value2 = (uint32)tmp_int;

-

-            // arfcn

-            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int <= 0 || tmp_int >= 65536)

-            {

-                goto EEMUMTSINTRA_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value3 = (uint32)tmp_int;

-

-            cell_info.cell_num++;

-EEMUMTSINTRA_EXIT:

-            free(free_ptr);

-        }

-    }

-    /*

-    // index,gsmRssi,rxLev,C1,C2,mcc,mnc,lac,ci,arfcn,bsic

-    +EEMUMTSINTERRAT: 0, -32768, -107, -1, -1, 0, 0, 65534, 0, 117, 36

-    */

-    else if(strStartsWith(s, "+EEMUMTSINTERRAT:")) // WCDMA RATÐ¡ÇøÐÅÏ¢

-    {

-        // lac, ci, arfcn

-        if(cell_info.running) {

-            int tmp_int;

-            int i = 0;

-            char* tmp_s = memdup(s,strlen(s));

-            char* free_ptr = tmp_s;

-            char *line = tmp_s;

-            if (at_tok_start(&line) < 0)

-            {

-                goto EEMUMTSINTERRAT_EXIT;

-            }

-            // Jump 7 integer.

-            i = 0;

-            while(i < 7) {

-                if (at_tok_nextint(&line, &tmp_int) < 0)

-                {

-                    goto EEMUMTSINTERRAT_EXIT;

-                }

-                i++;

-            }

-

-            // lac

-            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int <= 0 || tmp_int >= 65536)

-            {

-                goto EEMUMTSINTERRAT_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value1 = (uint32)tmp_int;

-

-            // ci

-            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int <= 0 || tmp_int >= 65536)

-            {

-                goto EEMUMTSINTERRAT_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value2 = (uint32)tmp_int;

-

-            // arfcn

-            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int <= 0 || tmp_int >= 65536)

-            {

-                goto EEMUMTSINTERRAT_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value3 = (uint32)tmp_int;

-

-            cell_info.cell_num++;

-EEMUMTSINTERRAT_EXIT:

-            free(free_ptr);

-        }

-    }

-    // GSM

-    // +EEMGINFOBASIC: 2

-    // Do nothing.

-    else if(strStartsWith(s, "+EEMGINFOBASIC:")) // Basic information in GSM

-        // 0: ME in Idle mode   1: ME in Dedicated mode   2: ME in PS PTM mode

-    {

-        if(cell_info.running) {

-

-        }

-    }

-    /*

-    // mcc, mnc_len, mnc, lac, ci, nom, nco,

-    // bsic, C1, C2, TA, TxPwr,

-    // RxSig, RxSigFull, RxSigSub, RxQualFull, RxQualSub,

-    // ARFCB_tch, hopping_chnl, chnl_type, TS, PacketIdle, rac, arfcn,

-    // bs_pa_mfrms, C31, C32, t3212, t3312, pbcch_support, EDGE_support,

-    // ncc_permitted, rl_timeout, ho_count, ho_succ, chnl_access_count, chnl_access_succ_count,

-    // gsmBand,channelMode

-    +EEMGINFOSVC: 1120, 2, 0, 32784, 24741, 2, 0,

-    63, 36, 146, 1, 7,

-    46, 42, 42, 7, 0,

-    53, 0, 8, 0, 1, 6, 53,

-    2, 0, 146, 42, 54, 0, 1,

-    1, 32, 0, 0, 0, 0,

-    0, 0

-    */

-    else if(strStartsWith(s, "+EEMGINFOSVC:")) // GSM Server Cell

-    {

-        // lac, ci, arfcn, bsic

-        LOG("+EEMGINFOSVC: 1= %d\n.",cell_info.running);

-        if(cell_info.running) {

-            int tmp_int;

-            int i = 0;

-            char* tmp_s = memdup(s,strlen(s));

-            char* free_ptr = tmp_s;

-            char *line = tmp_s;

-            if (at_tok_start(&line) < 0)

-            {

-                goto EEMGINFOSVC_EXIT;

-            }

-

-            // mcc

-            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int <= 0 || tmp_int >= 65536)

-            {

-                goto EEMGINFOSVC_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value5 = (uint32)tmp_int;

-

-            //mnc_len

-            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int <= 0 || tmp_int >= 65536)

-            {

-                goto EEMGINFOSVC_EXIT;

-            }

-            // mnc

-            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int <= 0 || tmp_int >= 65536)

-            {

-                goto EEMGINFOSVC_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value6 = (uint32)tmp_int;

-

-            /*

-            // Jump 3 integer.

-            i = 0;

-            while(i < 3) {

-                if (at_tok_nextint(&line, &tmp_int) < 0)

-                {

-                    goto EEMGINFOSVC_EXIT;

-                }

-                i++;

-            }

-            */

-            // lac

-            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int < 0 || tmp_int >= 65536)

-            {

-                goto EEMGINFOSVC_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value1 = (uint32)tmp_int;

-

-            // ci

-            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int < 0 || tmp_int >= 65536)

-            {

-                goto EEMGINFOSVC_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value2 = (uint32)tmp_int;

-

-            // Jump 2 integer.

-            i = 0;

-            while(i < 2) {

-                if (at_tok_nextint(&line, &tmp_int) < 0)

-                {

-                    goto EEMGINFOSVC_EXIT;

-                }

-                i++;

-            }

-

-            // bsic

-            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int < 0 || tmp_int >= 65536)

-            {

-                goto EEMGINFOSVC_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value4 = (uint32)tmp_int;

-

-            // Jump 15 integer.

-            i = 0;

-            while(i < 15) {

-                if (at_tok_nextint(&line, &tmp_int) < 0)

-                {

-                    goto EEMGINFOSVC_EXIT;

-                }

-                i++;

-            }

-

-            // arfcn

-            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int < 0 || tmp_int >= 65536)

-            {

-                goto EEMGINFOSVC_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value3 = (uint32)tmp_int;

-

-            cell_info.cell_num++;

-EEMGINFOSVC_EXIT:

-            free(free_ptr);

-        }

-    }

-    /*

-    // PS_attached, attach_type, service_type, tx_power, c_value,

-    // ul_ts, dl_ts, ul_cs, dl_cs, ul_modulation, dl_modulation,

-    // gmsk_cv_bep, 8psk_cv_bep, gmsk_mean_bep, 8psk_mean_bep, EDGE_bep_period, single_gmm_rej_cause

-    // pdp_active_num, mac_mode, network_control, network_mode, EDGE_slq_measurement_mode, edge_status

-    +EEMGINFOPS: 1, 255, 0, 0, 0,

-    0, 0, 268435501, 1, 0, 0,

-    4, 0, 96, 0, 0, 0,

-    0, 0, 0, 65535, 0, 13350

-    */

-    // Do nothing.

-    else if(strStartsWith(s, "+EEMGINFOPS:")) // PSÐÅÏ¢

-    {

-        if(cell_info.running) {

-

-        }

-    }

-    else if(strStartsWith(s, "+EEMGINFONC:")) // cell

-    {

-        if(cell_info.running) {

-            int tmp_int;

-            int i = 0;

-            char* tmp_s = memdup(s,strlen(s));

-            char* free_ptr = tmp_s;

-            char *line = tmp_s;

-            if (at_tok_start(&line) < 0)

-            {

-                goto EEMGINFOPS_EXIT;

-            }

-

-            // nc_num

-            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int < 0 || tmp_int >= 65536)

-            {

-                LOG("cell_info.running 1= %d\n.",cell_info.running);

-                goto EEMGINFOPS_EXIT;

-            }

-            // mcc

-            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int < 0 || tmp_int >= 65536)

-            {

-                LOG("cell_info.running 2= %d\n.",cell_info.running);

-                goto EEMGINFOPS_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value5 = (uint32)tmp_int;

-

-            // mnc

-            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int < 0 || tmp_int >= 65536)

-            {

-                LOG("cell_info.running 3= %d\n.",cell_info.running);

-                goto EEMGINFOPS_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value6 = (uint32)tmp_int;

-

-            // lac

-            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int < 0 || tmp_int >= 65536)

-            {

-                LOG("cell_info.running 4= %d\n.",cell_info.running);

-                goto EEMGINFOPS_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value1 = (uint32)tmp_int;

-

-            // rac

-            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int < 0 || tmp_int >= 65536)

-            {

-                LOG("cell_info.running 5= %d\n.",cell_info.running);

-                goto EEMGINFOPS_EXIT;

-            }

-

-            // ci

-            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int < 0 || tmp_int >= 65536)

-            {

-                LOG("cell_info.running 6= %d\n.",cell_info.running);

-                goto EEMGINFOPS_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value2 = (uint32)tmp_int;

-

-            // rx_lv

-            if (at_tok_nextint(&line, &tmp_int) < 0)

-            {

-                LOG("cell_info.running 7= %d\n.",cell_info.running);

-                goto EEMGINFOPS_EXIT;

-            }

-

-            // bsic

-            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int < 0 || tmp_int >= 65536)

-            {

-                LOG("cell_info.running 8= %d\n.",cell_info.running);

-                goto EEMGINFOPS_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value4 = (uint32)tmp_int;

-

-            // Jump 2 integer.

-            i = 0;

-            while(i < 2) {

-                if (at_tok_nextint(&line, &tmp_int) < 0)

-                {

-                    LOG("cell_info.running 9= %d\n.",cell_info.running);

-                    goto EEMGINFOPS_EXIT;

-                }

-                i++;

-            }

-

-            // arfcn

-            if (at_tok_nextint(&line, &tmp_int) < 0 || tmp_int < 0 || tmp_int >= 65536)

-            {

-                LOG("cell_info.running 10 = %d\n.",cell_info.running);

-                goto EEMGINFOPS_EXIT;

-            }

-            cell_info.cell[cell_info.cell_num].value3 = (uint32)tmp_int;

-

-            cell_info.cell_num++;

-EEMGINFOPS_EXIT:

-            free(free_ptr);

-        }

+#endif

+    else if(strStartsWith(s, "+EEMLTESVC:") || strStartsWith(s, "+EEMLTEINTER:")

+        || strStartsWith(s, "+EEMLTEINTRA:") || strStartsWith(s, "+EEMLTEINTERRAT:")

+        || strStartsWith(s, "+EEMUMTSSVC:") || strStartsWith(s, "+EEMUMTSINTRA:")

+        || strStartsWith(s, "+EEMUMTSINTERRAT:") || strStartsWith(s, "+EEMGINFOBASIC:")

+        || strStartsWith(s, "+EEMGINFOSVC:") || strStartsWith(s, "+EEMGINFOPS:")

+        || strStartsWith(s, "+EEMGINFONC:")) {

+        urc_cell_process(s, sms_pdu);

     }

     else if(strStartsWith(s, "+ZGIPDNS:")) // +ZGIPDNS: 1,"IPV4V6","10.156.239.245","10.156.239.246","223.87.253.100","223.87.253.253","fe80:0000:0000:0000:0001:0001:9b8c:7c0c","fe80::1:1:9b8c:7c0d","2409:8062:2000:2::1","2409:8062:2000:2::2"

     {

@@ -1580,7 +1597,6 @@
     {

         LOGV("Unknown URC : %s", s);

     }

-#endif

 }

 

 static int openSocket(const char* sockname)

@@ -1626,7 +1642,7 @@
     if(ril_info.sim_state == MBTK_SIM_STATE_READY)

     {
         LOGD("SIM READY!");
-        at_send_command("AT+COPS=3", NULL);
+        at_send_command("AT+COPS=3", NULL);

 

         // Set APN from prop.

         apn_auto_conf_from_prop();