Skip to content

Commit

Permalink
drivers: modem: hl7800: Add retries to get IP address info
Browse files Browse the repository at this point in the history
Allow command retries when querying IP address info.

Signed-off-by: Ryan Erickson <[email protected]>
  • Loading branch information
rerickson1 authored and nashif committed Aug 31, 2021
1 parent 885e830 commit d83aaef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions drivers/modem/Kconfig.hl7800
Original file line number Diff line number Diff line change
Expand Up @@ -265,4 +265,8 @@ config MODEM_HL7800_INIT_PRIORITY
Note that the priority needs to be lower than the net stack
so that it can start before the networking sub-system.

config MODEM_HL7800_GET_IP_ADDR_INFO_ATTEMPTS
int "Number of attempts to get IP address info during init"
default 4

endif # MODEM_HL7800
3 changes: 2 additions & 1 deletion drivers/modem/hl7800.c
Original file line number Diff line number Diff line change
Expand Up @@ -2320,7 +2320,8 @@ static void iface_status_work_cb(struct k_work *work)
} else if (ictx.iface && net_if_is_up(ictx.iface)) {
hl7800_start_rssi_work();
/* get IP address info */
SEND_AT_CMD_IGNORE_ERROR("AT+CGCONTRDP=1");
(void)send_at_cmd(NULL, "AT+CGCONTRDP=1", MDM_CMD_SEND_TIMEOUT,
CONFIG_MODEM_HL7800_GET_IP_ADDR_INFO_ATTEMPTS, false);
/* get active bands */
SEND_AT_CMD_IGNORE_ERROR("AT+KBND?");
}
Expand Down

0 comments on commit d83aaef

Please sign in to comment.