diff --git a/mbtk/mbtk_rild/src/main.c b/mbtk/mbtk_rild/src/main.c
index 22e739c..a527ed1 100755
--- a/mbtk/mbtk_rild/src/main.c
+++ b/mbtk/mbtk_rild/src/main.c
@@ -217,9 +217,9 @@
             cgact_wait.waitting = false;
         }
 
-        uint8 data_pdp;
-        data_pdp = 1;       //
-        urc_msg_distribute(false, INFO_URC_MSG_PDP_STATE, &data_pdp, sizeof(uint8));
+        //uint8 data_pdp;
+        //data_pdp = 1;       //
+        //urc_msg_distribute(false, INFO_URC_MSG_PDP_STATE, &data_pdp, sizeof(uint8));
     }
     // +CGEV:
     // +CGEV: NW DEACT <cid>,<cid>
@@ -240,14 +240,23 @@
     // +CGEV: NW REATTACH
     else if(strStartsWith(s, "+CGEV:"))
     {
-        if(at_process && !at_cfun_command) {
-            if(cgact_wait.act) {
-                if(strStartsWith(s, "+CGEV: ME PDN ACT ")) { // +CGEV: ME PDN ACT 15,4
-                    if(cgact_wait.cid == atoi(s + 18)) {
+        if(at_process && !at_cfun_command)
+        {
+            mbtk_pdp_cb_info_s pdp_cb_info;
+            memset(&pdp_cb_info, 0x00, sizeof(mbtk_pdp_cb_info_s));
+            pdp_cb_info.auto_urc = false;
+            if(cgact_wait.act)
+            {
+                if(strStartsWith(s, "+CGEV: ME PDN ACT ")) // +CGEV: ME PDN ACT 15,4
+                {
+                    if(cgact_wait.cid == atoi(s + 18))
+                    {
                         cgact_wait.waitting = false;
                     }
 
-                    uint8 data_pdp;
+                    pdp_cb_info.cid = atoi(s + 18);
+                    pdp_cb_info.connect_state = true;
+#if 0
                     char* tmp_s = memdup(s + 18,strlen(s + 18));
                     char* free_ptr = tmp_s;
                     char *line = tmp_s;
@@ -264,10 +273,10 @@
                     {
                         goto at_PDP_CREG_EXIT;
                     }
-                    data_pdp = tmp_int;
+                    pdp_cb_info.pdp_result = tmp_int;
 at_PDP_CREG_EXIT:
                     free(free_ptr);
-
+                    free_ptr = NULL;
                     //data_pdp = (uint8)atoi(s + 20);  //reason
                     if(cgact_wait.cid >= 1 && cgact_wait.cid < 8)
                     {
@@ -302,71 +311,69 @@
                             urc_msg_distribute(true, INFO_URC_MSG_PDP_STATE, &data_pdp, sizeof(uint8));
                         }
                     }
-                } else if(strStartsWith(s, "+CGEV: NW MODIFY ")) { // +CGEV: NW MODIFY 1,4
-                    if(cgact_wait.cid == atoi(s + 17)) {
-                        cgact_wait.waitting = false;
-                    }
+#endif
+                    urc_msg_distribute(true, INFO_URC_MSG_PDP_STATE, &pdp_cb_info, sizeof(mbtk_pdp_cb_info_s));
                 }
-            } else {
-                if(strStartsWith(s, "+CGEV: ME PDN DEACT ")) { // +CGEV: ME PDN DEACT 1
-                    if(cgact_wait.cid == atoi(s + 20)) {
+                else if(strStartsWith(s, "+CGEV: NW MODIFY ")) // +CGEV: NW MODIFY 1,4
+                { 
+                    if(cgact_wait.cid == atoi(s + 17))
+                    {
                         cgact_wait.waitting = false;
                     }
-                    uint8 data_pdp;
-                    data_pdp = 0;       //
-                    urc_msg_distribute(false, INFO_URC_MSG_PDP_STATE, &data_pdp, sizeof(uint8));
-                    if(cgact_wait.cid != 0)
+                    
+                    pdp_cb_info.cid = atoi(s + 17);
+                    pdp_cb_info.connect_state = true;
+                    //urc_msg_distribute(true, INFO_URC_MSG_PDP_STATE, &pdp_cb_info, sizeof(mbtk_pdp_cb_info_s));
+                }
+            } 
+            else
+            {
+                if(strStartsWith(s, "+CGEV: ME PDN DEACT ")) // +CGEV: ME PDN DEACT 1
+                {
+                    if(cgact_wait.cid == atoi(s + 20))
                     {
-                        data_pdp = cgact_wait.cid + 100;
-                        urc_msg_distribute(false, INFO_URC_MSG_PDP_STATE, &data_pdp, sizeof(uint8));
+                        cgact_wait.waitting = false;
                     }
+                    
+                    pdp_cb_info.cid = atoi(s + 20);
+                    pdp_cb_info.connect_state = false;
+                    urc_msg_distribute(false, INFO_URC_MSG_PDP_STATE, &pdp_cb_info, sizeof(mbtk_pdp_cb_info_s));
                 }
             }
-        } else {
-            // apn_state_set
-
+        } 
+        else
+        {
             // +CGEV: NW PDN DEACT <cid>
-
             // +CGEV: EPS PDN ACT 1
             // +CGEV: ME PDN ACT 8,1
-
             // +CGEV: ME PDN ACT 2,4
-            uint8 data[2] = {0xFF};
-            if(strStartsWith(s, "+CGEV: NW PDN DEACT ")) { // +CGEV: NW PDN DEACT <cid>
-                //apn_state_set(atoi(s + 20), false);
-                data[0] = (uint8)0;
-                data[1] = (uint8)atoi(s + 20);
+            mbtk_pdp_cb_info_s pdp_cb_info;
+            memset(&pdp_cb_info, 0x00, sizeof(mbtk_pdp_cb_info_s));
+            pdp_cb_info.auto_urc = true;
+            if(strStartsWith(s, "+CGEV: NW PDN DEACT ")) // +CGEV: NW PDN DEACT <cid>
+            { 
+                pdp_cb_info.cid = (uint8)atoi(s + 20);
+                pdp_cb_info.connect_state = false;
+                urc_msg_distribute(true, INFO_URC_MSG_CGEV, &pdp_cb_info, sizeof(mbtk_pdp_cb_info_s));
+            }
+            else if(strStartsWith(s, "+CGEV: EPS PDN ACT ")) // +CGEV: EPS PDN ACT <cid>
+            { 
+                pdp_cb_info.cid = (uint8)atoi(s + 19);
+                pdp_cb_info.connect_state = true;
+            }
+            else if(strStartsWith(s, "+CGEV: ME PDN DEACT ")) // +CGEV: EPS PDN DEACT <cid>
+            {
+                pdp_cb_info.cid = (uint8)atoi(s + 20);
+                pdp_cb_info.connect_state = false;
+                urc_msg_distribute(true, INFO_URC_MSG_CGEV, &pdp_cb_info, sizeof(mbtk_pdp_cb_info_s));
+            }
+            else if(strStartsWith(s, "+CGEV: ME PDN ACT ")) // +CGEV: ME PDN ACT <cid>,1
+            {
+                pdp_cb_info.cid = (uint8)atoi(s + 18);
+                pdp_cb_info.connect_state = true;
+                //urc_msg_distribute(true, INFO_URC_MSG_PDP_STATE, &pdp_cb_info, sizeof(mbtk_pdp_cb_info_s));
 
-                uint8 data_pdp;
-                data_pdp = 0;       //
-                urc_msg_distribute(false, INFO_URC_MSG_PDP_STATE, &data_pdp, sizeof(uint8));
-                data_pdp = data[1] + 100;
-                urc_msg_distribute(false, INFO_URC_MSG_PDP_STATE, &data_pdp, sizeof(uint8));
-            } else if(strStartsWith(s, "+CGEV: EPS PDN ACT ")) { // +CGEV: EPS PDN ACT <cid>
-                //apn_state_set(atoi(s + 19), true);
-#if (defined(MBTK_AF_SUPPORT) || defined(MBTK_ALL_CID_SUPPORT))
-				//data[0] = (uint8)1;
-                //data[1] = (uint8)atoi(s + 19);
-#else
-                data[0] = (uint8)1;
-                data[1] = (uint8)atoi(s + 19);
-#endif
-            } else if(strStartsWith(s, "+CGEV: ME PDN DEACT ")) { // +CGEV: EPS PDN DEACT <cid>
-                //apn_state_set(atoi(s + 19), true);
-                data[0] = (uint8)0;
-                data[1] = (uint8)atoi(s + 20);
-
-                uint8 data_pdp;
-                data_pdp = 0;       //
-                urc_msg_distribute(false, INFO_URC_MSG_PDP_STATE, &data_pdp, sizeof(uint8));
-                data_pdp = data[1] + 100;
-                urc_msg_distribute(false, INFO_URC_MSG_PDP_STATE, &data_pdp, sizeof(uint8));
-            } else if(strStartsWith(s, "+CGEV: ME PDN ACT ")) { // +CGEV: ME PDN ACT <cid>,1
-                //apn_state_set(atoi(s + 18), true);
-                data[0] = (uint8)1;
-                data[1] = (uint8)atoi(s + 18);
-
-                uint8 data_pdp;
+#if 0
                 char* tmp_s = memdup(s + 18,strlen(s + 18));
                 char* free_ptr = tmp_s;
                 char *line = tmp_s;
@@ -413,16 +420,19 @@
                     {
 
                     }
-
                     data_pdp = data[1] + 200;
                     urc_msg_distribute(true, INFO_URC_MSG_PDP_STATE, &data_pdp, sizeof(uint8));
 					data[1] = 0;
                 }
-            } else {
+#endif
+
+            } 
+            else
+            {
                 LOGI("No process : %s", s);
             }
 
-			urc_msg_distribute(true, INFO_URC_MSG_CGEV, data, sizeof(uint8) * 2);
+			//urc_msg_distribute(true, INFO_URC_MSG_CGEV, data, sizeof(uint8) * 2);
         }
     }
     // +CREG: 1, "8010", "000060a5", 0, 2, 0
@@ -520,12 +530,14 @@
         } else {
             data[2] = (uint8)0xFF; // AcT
         }
+#if 0
         if(data[1] == 5)
         {
             uint8 data_pdp;
             data_pdp = 5;       //
             urc_msg_distribute(false, INFO_URC_MSG_PDP_STATE, &data_pdp, sizeof(uint8));
         }
+#endif
         urc_msg_distribute(false, INFO_URC_MSG_NET_CS_REG_STATE, data, sizeof(data));
         urc_msg_distribute(true, INFO_URC_MSG_NET_STATE_LOG, NULL, 0);
 CREG_EXIT:
@@ -686,12 +698,14 @@
             sim_info_reg.sim = 0;
         else if(strStartsWith(s, "*SIMDETEC:1,SIM"))
             sim_info_reg.sim = 1;
+#if 0
         if(sim_info_reg.sim == 0)
         {
             uint8 data_pdp;
             data_pdp = 11;       //
             urc_msg_distribute(false, INFO_URC_MSG_PDP_STATE, &data_pdp, sizeof(uint8));
         }
+#endif
         urc_msg_distribute(false, INFO_URC_MSG_SIM_STATE, &sim_info_reg, sizeof(mbtk_sim_card_info));
     }
     // *EUICC:1
@@ -814,14 +828,14 @@
         }
         else
             sim_info_reg.sim = 20;
-
+#if 0
         if(sim_info_reg.sim == 18)
         {
             uint8 data_pdp;
             data_pdp = 11;       //
             urc_msg_distribute(false, INFO_URC_MSG_PDP_STATE, &data_pdp, sizeof(uint8));
         }
-
+#endif
         urc_msg_distribute(false, INFO_URC_MSG_SIM_STATE, &sim_info_reg, sizeof(mbtk_sim_card_info));
     }
     // +CMT: ,23
