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

nRF9160 DK Connecting problems with nRF Cloud

Hello, I tried to set up my nRF9160 with this tutorial and there is a problem:

https://www.youtube.com/watch?v=jZQcmU3KIMY&t=216s

According to the tutorial, LED 3 and the LED 4 should be blinking after 3 minutes, what means that the board is connected to the nRF Cloud.
However on my nRF9160, the LED 4  never starts blinking, even if I wait 10 minutes longer than required.
I tried to push the reset button a few times, I turned the nRF9160 on and off a few times and I also started the "Add LTE Device" on nRF Cloud a few times.

But LED 4 still remains dark.

There were 2 things different compared to the tutorial video:


1) The Sim Card Registration worked fine, but when I came to the window in the picture below, I had an IMEI, but I found no PIN. So, I tried the option without a pin (Red mark in the picture).

Maybe I need a PIN, but where do I get it? I tried to insert every possible number I found on my nRF9160, but none of them worked. 

I have already installed the latest firmware update for the nRF9160 successfully. So what did I do wrong? Or how can I finally connect the nRF9160 to the nRF Cloud?

- Thanks for your answers

- Bergmann

Parents
  • Hi Bergmann, 

    I have already installed the latest firmware update for the nRF9160 successfully

    You have updated the modem firmware to the latest version that is found here?

    I assume that you are using a iBasis SIM, since you activated it through the nRF Cloud site. Where are you based? Have you verified that you have LTE-M coverage in your area(see this page)?

    Best regards

    Bjørn

  • Ok, the country where I am based isn't in that list.
    So I might need a Sim Card of local provider. :)

    Thanks for your answer!

  • The configurations I gave you are only defined on the master branch of ncs, not the v1.0.0 tag. Make sure you're on the master branch when building. 

  • So do I have to setup the SDK again, but this time with 

    git checkout master

    command instead of 

    git checkout v1.0.0

    ? Or does I have to change the 

    command?

    Or how do I get to the master branch?

    Thanks for your answers! 

  • To get to the master branch just run 

    git checkout master
    west update
  • OK, adding the 4 lines 

    CONFIG_LTE_LEGACY_PCO_MODE=y
    CONFIG_NRF_CLOUD_STATIC_IPV4=y
    CONFIG_LTE_NETWORK_MODE_NBIOT_GPS=y
    CONFIG_LTE_NETWORK_MODE_LTE_M_GPS=n

    to the prj.conf file worked and I could flash the nrf with it for a test.

    When I add the line 

    CONFIG_NRF_CLOUD_STATIC_IPV4_ADDR=52.87.36.155

    to the other lines in the prj.conf then I get this error message:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    Loading solution asset_tracker.emProject
    Executing load commands
    cmake -GNinja -DBOARD=nrf9160_pca10090ns -DBOARD_DIR=C:/Maturaprojekt_Master/ncs/zephyr/boards/arm/nrf9160_pca10090 -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb -DGNUARMEMB_TOOLCHAIN_PATH=C:/gnuarmemb -BC:/Maturaprojekt_Master/ncs/nrf/applications/asset_tracker/build_nrf9160_pca10090ns -HC:/Maturaprojekt_Master/ncs/nrf/applications/asset_tracker -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=C:/SES/arm_segger_embedded_studio_v418_win_x86_nordic/html/configure_nordic_project_menuconfig.py
    -- Using application from 'C:/Maturaprojekt_Master/ncs/nrf/applications/asset_tracker'
    Zephyr version: 2.0.99
    -- Selected BOARD nrf9160_pca10090ns
    -- Found west: C:/Python37/Scripts/west.exe (found suitable version "0.6.2", minimum required is "0.6.0")
    -- Cache files will be written to: C:\Users\Benjamin Bergmann\AppData\Local/.cache/zephyr
    USING OUT OF TREE BOARD
    -- Loading C:/Maturaprojekt_Master/ncs/zephyr/boards/arm/nrf9160_pca10090/nrf9160_pca10090ns.dts as base
    -- Overlaying C:/Maturaprojekt_Master/ncs/zephyr/dts/common/common.dts
    Device tree configuration written to C:/Maturaprojekt_Master/ncs/nrf/applications/asset_tracker/build_nrf9160_pca10090ns/zephyr/include/generated/generated_dts_board.conf
    C:/Maturaprojekt_Master/ncs/nrf/applications/asset_tracker/prj.conf:90: warning: malformed string literal in assignment to NRF_CLOUD_STATIC_IPV4_ADDR (defined at C:/Maturaprojekt_Master/ncs/nrf\subsys\net\lib\nrf_cloud/Kconfig:17). Assignment ignored.
    Parsing Kconfig tree in C:/Maturaprojekt_Master/ncs/nrf/applications/asset_tracker/Kconfig
    C:/Maturaprojekt_Master/ncs/nrf/applications/asset_tracker\src/ui/Kconfig:27: WARNING: dt_str_val is deprecated.
    C:/Maturaprojekt_Master/ncs/nrf/applications/asset_tracker\src/ui/Kconfig:31: WARNING: dt_int_val is deprecated.
    Loaded configuration 'C:/Maturaprojekt_Master/ncs/zephyr/boards/arm/nrf9160_pca10090/nrf9160_pca10090ns_defconfig'
    Merged configuration 'C:/Maturaprojekt_Master/ncs/nrf/applications/asset_tracker/prj.conf'
    Error: Aborting due to non-whitelisted Kconfig warning
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
     

    Is it right, that I use the first IP here?:

    Or do I have to use some of the other listed IPs?

  • Hi, you need " " around the IP address, so

    CONFIG_NRF_CLOUD_STATIC_IPV4_ADDR="52.87.36.155"

