add S300AI
Change-Id: Ice89434e8dc7b3be506380729d716f50aa75df14
diff --git a/lynq/S300AI/ap/app/at_tool/Makefile b/lynq/S300AI/ap/app/at_tool/Makefile
new file mode 100755
index 0000000..4f10e41
--- /dev/null
+++ b/lynq/S300AI/ap/app/at_tool/Makefile
@@ -0,0 +1,58 @@
+#*******************************************************************************
+# include ZTE application makefile
+#*******************************************************************************
+include $(zte_app_mak)
+include $(COMMON_MK)
+
+CPU_PUB_ROOT=$(TOPDIR_AP)/../pub
+##############USER COMIZE BEGIN################
+EXEC = at
+OBJS = at_tool.o
+
+#*******************************************************************************
+# include path
+#*******************************************************************************
+CFLAGS += -I./
+CFLAGS += -I../include
+CFLAGS += -I../zte_comm/nvserver
+CFLAGS += -I$(LIB_DIR)/libnvram
+CFLAGS += -I$(APP_DIR)/include
+CFLAGS += -g -Werror=implicit-function-declaration
+
+CFLAGS += -I$(zte_app_path)/include
+CFLAGS += -I$(zte_lib_path)/libnvram
+CFLAGS += -I$(LINUX_DIR)
+CFLAGS += -I$(CPU_PUB_ROOT)/project/zx297520v3/include/nv
+CFLAGS += -O -Dlinux=1 -DHIGH_SPEED=1
+
+CFLAGS += -I$(zte_lib_path)/libsoftap
+CFLAGS += -I$(zte_lib_path)/libsoft_timer
+
+#*******************************************************************************
+# library
+#*******************************************************************************
+LDLIBS += -lnvram -L$(zte_lib_path)/libnvram -lpthread
+ifeq ($(LINUX_TYPE),uClinux)
+LDFLAGS += -Wl,--allow-multiple-definition,-elf2flt=-s131072
+endif
+
+LDLIBS += -latutils -L$(zte_lib_path)/libatutils
+LDLIBS += -lsoftap -L$(zte_lib_path)/libsoftap
+LDLIBS += -lsoft_timer -L$(zte_lib_path)/libsoft_timer
+
+##############USER COMIZE END##################
+
+all: $(EXEC)
+
+$(EXEC): $(OBJS)
+ $(CC) $(LDFLAGS) -o $@ $(OBJS) -Wl,--start-group $(LDLIBS) -Wl,--end-group
+ @cp $@ $@.elf
+
+
+romfs:
+ $(ROMFSINST) /sbin/$(EXEC)
+
+clean:
+ -rm -f $(EXEC) *.elf *.gdb *.o
+
+
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;
+}
diff --git a/lynq/S300AI/ap/app/at_tool/at_tool.h b/lynq/S300AI/ap/app/at_tool/at_tool.h
new file mode 100755
index 0000000..a781c51
--- /dev/null
+++ b/lynq/S300AI/ap/app/at_tool/at_tool.h
@@ -0,0 +1,7 @@
+#ifndef __AT_TOOL_H__
+#define __AT_TOOL_H__
+
+#include <stdio.h>
+#include "softap_api.h"
+
+#endif