[Feature][ZXW-228]add at cmd for status&net led
Only Configure:No,
Affected branch:master,
Affected module:led
Is it affected on both ZXIC and MTK:only ZXIC,
Self-test:Yes,
Doc Update:NO.
Change-Id: I9cbf234dfca499039871dfd3d8c813e7b328947b
diff --git a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-at-common/liblynq-at-common.bb b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-at-common/liblynq-at-common.bb
index f50d299..70f1504 100755
--- a/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-at-common/liblynq-at-common.bb
+++ b/cap/zx297520v3/sources/meta-zxic-custom/recipes-lynq/liblynq-at-common/liblynq-at-common.bb
@@ -3,7 +3,7 @@
DESCRIPTION = "liblynq-at-common"
LICENSE = "CLOSED"
LIC_FILES_CHKSUM = "file://LICENSE;md5=3f86c7f456a6d0bbeca155e65084eee1"
-DEPENDS += "liblynq-log liblynq-qser-autosuspend"
+DEPENDS += "liblynq-log liblynq-qser-autosuspend liblynq-led"
#inherit workonsrc
WORKONSRC = "${TOPDIR}/../src/lynq/lib/liblynq-at-common/"
FILESEXTRAPATHS_prepend :="${TOPDIR}/../src/lynq/lib/:"
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 1fa3af5..3ec11c8 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,7 +10,7 @@
/>
<module name="/lib/liblynq-at-common.so"
register="lynq_register_at_common"
- cmd="AT+MNETCALL;AT+GTARNDIS;AT+CGIR;AT+LGMDS;AT+LRNDISHANDLE;AT+LEELSP"
+ cmd="AT+MNETCALL;AT+GTARNDIS;AT+CGIR;AT+LGMDS;AT+LRNDISHANDLE;AT+LEELSP;AT+NETLED;AT+STATUSLED"
/>
<module name="/lib/liblynq-at-factory.so"
register="lynq_register_at_factory"
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 ea38faf..391d43c 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
@@ -7,6 +7,7 @@
#include <liblog/lynq_deflog.h>
#include "include/liblynq-at-common.h"
#include <include/lynq-qser-autosuspend.h>
+#include <libled/lynq_led.h>
DEFINE_LYNQ_LIB_LOG(LYNQ_AT_COMMON)
@@ -67,10 +68,54 @@
return;
}
+void lynq_handle_netled(char* input)
+{
+ int ret;
+ char buf[64] = {0};
+ int mode = input[strlen(input)-1]-'0';
+ ALOGE("lynq_handle_netled start\n");
+
+ ret = lynq_set_netled_on(mode);
+ if(ret != 0)
+ {
+ sprintf(buf,"+CME ERROR: 100\r\n");
+ handle_output(buf, strlen(buf), Response);
+ }
+ else
+ {
+ lynq_response_ok();
+ }
+
+ return;
+}
+
+void lynq_handle_statusled(char* input)
+{
+ int ret;
+ char buf[64] = {0};
+ int mode = input[strlen(input)-1]-'0';
+
+ ALOGE("lynq_handle_statusled start\n");
+ ret = lynq_set_statusled_on(mode);
+
+ 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},
+ {"NETLED",lynq_handle_netled},
+ {"STATUSLED",lynq_handle_statusled},
{NULL, NULL}
};
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-at-common/makefile b/cap/zx297520v3/src/lynq/lib/liblynq-at-common/makefile
index e5a1c20..869f980 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-at-common/makefile
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-at-common/makefile
@@ -38,6 +38,8 @@
-lpthread \
-llynq-log \
-llynq-qser-autosuspend \
+ -llynq-led \
+
SOURCES = $(wildcard *.cpp)