This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

nRF9160 DK stopped responding to AT commands

I have 2 nRF9160 DK's.  I've been using 1 for most of my testing and the second one was still in the box. 

I loaded the secure boot and the AT_CLIENT demo project.  Opened up the nRF Link Monitor tool.  Hit the reset button and Zephyr stuff flies on the screen.  Ends up with:

Secure Boot: prepare to jump to Non-Secure image



***** Booting Zephyr OS v1.13.99-ncs2 *****



The AT host sample started. err=0


(I added the err=%d) in the printf statement to prove that I was doing stuff. 

The problem is when I send it an AT command, I get: Error: 'AT ' timed out

I reloaded the modem firmware with: nrf9160_mdm_dfu --update 

That worked.  But still did not respond to AT commands, just time out.

Took my other dev kit out of the box.  Moved my sim card to DevKit #2.  Loaded the same code on it.  With this: nrfjprog.exe --program zephyr.hex --sectorerase -r -f nrf91 --verify

Reboot DevKit #2, and get the same Zephyr messages and everything works.  AT commands work.  Connects to the network. 

Hook back up to DevKit #1, AT commands time out. 

Now I did solder on a 1 ohm resistor on R60 to measure current.  And if I program the asset tracker software to it, it connects and works perfectly.  But why does the AT_CLIENT time out now? 

Anyone have any thoughts?  Thanks!

Steve

  • Actually I figured out a few more things today.  And I'm sure someone smarter than I will come in and correct my description/terminology. 

    The new AT Client and 0.4.0 stuff is meant to combine both the SPM and the application together in 1 hex download.  So when you compile it "wrong", you get the application set to install at address 0. 

    But if you go get the latest radio code, 0.7.0, flash that. 

    Then go get the latest GIT repos.  And get the latest Segar stuff and use all of that it all works.  They seemed to have changed the AT client from running in main to responding to interrupts or running in it's own thread.  So if you don't run the SPM first it's not setting up the processor right and all you get is the new AT clinet printing "host started".

    I documented this info here as well: https://devzone.nordicsemi.com/f/nordic-q-a/44816/nrf9160dk-can-not-find-the-cellular-network

    But if you check out the 0.4.0 versions.  Personally I have:
    fw-nrfconnect-nrf: v0.4.0
    fw-nrfconnect-zephyr:  v1.14.99-ncs1
    fw-nrfconnect-mcuboot: v1.3.99-ncs1
    nrfxlib: v0.4.0 

    So far I have tested asset tracker and the at client, but so far so good. 

    Things that caused me issues:

    1. make sure you go in and delete the CMakeCache.txt files.  I know it's an option in the "open project" but do it before you open the project, sometimes it made a difference. 

    2. Make sure you open the project and pick the board directory as nrf9160_pca10090 and the board name to be nrf9160_pca10090ns.  Notice the NS vs non.  See: https://developer.nordicsemi.com/nRF_Connect_SDK/doc/0.4.0/nrf/gs_programming.html 

    3. Make sure you update the radio firmware.  0.7.0 works with this.  0.6.8 seems to only work with the older git tagged repos that ebran posted. 

    4. When flashing your board flash the merged.hex file. Just this one file, it will write both the SPM and the application together. 

    You can update to the latest of everything and it appears to be working.

    Your directories might be different than mine, but if you work out of a c:\git\nRF directory.  You can:

    cd C:\git\nRF\mfwnrf916007015alpha
    nrf9160_mdm_dfu --update

    cd C:\git\nRF\ncs\zephyr
    git reset --hard
    git checkout
    cd C:\git\nRF\ncs\mcuboot
    git reset --hard
    git checkout
    cd C:\git\nRF\ncs\nrf
    git reset --hard
    git checkout
    cd C:\git\nRF\ncs\nrfxlib
    git reset --hard
    git checkout

    pip3 install -r C:\git\nRF\ncs\zephyr\scripts\requirements.txt
    pip3 install -r C:\git\nRF\ncs\nrf\scripts\requirements.txt
    pip3 install -r C:\git\nRF\ncs\mcuboot\scripts\requirements.txt

  • Quick summary for everyone: remember to use the nrf9160_pca10090 board for the SPM example & nrf9160_pca10090ns for the application code. As Ruth mentioned, when you compile the application code (e.g. AT client), the SPM example will also be built. You can then flash the merged hex file by setting the Project 'zephyr/merged.hex' & then using Ctrl + T & L to download. The asset tracker code also includes the at_client functionality on it. 

    As for the latest modem FW, it can be downloaded here. In addition, this video may be helpful, along with this documentation.

Related