Hello, I've been trying to connect to cellular from our custom board (using nrf9160_ns) for the past few days. It already worked with the evaluation board using the same sim from Pelephone. Later I used the at_client sample (from sdk version 2.6.1) in order to use AT commands to check things more in depth and here's what I found:
I started with the custom board. After activating the sim it starts with the following values:
AT+CFUN=1 OK > AT+CPIN? +CPIN: READY OK > AT+CESQ +CESQ: 99,99,255,255,255,255 OK > AT+XCBAND ERROR > AT%XCBAND %XCBAND: 28 OK > AT%XBANDLOCK? %XBANDLOCK: "","" OK > AT+COPS? +COPS: 0 OK AT+CGDCONT? +CGDCONT: 0,"","","",0,0 OK
And after a while it changes to:
> AT+CEREG? +CEREG: 0,2,"1D75","001A040B",7 OK > AT+CESQ +CESQ: 99,99,255,255,6,10 OK > AT%XCBAND %XCBAND: 0 OK ---- After more time ---- > AT%XCBAND %XCBAND: 3 OK > AT+COPS? +COPS: 0 OK
The device has the following version:
> AT+CGMR
mfw_nrf9160_1.3.6
OK
Also I called AT+CEREG? every one in a while and it's either trying to connect (like the output above) or in the 0, 2 state
Now to compare it with the evaluation board:
> AT+CFUN=1 OK > AT+CGDCONT? +CGDCONT: 0,"IPV4V6","sphone.pelephone.net.il","10.92.102.85 2A02:6680:210B:DEE0:D957:27EA:952F:1B4C",0,0 OK > AT+CPIN? +CPIN: READY OK > AT+CESQ +CESQ: 99,99,255,255,11,37 OK > AT%XCBAND %XCBAND: 28 OK > AT%XBANDLOCK? %XBANDLOCK: "","" OK > AT+COPS? +COPS: 0,2,"42503",7 OK
As you can see it almost immediately connected and it already has the context (AT+CGDCONT). Now, I've tried to manually set the context for the custom board as well but it just hangs (I tried both with 0 and 1 as the first value).
In addition, here's the output from an app we're developing that originated from the mqtt sample:
From the custom board: *** Booting nRF Connect SDK v3.5.99-ncs1 *** [00:00:00.383,697] <inf> network: Bringing network interface up and connecting to the network +CEREG: 2,"1D75","001A040B",7 +CEREG: 2 +CEREG: 2,"7E9B","00A6402A",9 // And it goes back and forth between something and 2 for a long time As opposed to the evaluation board: *** Booting nRF Connect SDK v3.5.99-ncs1 *** [00:00:00.375,488] <inf> network: Bringing network interface up and connecting to the network +CEREG: 2,"1D75","001A040B",7 +CSCON: 1 +CGEV: ME PDN ACT 0 +CEREG: 1,"1D75","001A040B",7,,,"11100000","11100000" [00:00:05.018,066] <inf> network: Network connectivity established +CGEV: IPV6 0 // And it happened almost instantly
(I removed unrelated logs between the network logs)
So I've come to a halt and don't know what else to try. Any help would be appreciated and let me know if you need more information.
EDIT:
Here are the tracing results:
It starts at 8 because I AT+CFUN=1 before I set the AT+CGDCONT so I set it to 0 and then to 1 again so that's where the actual tracing starts. Here is the AT commands log (I've tried 2 contexts and the second one worked while the first one didn't as you can soon see):
> AT+CFUN=1 OK > AT+CEREG? +CEREG: 0,4 OK > AT+CGDCONT? OK > AT+CEREG? +CEREG: 0,4 OK > AT+CFUN=0 OK > AT+CGDCONT=1,"IPV4V6","sphone.pelephone.net.il" OK > AT+CFUN=1 OK > AT+CEREG? +CEREG: 0,4 OK > AT+CEREG=1 OK > AT+CEREG? +CEREG: 1,4 OK > AT+CEREG? +CEREG: 1,4 OK > AT+CFUN=0 +CEREG: 0 OK > AT+CGDCONT=0,"IPV4V6","sphone.pelephone.net.il" OK > AT+CFUN=1 OK > AT+CEREG? +CEREG: 0,4 OK > AT+CEREG? +CEREG: 0,4 OK > AT+CEREG? +CEREG: 0,4 OK > AT+CEREG? +CEREG: 0,4 OK > AT+CEREG? +CEREG: 0,4 OK > AT+CEREG? +CEREG: 0,4 OK > AT+CEREG? +CEREG: 0,2,"1D75","001A0401",7 OK +CEREG: 0,2 OK > AT+CEREG? > AT+CEREG? +CEREG: 0,2 OK > AT+CEREG? +CEREG: 0,2 OK > AT+CEREG? +CEREG: 0,2,"0367","00335621",7 OK
That's in comparison with the modem trace on the evaluation board:
where I simply wrote AT+CFUN=1 and this whole operation occured