diff options
author | Jeff Hatch <jhatch@multitech.com> | 2020-06-30 08:41:14 -0500 |
---|---|---|
committer | Jeff Hatch <jhatch@multitech.com> | 2020-06-30 08:41:14 -0500 |
commit | 5246748a8e5119dbca894e1eec3054a33acdc1c4 (patch) | |
tree | 2ad2da8b9405314d31f83432bb9a4294623ad84d /src/atcmd.c | |
parent | c7a9553edb425f8ab6c83098e8a872b79629e7f9 (diff) | |
parent | 4b5c22b5d658982952e0d5c8f00ddbcff9751727 (diff) | |
download | sms-utils-5246748a8e5119dbca894e1eec3054a33acdc1c4.tar.gz sms-utils-5246748a8e5119dbca894e1eec3054a33acdc1c4.tar.bz2 sms-utils-5246748a8e5119dbca894e1eec3054a33acdc1c4.zip |
Merge branch 'sk/port-lna7-changes' into 'master'
[MTX-3489] mPower Oct20: Porting "LNA7 Intermediate Release" changes
See merge request !11
Diffstat (limited to 'src/atcmd.c')
-rw-r--r-- | src/atcmd.c | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/src/atcmd.c b/src/atcmd.c index 449518c..1fd3452 100644 --- a/src/atcmd.c +++ b/src/atcmd.c @@ -830,6 +830,21 @@ int atcmd_plus_cmgd_write(int fd, int index) return 0; } +int atcmd_plus_qcfg_write(int fd, int sms_format) +{ + char buf[ATCMD_LINE_SIZE]; + int tmp; + + atcmd_writeline(fd, "AT+QCFG=\"ltesms/format\",%d", sms_format); + tmp = atcmd_expect_line(fd, buf, sizeof(buf), "OK"); + if (tmp <= 0) { + log_debug("expected OK but it was not received"); + return -1; + } + + return 0; +} + int atcmd_response_foreach_line(int fd, atcmd_response_callback_t call, void *prv) { char buf[ATCMD_LINE_SIZE]; @@ -1538,6 +1553,22 @@ int is_vzw_lte(void) !strncmp(Global.core.model, "LE910-SV1", MODEL_LEN)); } +/* Detect LNA7/L4G1 radio with Verizon SIM */ +int is_quectel_dual_sms_format(void) +{ + if (!strncmp(Global.core.model, "EG95", MODEL_LEN) || + !strncmp(Global.core.model, "EG25", MODEL_LEN)) + { + log_debug("Found Quectel radio with dual SMS format support"); + /* Verizon Wireless SIM */ + if (strncmp(Global.core.iccid,"891480",6) == 0) { + log_debug("Found VZW SIM"); + return 1; + } + } + return 0; +} + int isCdmaTypeModel() { /* Test for possible dual firmware model */ @@ -1566,4 +1597,4 @@ int is_quectel_model() } return 0; -}
\ No newline at end of file +} |