Fix net state ind.
Change-Id: Ifecc16e565a5d8dabee58f2e131319514c09c522
diff --git a/mbtk/mbtk_ril/src/main.c b/mbtk/mbtk_ril/src/main.c
index abb575e..4ed52ce 100755
--- a/mbtk/mbtk_ril/src/main.c
+++ b/mbtk/mbtk_ril/src/main.c
@@ -389,7 +389,7 @@
{
}
-
+
data_pdp = data[1] + 200;
urc_msg_distribute(false, INFO_URC_MSG_PDP_STATE, &data_pdp, sizeof(uint8));
}
@@ -412,9 +412,16 @@
char* tmp_s = s + 7;
while(*tmp_s && *tmp_s == ' ')
tmp_s++;
- uint8 data = (uint8)atoi(tmp_s); // Reg State.
+ uint8 data[2];
+ data[0] = (uint8)atoi(tmp_s); // Reg State.
- urc_msg_distribute(true, INFO_URC_MSG_NET_PS_REG_STATE, &data, sizeof(uint8));
+ if(strStartsWith(s, "+CGREG:")) {
+ data[1] = 0; // GMS/WCDMA
+ } else {
+ data[1] = 1; // LTE
+ }
+
+ urc_msg_distribute(true, INFO_URC_MSG_NET_PS_REG_STATE, data, sizeof(data));
}
// +CREG: 1, "8010", "000060a5", 0, 2, 0
// +CREG: 1, "8330", "06447347", 7, 2, 0