[Feature][ZXW-195][AT]add autosuspend AT
Only Configure: No
Affected branch: master
Affected module: AT
Is it affected on both ZXIC and MTK: only ZXIC
Self-test: Yes
Doc Update: Yes
Change-Id: I8212144cab698dd5470cabefe11b0a7347e870a7
diff --git a/cap/zx297520v3/src/lynq/framework/lynq-atcid/lynq_atsvc_plugin.xml b/cap/zx297520v3/src/lynq/framework/lynq-atcid/lynq_atsvc_plugin.xml
index b6fb1a4..1fa3af5 100755
--- a/cap/zx297520v3/src/lynq/framework/lynq-atcid/lynq_atsvc_plugin.xml
+++ b/cap/zx297520v3/src/lynq/framework/lynq-atcid/lynq_atsvc_plugin.xml
@@ -10,10 +10,10 @@
/>
<module name="/lib/liblynq-at-common.so"
register="lynq_register_at_common"
- cmd="AT+MNETCALL;AT+GTARNDIS;AT+CGIR;AT+LGMDS;AT+LRNDISHANDLE"
+ cmd="AT+MNETCALL;AT+GTARNDIS;AT+CGIR;AT+LGMDS;AT+LRNDISHANDLE;AT+LEELSP"
/>
<module name="/lib/liblynq-at-factory.so"
register="lynq_register_at_factory"
cmd="AT+LYNQFACTORY"
/>
-</lynq_atsvc_plugin>
\ No newline at end of file
+</lynq_atsvc_plugin>
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-at-common/liblynq-at-common.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-at-common/liblynq-at-common.cpp
index ccb8eaa..c8acceb 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-at-common/liblynq-at-common.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-at-common/liblynq-at-common.cpp
@@ -6,6 +6,7 @@
#include <errno.h>
#include <liblog/lynq_deflog.h>
#include "include/liblynq-at-common.h"
+#include <include/lynq-qser-autosuspend.h>
DEFINE_LYNQ_LIB_LOG(LYNQ_AT_COMMON)
@@ -44,9 +45,31 @@
return;
}
-static Command commands[] =
+void lynq_handle_autosuspend(char* input)
+{
+ int len;
+ int ret;
+ char buf[64] = {0};
+ ALOGE("lynq_handle_autosuspend start\n");
+ len = strlen(input);
+ ret = qser_autosuspend_enable(input[len-1]);
+ if(ret != 0)
+ {
+ sprintf(buf,"+CME ERROR: 100\r\n");
+ handle_output(buf, strlen(buf), Response);
+ }
+ else
+ {
+ lynq_response_ok();
+ }
+
+ return;
+}
+
+static Command commands[] =
{
{"CGIR",lynq_handle_version},
+ {"LEELSP",lynq_handle_autosuspend},
{NULL, NULL}
};
@@ -102,4 +125,4 @@
ALOGD("function %s line %d\n", __FUNCTION__, __LINE__);
return lynq_at_common_cb;
}
-}
\ No newline at end of file
+}
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-at-common/makefile b/cap/zx297520v3/src/lynq/lib/liblynq-at-common/makefile
index 2cfedec..e5a1c20 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-at-common/makefile
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-at-common/makefile
@@ -37,6 +37,7 @@
-lbinder \
-lpthread \
-llynq-log \
+ -llynq-qser-autosuspend \
SOURCES = $(wildcard *.cpp)