drivers: modem: hl7800: Add retries to get IP address info
Allow command retries when querying IP address info. Signed-off-by: Ryan Erickson <ryan.erickson@lairdconnect.com>
This commit is contained in:
parent
885e830dd5
commit
d83aaef031
2 changed files with 6 additions and 1 deletions
|
@ -265,4 +265,8 @@ config MODEM_HL7800_INIT_PRIORITY
|
||||||
Note that the priority needs to be lower than the net stack
|
Note that the priority needs to be lower than the net stack
|
||||||
so that it can start before the networking sub-system.
|
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
|
endif # MODEM_HL7800
|
||||||
|
|
|
@ -2320,7 +2320,8 @@ static void iface_status_work_cb(struct k_work *work)
|
||||||
} else if (ictx.iface && net_if_is_up(ictx.iface)) {
|
} else if (ictx.iface && net_if_is_up(ictx.iface)) {
|
||||||
hl7800_start_rssi_work();
|
hl7800_start_rssi_work();
|
||||||
/* get IP address info */
|
/* 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 */
|
/* get active bands */
|
||||||
SEND_AT_CMD_IGNORE_ERROR("AT+KBND?");
|
SEND_AT_CMD_IGNORE_ERROR("AT+KBND?");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue