add S300AI
Change-Id: Ice89434e8dc7b3be506380729d716f50aa75df14
diff --git a/lynq/S300AI/ap/app/at_tool/at_tool.c b/lynq/S300AI/ap/app/at_tool/at_tool.c
new file mode 100755
index 0000000..109722a
--- /dev/null
+++ b/lynq/S300AI/ap/app/at_tool/at_tool.c
@@ -0,0 +1,41 @@
+#include "at_tool.h"
+
+static void at_progess(int argc, char *argv[])
+{
+ int ret = -1;
+ char send_at_buf[128] = {0};
+ char *pstr = malloc(128);
+ memset(pstr, 0, 128);
+
+ if(argv[1] != NULL && strlen(argv[1]) >= 2 && strncasecmp(argv[1], "at", 2) == 0)
+ {
+ sprintf(send_at_buf, "%s\r", argv[1]);
+ ret = get_modem_info(send_at_buf, "%s", (void**)&pstr);
+
+ if(0 == ret)
+ {
+ printf("%s\n", pstr);
+ }
+ else
+ {
+ printf("AT command error\n");
+ }
+ }
+ else
+ {
+ printf("not a valid AT command: error\n");
+ }
+
+ free(pstr);
+ return;
+}
+
+int main(int argc, char *argv[])
+{
+ if(argc > 1)
+ {
+ at_progess(argc, argv);
+ }
+
+ return 0;
+}