• SupportHardware
  • Timeout/issue when trying to use AT_CLIENT (LTE testing) + Cellular Monitor

Hi there,

My board arrived today and have just been playing around so far getting up to speed with this build system & Zephyr etc… all new to me! I decided to try and build + run the at_client sample. It builds fine and I can load it via the bootloader using newtmgr also. All good!

However, I can’t seem to actually make sense of whats happening under the hood. In the serial port of nRF Desktop, there are no logs or messages that appear in the main.c:

printk("The AT host sample started\n");

err = nrf_modem_lib_init();
if (err) {
	printk("Modem library initialization failed, error: %d\n", err);
	return 0;
}
enable_xtal();
printk("Ready\n");

nRF seem to have deprecated LTE link monitor in favor of the Cellular Monitor, so not sure how well I’m following the debugging docs. I have updated my prj.conf with:

CONFIG_PDN=y
CONFIG_PDN_DEFAULTS_OVERRIDE=y
CONFIG_PDN_DEFAULT_APN="hologram"
CONFIG_PDN_DEFAULT_FAM_IPV4V6=y

CONFIG_PDN_SYS_INIT=y seemed to have been deprecated so I removed it.

I then load up the Serial Terminal independently to test, and I can run:

> AT
OK
> AT+CFUN=1
OK

However, when I start a trace in the Cellular Monitor, it seems to timeout and fail? No information is populated. Opening the serial port terminal it’s using I see:

> AT
OK
> AT+CFUN=1

It just hangs here and fails on “Trace”. The “modem trace database” is set to 1.3.2.

The weird thing is that I can see during a random test a few minutes ago that the device registered on Holograms dashboard… seems sporadic and I can’t replicate exactly when it’s connecting.

Is this expected behavior or is something wrong? It doesn’t seem stable.


edit: I ran some other commands from the AT command docs:

> AT+CSQ
+CSQ: 99,99
OK
> AT+COPS?
+COPS: 0
OK
> AT+CGDCONT?
+CGDCONT: 0,"IPV4V6","hologram","",0,0
OK

Seems like the signal is really good (99.99) and the current mobile network is on Auto - unsure whether it should return a name. A lot of other commands result in either 0 or ERROR… seems dodgy

    doggylizard
    nRF seem to have deprecated LTE link monitor in favor of the Cellular Monitor, so not sure how well I’m following the debugging docs. I have updated my prj.conf with:
    CONFIG_PDN=y
    CONFIG_PDN_DEFAULTS_OVERRIDE=y
    CONFIG_PDN_DEFAULT_APN=“hologram”
    CONFIG_PDN_DEFAULT_FAM_IPV4V6=y

    Hologram doesn’t require you set the PDN first. Also, the AT client sample does not invoke the PDN library. You’d have to change the sample to do so. I think you’d need to use the lte_lc_* library in conjunction with it. Again, for your case, it’s not needed at all.

    doggylizard Seems like the signal is really good (99.99)

    I believe that means it’s disconnected. Do you have an antenna connected to the correct port and an activated SIM inserted? Double check your Hologram dashboard to make sure you’re up and running there with that particular SIM ID.

    doggylizard nRF seem to have deprecated LTE link monitor in favor of the Cellular Monitor, so not sure how well I’m following the debugging docs. I have updated my prj.conf with:

    You should still be able to use it. The new version is more modem trace oriented. You would need to connect a separate USB-to-UART board to the RX/TX feather pins. (See the notes on getting a modem trace: https://docs.circuitdojo.com/nrf9160-programming-and-debugging.html#getting-a-modem-trace)

      jaredwolff

      I believe that means it’s disconnected. Do you have an antenna connected to the correct port and an activated SIM inserted? Double check your Hologram dashboard to make sure you’re up and running there with that particular SIM ID.

      Yeah, I have 581-1002289 KYOCERA AVX LTE Antenna. SIM is registered on Hologram and it “randomly” displays sessions so far - meaning at some point something worked? For example, at 1621 today I tried connecting again… Hologram dashboard currently shows I had session active from 1621 to 1812 which is definitely wrong, as I disconnected the feather 40 minutes later, so the session seems longer lived. The SIM ID is correct.

      Here’s what I’m currently getting in the LTE Link Monitor (roughly the same behavior as Cellular Monitor); a weird timeout unresponsive mode after doing AT+CFUN=1
      unresponsive


      edit: After posting this, 3-4 minutes later my backlog of AT spam commands went through and I guess so did the CFUN=1 and I can see this:
      workingmaybe

      Well… I now pressed the AT+CFUN? button, which caused a bunch of commands to appear in the terminal and the sidebar has updated information. I now see the following (which looks like it works?)
      works

      New questions then!?

      1. Should I expect to always wait 3-4 minutes when powering on the device for network connection?
      2. I feel like this was lucky and because I spammed buttons? Or is this the nature of the beast?
      3. Ultimately, does my terminal look good now?

      Hoping to understand this all better as I want to work on a tracking application for my pet!

      Thanks!

        doggylizard Should I expect to always wait 3-4 minutes when powering on the device for network connection?

        This will vary by your location, if your device has moved, if the SIM you have is a roaming SIM or not. i.e. it depends on a lot of factors.

        I feel like this was lucky and because I spammed buttons? Or is this the nature of the beast?

        No that’s what I’d expect. The AT+CFUN? will prompt a who bunch of other AT calls to give you an idea of your connection state, etc.

        Ultimately, does my terminal look good now?

        Looks ok to me. I’m looking at the top left where you have all green for Modem, UICC, LTE and PDN.

          jaredwolff

          Thanks again for your help & support!

          Last question for the time being which tbh doesn’t belong in this thread; I noticed the AGPS sample for adding a device to nRF Cloud is archived/deprecated. What’s the current recommended approach for doing this?

            doggylizard Nordic has their sample in the NCS folder. You may want to check out this post here from @postpiet. He was able to get the nrf_cloud_multi_service sample working. It will require some work though to remove parts that aren’t applicable. (the development kits and Thingy91 have sensors the nRF9160 Feather doesn’t)

            Sorry I can’t help more here!

            Terms and Conditions | Privacy Policy