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

Cannot get NB-IoT connection with nRF9160 DK

From what I could see the Asset_Tracker example works in LTE, not in NB-IoT. How can I test NB-IoT?

I would like to get some hint on what example to use and what to do to get nRF Cloud connection through NB-IoT so that I can start my development from a working platform.

I have nRF9160 DK board, iBasics SIM card and also a 1nce SIM card. I am based in Munich and must develop a project based on the nRF9160 chip.

All tips are welcome.

Parents
  • Just to clarify, NB-IoT is a part of LTE. What you want to swap the radio configuration from LTE-M to LTE-NB. ;)

  • The problem is I cannot get any connection with the Asset_Tracker example. I'd like to have one example that works so I can build on it. Our aim is to use NB-IoT for our application... Any tips?

  • Attached you will find the og file of a new attempt.

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    2019-07-02T10:39:18.604Z INFO Application data folder: C:\Users\sete\AppData\Roaming\nrfconnect\pc-nrfconnect-linkmonitor
    2019-07-02T10:39:18.656Z DEBUG App pc-nrfconnect-linkmonitor v0.9.3 official
    2019-07-02T10:39:18.656Z DEBUG App path: C:\Users\sete\.nrfconnect-apps\node_modules\pc-nrfconnect-linkmonitor
    2019-07-02T10:39:18.656Z DEBUG nRFConnect 2.7.0 is supported by the app (^2.4.0)
    2019-07-02T10:39:18.656Z DEBUG nRFConnect path: C:\Users\sete\AppData\Local\Programs\nrfconnect\resources\app.asar
    2019-07-02T10:39:18.656Z DEBUG HomeDir: C:\Users\sete
    2019-07-02T10:39:18.656Z DEBUG TmpDir: C:\Users\sete\AppData\Local\Temp
    2019-07-02T10:39:26.300Z INFO Modem port is opened
    2019-07-02T10:39:26.304Z DEBUG modem >> AT+CFUN?\x0D\x0A
    2019-07-02T10:39:26.321Z DEBUG modem << +CFUN: 1\x0D\x0A
    2019-07-02T10:39:26.323Z DEBUG modem << OK\x0D\x0A\x00
    2019-07-02T10:39:26.338Z DEBUG modem >> AT+CGSN=1\x0D\x0A
    2019-07-02T10:39:26.346Z DEBUG modem << +CGSN: "352656100028862"\x0D\x0A
    2019-07-02T10:39:26.348Z DEBUG modem << OK\x0D\x0A\x00
    2019-07-02T10:39:26.355Z DEBUG modem >> AT+CGMI\x0D\x0A
    2019-07-02T10:39:26.362Z DEBUG modem << Nordic Semiconductor ASA\x0D\x0A
    2019-07-02T10:39:26.366Z DEBUG modem << OK\x0D\x0A\x00
    2019-07-02T10:39:26.370Z DEBUG modem >> AT+CGMM\x0D\x0A
    2019-07-02T10:39:26.375Z DEBUG modem << nRF9160-SICA\x0D\x0A
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


  • Ok, so I delved deeper into nrf connect failed: 22

    "nrf connect failed" is invoked by nrf_cloud_connect()
    nrf_cloud_connect() invokes nct_connect()

    nct_connect() invokes nct_mqtt_connect()

    nct_mqtt_connect invokes mqtt_connect()

    At some point this is outputting the errno 22, which is EINVAL or invalid arguement, see errno.h.

    Question, does the network you are using allow you to use MQTT transport and DNS resolution? I ask as the Vodafone network here will not allow this on their NB-IoT network, they only allow whitelisted IP addresses so the asset_tracker application can not work for our development kit.

  • Hi Sergio,

    Please set the 

    Fullscreen
    1
    CONFIG_LTE_LEGACY_PCO_MODE=y
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
     in prj.conf file.
    This will set the modem to use PCO in PDN connection establishment, instead of ePCO. 
    There are some eNB and networks that do not support ePCO, yet.
    Best regards,
    Martin L.
  • Let's clarify somethings first:

    1.) I am using SES to compile and run the project. I can't find the file prj.conf in any of the files added to SES. Is this correct? 

    2.) After flashing with SES I stop the debugger and start nRF Connect: the logs you see are generated automatically by the nRF Connect. I send no commands to it.

    3.) Did you insert the AT commands in your main.c? Can you show me how you did it and where you put it?

  • I have no file errno.h in the project! I have errno_private.h. Is is the same?

    Regarding the network, We are using Deustche Telekom but I don't know what they allow. I'll have to check and get back to you.

Reply
  • I have no file errno.h in the project! I have errno_private.h. Is is the same?

    Regarding the network, We are using Deustche Telekom but I don't know what they allow. I'll have to check and get back to you.

Children
  • You will have errno.h. It's located in zephyr/lib/libc/minimal/include/errno.h.

    Do try Martin's information on PCO_MODE.

  • Regarding prj.conf, I can write whatever I like in the file, it doesn't cause an error or any change in the project. Therefore I am forced to conclude that it is not used, so all you r suggestions have zero effect... How can I make it work?

  • Hi Sergio,
    You have to configure the prj.conf file located in the Application folder you are working with.

    Please read through the tutorial on how to work with NCS for more details with regards to this.


    Let us do some testing without modifying any applications to see if you actually can get an NB-iot connection:

    1. Build and flash the default AT_Client sample

    2. Open LTE LInk Monitor

    3. Make sure the modem is off. (AT+CFUN=4)

    4. Use the command:  AT%XSYSTEMMODE=0,1,0,0

    5. Use the command AT%XEPCO=0

    6. Then turn on the modem AT+CFUN=1

    Then use the AT+CFUN? while the "Automatic requests" is turned on:

    So you can see all the responses from the modem with the command AT+CFUN?

    • Please share the LTE Link Monitor Log.

    Best Regards,
    Martin L.

  • Thanks Martin: I included #define CONFIG_LTE_LEGACY_PCO_MODE on the top of lte_lc.c and now the Asset_Tracker does connect but not with the iBasics SIM card but with a 1nce SIM card.

    I tried what you stated above and AT-CLIENT doesn't connect with iBasics SIM card either, although it works with the other.

    So I'll go back to the version that is working and run from there. Thanks for you help. I'll study the tutorial you just sent me.

  • I still can't get a connection with iBasis SIM card. Should I send AT+CGDCONT=1,"IP","<name>"? if yes, what should be instead of <name>?

    Or another question: can I connect to nRFCLoud with a different SIM card?