Reply Children
  • Thanks! Now I flashed the program on the nrf and I got 

    cloud_connect failed: -111 

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    2019-10-10T17:09:30.343Z INFO Application data folder: C:\Users\Benjamin Bergmann\AppData\Roaming\nrfconnect\pc-nrfconnect-linkmonitor
    2019-10-10T17:09:30.417Z DEBUG App pc-nrfconnect-linkmonitor v1.1.1 official
    2019-10-10T17:09:30.417Z DEBUG App path: C:\Users\Benjamin Bergmann\.nrfconnect-apps\node_modules\pc-nrfconnect-linkmonitor
    2019-10-10T17:09:30.417Z DEBUG nRFConnect 3.2.0 is supported by the app (^3.2.0)
    2019-10-10T17:09:30.417Z DEBUG nRFConnect path: C:\Users\Benjamin Bergmann\AppData\Local\Programs\nrfconnect\resources\app.asar
    2019-10-10T17:09:30.417Z DEBUG HomeDir: C:\Users\Benjamin Bergmann
    2019-10-10T17:09:30.417Z DEBUG TmpDir: C:\Users\BENJAM~1\AppData\Local\Temp
    2019-10-10T17:09:38.996Z INFO Modem port is opened
    2019-10-10T17:09:39.003Z DEBUG modem >> AT+CFUN?\x0D\x0A
    2019-10-10T17:09:39.009Z DEBUG modem << +CFUN: 1\x0D\x0A
    2019-10-10T17:09:39.011Z DEBUG modem << OK\x0D\x0A\x00
    2019-10-10T17:09:39.037Z DEBUG modem >> AT+CGSN=1\x0D\x0A
    2019-10-10T17:09:39.043Z DEBUG modem << +CGSN: "352656100037459"\x0D\x0A
    2019-10-10T17:09:39.044Z DEBUG modem << OK\x0D\x0A\x00
    2019-10-10T17:09:39.049Z DEBUG modem >> AT+CGMI\x0D\x0A
    2019-10-10T17:09:39.056Z DEBUG modem << Nordic Semiconductor ASA\x0D\x0A
    2019-10-10T17:09:39.057Z DEBUG modem << OK\x0D\x0A\x00
    2019-10-10T17:09:39.060Z DEBUG modem >> AT+CGMM\x0D\x0A
    2019-10-10T17:09:39.070Z DEBUG modem << nRF9160-SICA\x0D\x0A
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Everytime, when I search a ip adress with your link (https://whatismyipaddress.com/hostname-ip)
    the IP address of the a2n7tk1kp18wix-ats.iot.us-east-1.amazonaws.com changes. Is this normal? 

    And do you have an idea what the problem could be?

    Thanks for your answers!

  • Hi, if you get -111 there is an issue with the certificates. Try running through this tutorial and trying again.

    Yes, the IP address will change constantly, which is why this is just a workaround to see if the DNS lookup was the actual problem.

    For developing and testing, you should be on a network that supports this.

  • Hi, I updated the certificate successfully:

    On the last step, where you must delete the device from the nrf cloud, it said:

    But my nrf never got connected to the cloud anyway, so I might ignore this error message.

    Then I flashed the nrf with the asset_tracker again and I updated the host IP address to the prj.conf, but there is error -111 again:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    2019-10-13T07:19:15.953Z INFO Application data folder: C:\Users\Benjamin Bergmann\AppData\Roaming\nrfconnect\pc-nrfconnect-linkmonitor
    2019-10-13T07:19:16.026Z DEBUG App pc-nrfconnect-linkmonitor v1.1.1 official
    2019-10-13T07:19:16.026Z DEBUG App path: C:\Users\Benjamin Bergmann\.nrfconnect-apps\node_modules\pc-nrfconnect-linkmonitor
    2019-10-13T07:19:16.026Z DEBUG nRFConnect 3.2.0 is supported by the app (^3.2.0)
    2019-10-13T07:19:16.026Z DEBUG nRFConnect path: C:\Users\Benjamin Bergmann\AppData\Local\Programs\nrfconnect\resources\app.asar
    2019-10-13T07:19:16.026Z DEBUG HomeDir: C:\Users\Benjamin Bergmann
    2019-10-13T07:19:16.026Z DEBUG TmpDir: C:\Users\BENJAM~1\AppData\Local\Temp
    2019-10-13T07:19:18.909Z INFO Modem port is opened
    2019-10-13T07:19:18.915Z DEBUG modem >> AT+CFUN?\x0D\x0A
    2019-10-13T07:19:18.933Z DEBUG modem << +CFUN: 1\x0D\x0A
    2019-10-13T07:19:18.936Z DEBUG modem << OK\x0D
    2019-10-13T07:19:18.950Z DEBUG modem >> AT+CGSN=1\x0D\x0A
    2019-10-13T07:19:18.964Z DEBUG modem << +CGSN: "352656100037459"\x0D\x0A
    2019-10-13T07:19:18.965Z DEBUG modem << OK\x0D\x0A
    2019-10-13T07:19:18.971Z DEBUG modem >> AT+CGMI\x0D\x0A
    2019-10-13T07:19:18.987Z DEBUG modem << Nordic Semiconductor ASA\x0D\x0A
    2019-10-13T07:19:18.988Z DEBUG modem << OK\x0D\x0A
    2019-10-13T07:19:18.991Z DEBUG modem >> AT+CGMM\x0D\x0A
    2019-10-13T07:19:19.007Z DEBUG modem << nRF9160-SICA\x0D\x0A
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Do you have any ideas?

    Another question: The goal of my project with the nrf is to send some data from the nrf to a server. Should this be already be possible in this state? So, I could skip the step of getting into the nrf cloud and focus on sending the data to a server.

    Thanks for your help and answers!

  • Hi, did you remember to re-add the device to nRF Cloud before connecting?

    You don't have to be able to connect to nRF Cloud to send data to an external server. But I recommend it, so you are sure there is nothing wrong with your device or the connection.

  • Hi, do you mean like this:

    Now I have to insert the HWID and then it says the device has to be connected to nrf Cloud. I tried this step a couple of times, but every time I get the error message.

    Or do I have to re-add the device somewhere else?

    Thanks for your help and answers!