Issues with connecting nRF9160-DK to the cellular network using NB-IOT

I have problems with connecting nRF9160-DK to the cellular network. I have Airtel SIM which I normally use for mobile. My question is that do I need a special SIM for NB-IoT connection?

I tried to flash the AT-Commands rebuilt binary downloaded from the Nordic website.

After that I opened a LTE Link monitor app to observe the connection status and found that the modem tries to search for the network but can not find the network...

Also, can I use GPS without having the cellular connection?

Parents
  • I forgot to tell, I am located in India and here there is no coverage for LTE-M and NB-IoT with provided SIM card by nordic..(Soracom and iBasis.)

  • Hi,

    Also, can I use GPS without having the cellular connection?

    Yes, GPS is not related to LTE at all, unless you are using A-GPS or P-GPS to download some of the data from the internet instead of directly from the satellites.

    My question is that do I need a special SIM for NB-IoT connection?

    Your subscription need to support or include NB-IoT. This is typically not the case for "normal" SIM cards and subscriptions, so you will typically need a different SIM card for your IoT device than what you have in your cell phone.

    ujur007 said:
    I forgot to tell, I am located in India and here there is no coverage for LTE-M and NB-IoT with provided SIM card by nordic..(Soracom and iBasis.)

    Then you will need to get a local SIM card with NB-IoT support.

    Best regards,

    Didrik

  • Have you enabled to location library with CONFIG_LOCATION=y?

    Yes, I have. The actual error is as follows.

    /user/ncs/v2.0.0/nrf/include/modem/location.h:251:47: error: 'CONFIG_LOCATION_METHODS_LIST_SIZE' undeclared here (not in a function)
    251 | struct location_method_config methods[CONFIG_LOCATION_METHODS_LIST_SIZE];
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

  • Hi, and sorry for the late reply.

    Can you share your prj.conf?

    I am not able to reproduce the error you get, and by looking at the code, I cannot really understand how you get it.

  • Yes, it's okay.

    Here is the prj.conf. BTW, for now, I am using the gnss library so that I can avoid the error.!

    CONFIG_GPIO=y
    
    
    CONFIG_SERIAL=y
    CONFIG_LOG=y
    
    CONFIG_UART_INTERRUPT_DRIVEN=n
    CONFIG_UART_ASYNC_API=y
    CONFIG_UART_WIDE_DATA=y
    CONFIG_UART_USE_RUNTIME_CONFIGURE=y
    CONFIG_UART_LINE_CTRL=y
    CONFIG_UART_DRV_CMD=y
    
    CONFIG_MAIN_STACK_SIZE=512
    
    
    CONFIG_NEWLIB_LIBC=n
    CONFIG_EXTERNAL_LIBC=n
    CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=n
    CONFIG_FPU=y
    
    CONFIG_LOCATION=y
    
    CONFIG_NRF_MODEM_LIB=y
    
    # LTE Link Control
    CONFIG_LTE_LINK_CONTROL=n
    #CONFIG_LTE_NETWORK_MODE_LTE_M_GPS=y
    # Request eDRX from the network
    CONFIG_LTE_EDRX_REQ=y
    # PSM requested periodic TAU 8 hours
    CONFIG_LTE_PSM_REQ_RPTAU="00101000"
    # PSM requested active time 6 seconds
    CONFIG_LTE_PSM_REQ_RAT="00000011"
    # Auto-connect should be left off as we want the application to control LTE
    CONFIG_LTE_AUTO_INIT_AND_CONNECT=n
    
    CONFIG_LTE_NETWORK_MODE_LTE_M_NBIOT_GPS=y

  • If you look at the top of your build log (when doing a clean build), you will probably see a lot of Kconfig warnings. These should be taken seriously, and only be ignored if you know what caused them, and agree with the consequences.

    E.g. one common case where ignoring a Kconfig warning is fine, is if logging is enabled, and uses the UART backend, but UART is disabled with CONFIG_SERIAL=n to save power. The proper solution would probably be to use a Kconfig overlay file for when you want logging enabled, but if you don't want logging, then the consequences of disabling the UART is acceptable.

    One of the Kconfig warnings you are getting is this:

    warning: LOCATION (defined at C:/ncs_tm/v2.0.0/nrf\lib\location/Kconfig:7) was assigned the value
    'y' but got the value 'n'. Check these unsatisfied dependencies: LTE_LINK_CONTROL (=n). See
    docs.zephyrproject.org/.../kconfig.html and/or look up LOCATION in the
    menuconfig/guiconfig interface. The Application Development Primer, Setting Configuration Values,
    and Kconfig - Tips and Best Practices sections of the manual might be helpful too.

    In other words, the location library is disabled, and you can therefore not use it (including it's header file). The reason it is disabled, despite you trying to enable it, is that it depends on the LTE link control (lte_lc) library, which you have disabled.

    Side note: You have disabled the library itself, but you try to set many options for the library. Did you really intend to disable the library?

    You should also note that depening on how you configure the location library (after you enable the LTE link control library), you probably need to enable some other libraries used by the location library as well. Look out for more Kconfig warnings to see which libraries you need (or which features you might want to disable).

  • I understand the point regarding the Kconfig and warnings here. And while I was doing it, I did change some symbols and their values.

    For example, as you mentioned the LTE_LINK_CONTROL, I enabled it when I got the error. But after that I do not understand the meaning of another Kconfig error.

    So here is the error I get.

    warning: CJSON_LIB (defined at /usr/ncs/v2.0.0/nrf/modules/cjson/Kconfig:7) has direct dependencies (NEWLIB_LIBC && NEWLIB_LIBC_FLOAT_PRINTF) || EXTERNAL_LIBC with value n, but is currently being y-selected by the following symbols:
    - MULTICELL_LOCATION (defined at /usr/ncs/v2.0.0/nrf/lib/multicell_location/Kconfig:7), with value y, direct dependencies NRF_MODEM_LIB && LTE_LINK_CONTROL (value: y), and select condition NRF_MODEM_LIB && LTE_LINK_CONTROL (value: y)

    Now what I understand is that there is that the result of the operation (NEWLIB_LIBC && NEWLIB_LIBC_FLOAT_PRINTF) || EXTERNAL_LIBC should be value "n" but is right now "y"

    So I put these lines at the end of prj.conf

    CONFIG_NEWLIB_LIBC=n
    CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=n
    CONFIG_EXTERNAL_LIBC=n

    But still, I have the same error..Thinking

    Regarding the Location library, I found that I can use the gnss interface also to get PVT values.. Hence, I kept the Location library for future use..

Reply
  • I understand the point regarding the Kconfig and warnings here. And while I was doing it, I did change some symbols and their values.

    For example, as you mentioned the LTE_LINK_CONTROL, I enabled it when I got the error. But after that I do not understand the meaning of another Kconfig error.

    So here is the error I get.

    warning: CJSON_LIB (defined at /usr/ncs/v2.0.0/nrf/modules/cjson/Kconfig:7) has direct dependencies (NEWLIB_LIBC && NEWLIB_LIBC_FLOAT_PRINTF) || EXTERNAL_LIBC with value n, but is currently being y-selected by the following symbols:
    - MULTICELL_LOCATION (defined at /usr/ncs/v2.0.0/nrf/lib/multicell_location/Kconfig:7), with value y, direct dependencies NRF_MODEM_LIB && LTE_LINK_CONTROL (value: y), and select condition NRF_MODEM_LIB && LTE_LINK_CONTROL (value: y)

    Now what I understand is that there is that the result of the operation (NEWLIB_LIBC && NEWLIB_LIBC_FLOAT_PRINTF) || EXTERNAL_LIBC should be value "n" but is right now "y"

    So I put these lines at the end of prj.conf

    CONFIG_NEWLIB_LIBC=n
    CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=n
    CONFIG_EXTERNAL_LIBC=n

    But still, I have the same error..Thinking

    Regarding the Location library, I found that I can use the gnss interface also to get PVT values.. Hence, I kept the Location library for future use..

Children
  • ujur007 said:
    Now what I understand is that there is that the result of the operation (NEWLIB_LIBC && NEWLIB_LIBC_FLOAT_PRINTF) || EXTERNAL_LIBC should be value "n" but is right now "y"

    Actually, it is the opposite. It should be y, but is n.

    What the error means, is that CJSON_LIB is selected by MULTICELL_LOCATION. I.e. the MULTICELL_LOCATION config option tries to enable CJSON_LIB. However, CJSON_LIB depends on (NEWLIB_LIBC && NEWLIB_LIBC_FLOAT_PRINTF) || EXTERNAL_LIBC, which evaluates to n, or false.

    To fix this, you could enable CONFIG_NEWLIB_LIBC and CONFIG_NEWLIB_LIBC_FLOAT_PRINTF. Alternatively, if you do not plan to use cell based location methods, you can disable CONFIG_MULTICELL_LOCATION, so that CJSON_LIB is no longer selected.

Related