Add DS support.
Change-Id: Ib8bc4e171dd5ca526f8e151ff3d467097582a8cb
diff --git a/mbtk/mbtk_utils/at.c b/mbtk/mbtk_utils/at.c
index 1e8f91b..a776aba 100755
--- a/mbtk/mbtk_utils/at.c
+++ b/mbtk/mbtk_utils/at.c
@@ -477,6 +477,7 @@
char *at_cmd = NULL;
bool echo = FALSE;
+ char *dev = NULL;
if(argc == 1) {
at_mode = AT_MODE_SOCK_1;
} else if(argc == 2) {
@@ -485,6 +486,9 @@
at_cmd = argv[1];
} else if(!strncasecmp(argv[1], "/dev/", 5)) {
at_mode = AT_MODE_DEV_1;
+ } else if(!strncasecmp(argv[1], "/tmp/", 5)) {
+ at_mode = AT_MODE_SOCK_1;
+ dev = argv[1];
} else {
help();
return -1;
@@ -522,7 +526,11 @@
#endif
if(at_mode == AT_MODE_SOCK_1 || at_mode == AT_MODE_SOCK_2) {
- at_fd = openSocket("/tmp/atcmdmbtk");
+ if(dev == NULL) {
+ at_fd = openSocket("/tmp/atcmdmbtk");
+ } else {
+ at_fd = openSocket(dev);
+ }
} else {
#if 0
at_fd = at_open(argv[1]);