summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2019-06-18 17:22:51 +0300
committerSerhii Kostiuk <serhii.o.kostiuk@globallogic.com>2019-06-18 17:42:20 +0300
commit63db795dce4e752d0d36a48faf1652f650dfb240 (patch)
tree3bd23c406c6fe0059e40fb12e2501bf0b37ba80e /src
parenta1727baa9c57466517e76b635e7c27bf177acda2 (diff)
downloadsms-utils-63db795dce4e752d0d36a48faf1652f650dfb240.tar.gz
sms-utils-63db795dce4e752d0d36a48faf1652f650dfb240.tar.bz2
sms-utils-63db795dce4e752d0d36a48faf1652f650dfb240.zip
[MTR-MTQ] Quectel support for sms-utils
Added support of Quectel-specific commands into the "atcmd_plus_iccid_read()" function
Diffstat (limited to 'src')
-rw-r--r--src/atcmd.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/atcmd.c b/src/atcmd.c
index 9e230c5..694782d 100644
--- a/src/atcmd.c
+++ b/src/atcmd.c
@@ -1294,8 +1294,18 @@ int atcmd_plus_iccid_read(int fd)
char *save;
char *token;
int tmp;
+ char* command;
- atcmd_writeline(fd, "AT#CCID");
+ if (is_telit_model()) {
+ command = "AT#CCID";
+ } else if (is_quectel_model()) {
+ command = "AT+QCCID";
+ } else {
+ log_error("unsupported modem manufacturer, unable to detect ICCID");
+ return -1;
+ }
+
+ atcmd_writeline(fd, command);
//Swallow extra "\r\n"
tmp = atcmd_readline(fd, buf, sizeof(buf));
if (tmp <= 0) {