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

building at_client for nb-iot on nrf9160-dk

select at_client folder

west build -b nrf9160dk_nrf9160ns -p

shows this warning

```

warning: The choice symbol LTE_NETWORK_MODE_NBIOT (defined at
/Users/paul_tanner/Nordic/nrfsrc/ncs/nrf/lib/lte_link_control/Kconfig:152) was selected (set =y),
but no symbol ended up as the choice selection. See
docs.zephyrproject.org/.../CONFIG_LTE_NETWORK_MODE_NBIOT.html and/or
look up LTE_NETWORK_MODE_NBIOT 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.```

```

paul_tanner@iMac at_client % ls

CMakeLists.txt build_nrf9160dk_nrf9160

README.rst build_nrf9160dk_nrf9160ns

at_client.hex prj.conf

at_client_nbiot.hex sample.yaml

build src

```

note there is no Kconfig file here

when running the resulting binary

```

AT%XSYSTEMMODE?
%XSYSTEMMODE: 1,0,1,0

```

Not surprisingly it does not connect to any NB-IOT access point.

My questions are:

1. do I need a Kconfig for NB-IOT?

2. can I use the same firmware versions for this and LTE/M?

Thx. 

  • Sorry, forgot to say that LTE_NETWORK_MODE_NBIOT=y is set in prj.conf

  • Hi,

    The CONFIG_LTE_NETWORK_MODE_* Kconfig symbols are for the lte_link_control library.

    As the lte_link_control library is used for configuring the modem (specifically the LTE link) from an application running on the application core, and the purpose of the at_client is that you can configure the modem manually, the at_client does not use the lte_link_control library.

    As the lte_link_control library is not enabled, the Kconfig symbols it uses will not be defined. That is the reason for the build warning (in general, I recommend that you treat Kconfig warnings as errors).

    Instead, when you use the at_client sample, you must configure the modem manually. To set the system mode to NB-IoT, you can use AT%XSYSTEMMODE=0,1,x,0, where x is 1 if you also want GPS, 0 otherwise. Note that the modem must be offline (CFUN=4 or 0) when you set the system mode.

    You can then use AT+CFUN=0 to store the configuration in permanent memory.

     

    1. do I need a Kconfig for NB-IOT?

     Only when using the lte_link_control library.

     

    2. can I use the same firmware versions for this and LTE/M?

     You can use the same modem firmware for both modes. If you do not set the mode, LTE-M is the default.

    If you are using the lte_link_control library, the default is controlled by the Kconfig options. But, the system mode can also be changed at run-time by the application.

    And, again, to be clear: The at_client sample does not use the lte_link_control library, and requires you to configure the modem manually.

    Best regards,

    Didrik

  • Thx Didrik, this is very helpful.

    I'm using a pre-activated Vodafone SIM as that's what I need for NB-IOT in the UK.

    I've gone back to trying the asset tracker, built with

    CONFIG_LTE_NETWORK_MODE_LTE_M_GPS=n
    CONFIG_LTE_NETWORK_MODE_NBIOT_GPS=y

    This sets the system mode OK.

    AT%XSYSTEMMODE?
    %XSYSTEMMODE: 0,1,1,0
    
    
    
    

    Now LED3 is flashing but we never get a connection 

    ...
    [0m<inf> asset_tracker: Connecting to LTE network.[0m
    [0m<inf> asset_tracker: This may take several minutes.[0m
    ... etc ...
    [0m<inf> lte_lc: Network connection attempt timed out[0m
    [0m<inf> lte_lc: Using fallback network mode[0m

    from the terminal I get

    AT+CFUN?
    +CFUN: 1
    OK
    AT+CGSN=1+CGSN: "352656100390296"
    OK
    AT+CGMINordic Semiconductor ASA
    OK
    AT+CGMMnRF9160-SICA
    OK
    AT+CGMRmfw_nrf9160_1.2.2
    OK
    AT+CEMODE?+CEMODE: 0
    OK
    AT%XCBAND=?%XCBAND: (1,2,3,4,5,8,12,13,17,19,20,25,26,28,66)
    OK
    AT+CMEE?+CMEE: 0
    OK
    AT+CMEE=1
    OK
    AT+CNEC?+CNEC: 0
    OK
    AT+CNEC=24
    OK
    AT+CGEREP?
    +CGEREP: 0,0
    OK
    AT+CGDCONT?
    OK
    AT+CGACT?
    OK
    AT+CGEREP=1
    OK
    AT+CIND=1,1,1
    OK
    AT+CEREG=5
    OK
    AT+CEREG?
    +CEREG: 5,2,"FFFE","FFFFFFFF",9,0,0,"11100000","11100000"
    OK
    AT%CESQ=1
    OK
    AT+CESQ+CESQ: 99,99,255,255,255,255
    OK
    AT%XSIM=1
    OK
    AT%XSIM?
    %XSIM: 1
    OK
    AT+CPIN?
    +CPIN: READY
    OK
    AT+CPINR="SIM PIN"
    +CPINR: "SIM PIN",3
    OK
    AT+CIMI901288004468909
    OK 

    I am thinking that this could be an out-of-range issue.  Is there any way to verify this?

  • It is a bit hard to say for sure without seeing more of the log, but at the moment those commands were sent, the modem was searching for an NB-IoT network:

    +CEREG: 5,2,"FFFE","FFFFFFFF",9,0,0,"11100000","11100000", The "2" means that it is searching, the "9" is NB-IoT, the F'es indicate that it has not found any cells yet.

    But it has not found any signal:

    +CESQ: 99,99,255,255,255,255

    This is typical of an "out of coverage" scenario, although there is a chance that the device would be able to find a network if left searching for a longer period of time.

    But, if the lte_link_control library times out, and you have not changed the timeout value, it has already been searching for 10 minutes. That should have been more than enough in most cases.

    A few months ago we had another customer report issues with Vodafone's NB-IoT network in the UK. I know they have been doing some improvements since then, but they might not have gotten to your area yet. Your Regional Sales Manager might know more about the current situation. If you do not know how to contact your RSM, you can send me a private message with your location, and I will provide the contact information.

    You can read more about the other customer's issue here: https://devzone.nordicsemi.com/f/nordic-q-a/64454/bad-nb-iot-signal-strength-in-uk

  • Thanks Didrik,

    I know that the NB-IoT coverage is patchy.  Based on your observations i think it might be worth moving to somewhere else.  No full coverage map is available but I have obtained one for my immediate area.

    Will report back later and maybe capture more logging.

Related