summaryrefslogtreecommitdiff
path: root/src/atcmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/atcmd.c')
-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) {