Skip to content

Commit 401ec8b

Browse files
emillindqdkalowsk
authored andcommitted
modem_cellular: lara_r6: add option to clear forbidden networks from SIM
SIM-cards remember which networks has rejected attach attempts. This is not always desired if the user has control over which networks to allow. This commit adds a Kconfig symbol which enables clearing of saved forbidden networks from SIM-card on boot. Signed-off-by: Emil Lindqvist <emil@lindq.gr>
1 parent e27c4ba commit 401ec8b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

drivers/modem/Kconfig.cellular

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ config MODEM_CELLULAR_RAT_4G_3G_2G
8181

8282
endchoice
8383

84+
config MODEM_CELLULAR_CLEAR_FORBIDDEN
85+
bool "Clear forbidden networks from SIM-card on boot"
86+
8487
endif #DT_HAS_U_BLOX_LARA_R6_ENABLED
8588

8689
endif #MODEM_CELLULAR

drivers/modem/modem_cellular.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2308,6 +2308,11 @@ MODEM_CHAT_SCRIPT_CMDS_DEFINE(u_blox_lara_r6_init_chat_script_cmds,
23082308
MODEM_CHAT_SCRIPT_CMD_RESP("AT+URAT=3,2", ok_match),
23092309
#elif CONFIG_MODEM_CELLULAR_RAT_4G_3G_2G
23102310
MODEM_CHAT_SCRIPT_CMD_RESP("AT+URAT=3,2,0", ok_match),
2311+
#endif
2312+
#if CONFIG_MODEM_CELLULAR_CLEAR_FORBIDDEN
2313+
MODEM_CHAT_SCRIPT_CMD_RESP("AT+CRSM=214,28539,0,0,12,"
2314+
"\"FFFFFFFFFFFFFFFFFFFFFFFF\"",
2315+
ok_match),
23112316
#endif
23122317
MODEM_CHAT_SCRIPT_CMD_RESP("AT+CGSN", imei_match),
23132318
MODEM_CHAT_SCRIPT_CMD_RESP("", ok_match),

0 commit comments

Comments
 (0)