I noticed some weird behaviour which I can repeat to do with not being able to register after reading back the ICCID.
The following after the list of commands I run on bootup
>>> AT+CGSN␍␍␊ [IMEI]␍␍␊ ␍␍␊ >>> AT+CGMM␍␍␊ nRF9160-SICA␍␍␊ ␍␍␊ >>> AT+CGMR␍␍␊ mfw_nrf9160_1.0.0␍␍␊ >>> AT+CIMI␍␍␊ [IMSI]␍␍␊ >>> AT+CRSM=176,12258,0,0,10␍␍␊ +CRSM: 144,0,"[ICCID]"␍␍␊ ␍␍␊ >>> AT+CEREG=2␍␍␊ ␍␍␊ >>> AT+CGDCONT=0,"IPV4V6","[APN]"␍␍␍␊ ␍␍␊ >>> AT%XSYSTEMMODE=0,1,0,0␍␍␊ ␍␍␊ >>> AT+CFUN=1␍␍␊ ␍␍␊ recv: +CEREG: 2,"2332","02506A20",9␍␍␊ ␍␍␊ recv: +CEREG: 0,"2332","02506A20",9␍␍␊
On the last line, you can see that the modem doesn't try to register from the CEREG: 0,"2332","02506A20",9. After 1min, I reset the modem(AT+CFUN=4) and resend the last four commands and I always register successfully.
I found out if I remove the AT+CRSM on bootup, I always register successfully and never get the CEREG: 0,"2332","02506A20",9 as seen below
>>> AT+CGSN␍␍␊
[IMEI]␍␍␊
␍␍␊
>>> AT+CGMM␍␍␊
nRF9160-SICA␍␍␊
␍␍␊
>>> AT+CGMR␍␍␊
mfw_nrf9160_1.0.0␍␍␊
>>> AT+CIMI␍␍␊
[IMSI]␍␍␊
␍␍␊
>>> AT+CEREG=2␍␍␊
␍␍␊
>>> AT+CGDCONT=0,"IPV4V6","[APN]"␍␍␍␊
␍␍␊
>>> AT%XSYSTEMMODE=0,1,0,0␍␍␊
␍␍␊
>>> AT+CFUN=1␍␍␊
␍␍␊
recv: +CEREG: 2,"2332","02506A20",9␍␍␊
␍␍␊
recv: +CEREG: 5,"2332","02506A20",9␍␍␊
Has this been seen before? I would like to keep the ICCID command before the registration so will not move it to after registration