Can connect to cellular with evaluation board but not with custom board (with the same sim)

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

  • Hello, 

    are you able to provide a modem trace from the device when the issue occurs? Did this work without issues running on the nRF9160DK? Have you tested other SIM cards than Pelephone?

    Kind regards,
    Øyvind

  • I will try to add another uart-to-usb connection in order to have the modem tracing available. This will be later on today and I will update the ticket with what I've found. It did work without issues on the DK. Also I tried with another SIM card beforehand and got the same issue; it tries to connect but never succeeds. 

    At one point I thought it might be a certificate issue. I've found about nrf cloud and onboarded the device successfully. But it didn't change anything. Although the output of the certificates did appear weird for me:

    0            DEV_ID_PUB_KEY     0606060606060606060606060606060606060606060606060606060606060606
    16842753     ROOT_CA_CERT       2C43952EE9E000FF2ACC4E2ED0897C0A72AD5FA72C3D934E81741CBD54F05BD1
    16842753     CLIENT_CERT        ACD06EB3963CAAD4D2B4C8A533AAC8670C232D62A085FE14EF31A23546845BFC
    16842753     CLIENT_KEY         29D6686F6BF862C96218DFDB2F3C36D67B6E54B9F1EDDB2CF3507C37CE179456
    4294967293   NORDIC_ID_ROOT_CA  2C43952EE9E000FF2ACC4E2ED0897C0A72AD5FA72C3D934E81741CBD54F05BD1
    4294967294   DEV_ID_PUB_KEY     FF66BD94DF70DFED1FADA1796C744D02CA02F8491BA45D68B8F97D25B7F7AA15
    4294967292   NORDIC_PUB_KEY     2027C4699EAA90A414D33FA81B975C0FDEDEFB04A19CEA1ED43A8876CAD31E89

    As you can see there is a DEV_ID_PUB_KEY and its sha seems oddly fake. I don't know what that means or if it's related to my issue but decided to share this information just in case. The DK doesn't have any certificate on tag 0

    EDIT: I've added the tracing results to the main post, let me know if you want something more specific from the tracing

  • Please provide the trace file (.mtrace) in this ticket as there is not enough information in the screenshot.

  • trace-2024-07-21T06-12-40.364Z.mtrace

    Here's the file of a separate trace as I didn't save the last one. All I did was AT+CFUN=1 and let it run

  • Hi Avishay,

    This is Charlie, and I am looking at this ticket due to Øyvind  is not available.

    The previous CESQ responses with rsrp value 10 and 37, which corresponding to -130dBm and -103dBm signal strength. These two values reflect poor signal strength. Which make the device stay at the following connection states.

    2 – Not registered, but UE is currently trying to attach or searching an operator to register to

    4 – Unknown (for example, out of Evolved Terrestrial Radio Access Network (E-UTRAN) coverage)

    Can you confirm if you or your colleague have request hardware review or antenna tuning? I do not see you have other hardware related ticket. 

    If you have reserved external antenna connector on your custom board, you can also try to test with external antenna to see if it will make any difference.

    Best regards,

    Charlie

Related