summaryrefslogtreecommitdiff
path: root/src/atcmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/atcmd.c')
-rw-r--r--src/atcmd.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/atcmd.c b/src/atcmd.c
index 7c39313..0c4860a 100644
--- a/src/atcmd.c
+++ b/src/atcmd.c
@@ -878,7 +878,7 @@ int atcmd_plus_cpms_read(int fd, struct data_store *read_store,
struct data_store *store;
struct data_store *data_stores[] = {read_store, send_store, new_store};
- if (isCdmaTypeModel()) {
+ if (is_telit_3gpp2_format()) {
data_stores_size = 2;
}
else {
@@ -1006,7 +1006,7 @@ int atcmd_plus_cpms_write(int fd, const char *read_name,
char buf[ATCMD_LINE_SIZE];
int tmp;
- if (isCdmaTypeModel()) {
+ if (is_telit_3gpp2_format()) {
atcmd_writeline(fd, "AT+CPMS=\"%s\",\"%s\"", read_name, send_name);
}
else
@@ -1475,7 +1475,7 @@ static int sms_atcmd_init(int fd)
}
//Doesn't apply to CDMA type radios
- if (!isCdmaTypeModel() && !msg_store_choice(&new_store, Global.core.msg_store_new)) {
+ if (!is_telit_3gpp2_format() && !msg_store_choice(&new_store, Global.core.msg_store_new)) {
log_error("message storage location %s is not a choice",
Global.core.msg_store_new);
return -1;
@@ -1543,7 +1543,8 @@ int sms_device_open(void)
return fd;
}
-int is_vzw_lte(void)
+/* Detect Telit LTE radios that use the 3GPP2 SMS format for Verizon */
+int is_telit_lte_vzw_3gpp2_format(void)
{
if (!strcmp(Global.core.model, "LE910-NA1")) {
log_debug("Found LE910-NA1");
@@ -1558,8 +1559,8 @@ 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)
+/* Detect LNA7/LNA7D/L4G1 radios with Verizon SIM that support both 3GPP and 3GPP2 */
+int is_quectel_dual_format(void)
{
if (!strncmp(Global.core.model, "EG95", MODEL_LEN) ||
!strncmp(Global.core.model, "EG25", MODEL_LEN))
@@ -1574,10 +1575,11 @@ int is_quectel_dual_sms_format(void)
return 0;
}
-int isCdmaTypeModel()
+/* Detect Telit LTE and CDMA radios that use the 3GPP2 SMS format for Verizon */
+int is_telit_3gpp2_format()
{
/* Test for possible dual firmware model */
- if (is_vzw_lte())
+ if (is_telit_lte_vzw_3gpp2_format())
return 1;
return (!strncmp(Global.core.model, "DE910-DUAL", MODEL_LEN) ||