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?

  • Ok great, so at least you know your set-up is working.

    The next thing is to configure the asset tracker application to NB-IoT. Now you said you tried the CONFIG_LTE_NETWORK_MODE_NBIOT=y option and it didn't work. What exactly was the serial log for that attempt? Did it fail because of a connection error or because the human interaction part of the connection wasn't completed? Remember, there is a human interaction element to connecting the DK to nRF Cloud, it's not just flash the program and it will do the rest, you have to pair it to the nRF Cloud with button and switch inputs.

    If it isn't changing the system set-up to NB-IoT, you can always try the direct approach and comment out both the LTE-M configuration for network_mode[] and the define check for NB-IoT in the lte_lc.c file and leave only the network_mode[] line for NB-IoT.

  • I use a very good editor and I searched in all directories and all files of the project and I found only definitions for CONFIG_LTE_NETWORK_MODE_LTE_M and nonoe for NBIOT. I therefore replaced all

    CONFIG_LTE_NETWORK_MODE_LTE_M by CONFIG_LTE_NETWORK_MODE_NBIOT.

    Now after I run on SES and then check in nRF Connect, the XSYSTEMMODE is 0,1,0,2 which is correct. However it never connects...

    What is wrong?

  • Thats... strange? It is in the master file as well as in my v0.4.0 release tag of the repos

    https://github.com/NordicPlayground/fw-nrfconnect-nrf/blob/master/drivers/lte_link_control/lte_lc.c#L46

    But anyway, at least your modem's XSYSTEMMODE is now configured correctly.

    So what is it doing, can you post the serial log?

  • After searching the LTE became green but then the module made a reset. 

    AT+CPIN?
    +CPIN: READY
    OK
    AT+CPINR="SIM PIN"
    +CPINR: "SIM PIN",3
    OK
    AT+CIMI
    901405100336032
    OK
    +CGEnrf_cloud_connect failed: 22
    V: ME PDN ACT 0,0
    +CNEC_ESM: 50,0
    +CEREG: 5,"CB52","023AAF11",9
    +CIND: "service",1
    +CIND: "roam",1
    AT+COPS=3,2
    +CGEV: ME PDN DEACT 0
    +CEREG: 0,"CB52","023AAF11",9
    +CIND: "service",0
    +CIND: "roam",0
    +CGEV: ME DETACH
    %CESQ: 255,0
    %XSIM: 1
    %XSIM: 0
    OK
    ***** Booting Zephyr OS v1.14.99-ncs1 *****
    AT+CGDCONT?
    Flash region Domain Permissions
    00 0x00000 0x08000 Secure rwxl
    01 0x08000 0x10000 Non-Secure rwxl
    02 0x10000 0x18000 Non-Secure rwxl
    03 0x18000 0x20000 Non-Secure rwxl
    04 0x20000 0x28000 Non-Secure rwxl
    05 0x28000 0x30000 Non-Secure rwxl (...)

  • Ok so this is interesting, I do not get anything like what you get. I also added the CONFIG_LTE_NETWORK_MODE_NBIOT=y change to prj.conf and it did actually set the modem to NB-IoT. Without that CONFIG change, the device defaults to 1,0,0,0; so it does work as expected.

    ***** Booting Zephyr OS v1.14.99-ncs1 *****
    Flash region		Domain		Permissions
    00 0x00000 0x08000 	Secure		rwxl
    01 0x08000 0x10000 	Non-Secure	rwxl
    02 0x10000 0x18000 	Non-Secure	rwxl
    03 0x18000 0x20000 	Non-Secure	rwxl
    04 0x20000 0x28000 	Non-Secure	rwxl
    05 0x28000 0x30000 	Non-Secure	rwxl
    06 0x30000 0x38000 	Non-Secure	rwxl
    07 0x38000 0x40000 	Non-Secure	rwxl
    08 0x40000 0x48000 	Non-Secure	rwxl
    09 0x48000 0x50000 	Non-Secure	rwxl
    10 0x50000 0x58000 	Non-Secure	rwxl
    11 0x58000 0x60000 	Non-Secure	rwxl
    12 0x60000 0x68000 	Non-Secure	rwxl
    13 0x68000 0x70000 	Non-Secure	rwxl
    14 0x70000 0x78000 	Non-Secure	rwxl
    15 0x78000 0x80000 	Non-Secure	rwxl
    16 0x80000 0x88000 	Non-Secure	rwxl
    17 0x88000 0x90000 	Non-Secure	rwxl
    18 0x90000 0x98000 	Non-Secure	rwxl
    19 0x98000 0xa0000 	Non-Secure	rwxl
    20 0xa0000 0xa8000 	Non-Secure	rwxl
    21 0xa8000 0xb0000 	Non-Secure	rwxl
    22 0xb0000 0xb8000 	Non-Secure	rwxl
    23 0xb8000 0xc0000 	Non-Secure	rwxl
    24 0xc0000 0xc8000 	Non-Secure	rwxl
    25 0xc8000 0xd0000 	Non-Secure	rwxl
    26 0xd0000 0xd8000 	Non-Secure	rwxl
    27 0xd8000 0xe0000 	Non-Secure	rwxl
    28 0xe0000 0xe8000 	Non-Secure	rwxl
    29 0xe8000 0xf0000 	Non-Secure	rwxl
    30 0xf0000 0xf8000 	Non-Secure	rwxl
    31 0xf8000 0x100000 	Non-Secure	rwxl
    
    SRAM region		Domain		Permissions
    00 0x00000 0x02000	Secure		rwxl
    01 0x02000 0x04000	Secure		rwxl
    02 0x04000 0x06000	Secure		rwxl
    03 0x06000 0x08000	Secure		rwxl
    04 0x08000 0x0a000	Secure		rwxl
    05 0x0a000 0x0c000	Secure		rwxl
    06 0x0c000 0x0e000	Secure		rwxl
    07 0x0e000 0x10000	Secure		rwxl
    08 0x10000 0x12000	Non-Secure	rwxl
    09 0x12000 0x14000	Non-Secure	rwxl
    10 0x14000 0x16000	Non-Secure	rwxl
    11 0x16000 0x18000	Non-Secure	rwxl
    12 0x18000 0x1a000	Non-Secure	rwxl
    13 0x1a000 0x1c000	Non-Secure	rwxl
    14 0x1c000 0x1e000	Non-Secure	rwxl
    15 0x1e000 0x20000	Non-Secure	rwxl
    16 0x20000 0x22000	Non-Secure	rwxl
    17 0x22000 0x24000	Non-Secure	rwxl
    18 0x24000 0x26000	Non-Secure	rwxl
    19 0x26000 0x28000	Non-Secure	rwxl
    20 0x28000 0x2a000	Non-Secure	rwxl
    21 0x2a000 0x2c000	Non-Secure	rwxl
    22 0x2c000 0x2e000	Non-Secure	rwxl
    23 0x2e000 0x30000	Non-Secure	rwxl
    24 0x30000 0x32000	Non-Secure	rwxl
    25 0x32000 0x34000	Non-Secure	rwxl
    26 0x34000 0x36000	Non-Secure	rwxl
    27 0x36000 0x38000	Non-Secure	rwxl
    28 0x38000 0x3a000	Non-Secure	rwxl
    29 0x3a000 0x3c000	Non-Secure	rwxl
    30 0x3c000 0x3e000	Non-Secure	rwxl
    31 0x3e000 0x40000	Non-Secure	rwxl
    
    Peripheral		Domain		Status
    00 NRF_P0		Non-Secure	OK
    01 NRF_CLOCK		Non-Secure	OK
    02 NRF_RTC1		Non-Secure	OK
    03 NRF_NVMC		Non-Secure	OK
    04 NRF_UARTE1		Non-Secure	OK
    05 NRF_UARTE2		Secure		SKIP
    06 NRF_IPC		Non-Secure	OK
    07 NRF_VMC		Non-Secure	OK
    08 NRF_FPU		Non-Secure	OK
    09 NRF_EGU1		Non-Secure	OK
    10 NRF_EGU2		Non-Secure	OK
    11 NRF_TWIM2		Non-Secure	OK
    12 NRF_SPIM3		Non-Secure	OK
    13 NRF_TIMER0		Non-Secure	OK
    14 NRF_TIMER1		Non-Secure	OK
    15 NRF_TIMER2		Non-Secure	OK
    16 NRF_SAADC		Non-Secure	OK
    17 NRF_GPIOTE1		Non-Secure	OK
    
    SPM: NS image at 0x8000
    SPM: NS MSP at 0x2002a4a8
    SPM: NS reset vector at 0xf865
    SPM: prepare to jump to Non-Secure image.
    ***** Booting Zephyr OS v1.14.99-ncs1 *****
    Application started
    LTE LC config ...
    AT
    OK
    AT%XSYSTEMMODE?
    %XSYSTEMMODE: 0,1,0,0
    OK

    Now, the two AT commands in this log were entered manually by me to check the LTE configuration. Under normal conditions they would not be there. As far as what I would expect to see, my device will get stuck on "LTE LC Config ..." as I actually don't have an NB-IoT network where I currently am.

    Why are AT commands appearing in your log however; are you entering AT commands into the Link Monitor? As far as I can see in your log though, you are connected to a network. AT+CEREG? has returned the eNodeB identification number and returned the number 5 for stat (connected, roaming). However, you then invoke AT+COPS which then returns an AT+CEREG with the stat vaule of 0 which is "not registered", so your actually losing connection again after getting it.

    This is also shown with CGEV returning Mobile Equipment Detach and your XSIM goes to 0 which means your UICC is no longer intialised???

Reply
  • Ok so this is interesting, I do not get anything like what you get. I also added the CONFIG_LTE_NETWORK_MODE_NBIOT=y change to prj.conf and it did actually set the modem to NB-IoT. Without that CONFIG change, the device defaults to 1,0,0,0; so it does work as expected.

    ***** Booting Zephyr OS v1.14.99-ncs1 *****
    Flash region		Domain		Permissions
    00 0x00000 0x08000 	Secure		rwxl
    01 0x08000 0x10000 	Non-Secure	rwxl
    02 0x10000 0x18000 	Non-Secure	rwxl
    03 0x18000 0x20000 	Non-Secure	rwxl
    04 0x20000 0x28000 	Non-Secure	rwxl
    05 0x28000 0x30000 	Non-Secure	rwxl
    06 0x30000 0x38000 	Non-Secure	rwxl
    07 0x38000 0x40000 	Non-Secure	rwxl
    08 0x40000 0x48000 	Non-Secure	rwxl
    09 0x48000 0x50000 	Non-Secure	rwxl
    10 0x50000 0x58000 	Non-Secure	rwxl
    11 0x58000 0x60000 	Non-Secure	rwxl
    12 0x60000 0x68000 	Non-Secure	rwxl
    13 0x68000 0x70000 	Non-Secure	rwxl
    14 0x70000 0x78000 	Non-Secure	rwxl
    15 0x78000 0x80000 	Non-Secure	rwxl
    16 0x80000 0x88000 	Non-Secure	rwxl
    17 0x88000 0x90000 	Non-Secure	rwxl
    18 0x90000 0x98000 	Non-Secure	rwxl
    19 0x98000 0xa0000 	Non-Secure	rwxl
    20 0xa0000 0xa8000 	Non-Secure	rwxl
    21 0xa8000 0xb0000 	Non-Secure	rwxl
    22 0xb0000 0xb8000 	Non-Secure	rwxl
    23 0xb8000 0xc0000 	Non-Secure	rwxl
    24 0xc0000 0xc8000 	Non-Secure	rwxl
    25 0xc8000 0xd0000 	Non-Secure	rwxl
    26 0xd0000 0xd8000 	Non-Secure	rwxl
    27 0xd8000 0xe0000 	Non-Secure	rwxl
    28 0xe0000 0xe8000 	Non-Secure	rwxl
    29 0xe8000 0xf0000 	Non-Secure	rwxl
    30 0xf0000 0xf8000 	Non-Secure	rwxl
    31 0xf8000 0x100000 	Non-Secure	rwxl
    
    SRAM region		Domain		Permissions
    00 0x00000 0x02000	Secure		rwxl
    01 0x02000 0x04000	Secure		rwxl
    02 0x04000 0x06000	Secure		rwxl
    03 0x06000 0x08000	Secure		rwxl
    04 0x08000 0x0a000	Secure		rwxl
    05 0x0a000 0x0c000	Secure		rwxl
    06 0x0c000 0x0e000	Secure		rwxl
    07 0x0e000 0x10000	Secure		rwxl
    08 0x10000 0x12000	Non-Secure	rwxl
    09 0x12000 0x14000	Non-Secure	rwxl
    10 0x14000 0x16000	Non-Secure	rwxl
    11 0x16000 0x18000	Non-Secure	rwxl
    12 0x18000 0x1a000	Non-Secure	rwxl
    13 0x1a000 0x1c000	Non-Secure	rwxl
    14 0x1c000 0x1e000	Non-Secure	rwxl
    15 0x1e000 0x20000	Non-Secure	rwxl
    16 0x20000 0x22000	Non-Secure	rwxl
    17 0x22000 0x24000	Non-Secure	rwxl
    18 0x24000 0x26000	Non-Secure	rwxl
    19 0x26000 0x28000	Non-Secure	rwxl
    20 0x28000 0x2a000	Non-Secure	rwxl
    21 0x2a000 0x2c000	Non-Secure	rwxl
    22 0x2c000 0x2e000	Non-Secure	rwxl
    23 0x2e000 0x30000	Non-Secure	rwxl
    24 0x30000 0x32000	Non-Secure	rwxl
    25 0x32000 0x34000	Non-Secure	rwxl
    26 0x34000 0x36000	Non-Secure	rwxl
    27 0x36000 0x38000	Non-Secure	rwxl
    28 0x38000 0x3a000	Non-Secure	rwxl
    29 0x3a000 0x3c000	Non-Secure	rwxl
    30 0x3c000 0x3e000	Non-Secure	rwxl
    31 0x3e000 0x40000	Non-Secure	rwxl
    
    Peripheral		Domain		Status
    00 NRF_P0		Non-Secure	OK
    01 NRF_CLOCK		Non-Secure	OK
    02 NRF_RTC1		Non-Secure	OK
    03 NRF_NVMC		Non-Secure	OK
    04 NRF_UARTE1		Non-Secure	OK
    05 NRF_UARTE2		Secure		SKIP
    06 NRF_IPC		Non-Secure	OK
    07 NRF_VMC		Non-Secure	OK
    08 NRF_FPU		Non-Secure	OK
    09 NRF_EGU1		Non-Secure	OK
    10 NRF_EGU2		Non-Secure	OK
    11 NRF_TWIM2		Non-Secure	OK
    12 NRF_SPIM3		Non-Secure	OK
    13 NRF_TIMER0		Non-Secure	OK
    14 NRF_TIMER1		Non-Secure	OK
    15 NRF_TIMER2		Non-Secure	OK
    16 NRF_SAADC		Non-Secure	OK
    17 NRF_GPIOTE1		Non-Secure	OK
    
    SPM: NS image at 0x8000
    SPM: NS MSP at 0x2002a4a8
    SPM: NS reset vector at 0xf865
    SPM: prepare to jump to Non-Secure image.
    ***** Booting Zephyr OS v1.14.99-ncs1 *****
    Application started
    LTE LC config ...
    AT
    OK
    AT%XSYSTEMMODE?
    %XSYSTEMMODE: 0,1,0,0
    OK

    Now, the two AT commands in this log were entered manually by me to check the LTE configuration. Under normal conditions they would not be there. As far as what I would expect to see, my device will get stuck on "LTE LC Config ..." as I actually don't have an NB-IoT network where I currently am.

    Why are AT commands appearing in your log however; are you entering AT commands into the Link Monitor? As far as I can see in your log though, you are connected to a network. AT+CEREG? has returned the eNodeB identification number and returned the number 5 for stat (connected, roaming). However, you then invoke AT+COPS which then returns an AT+CEREG with the stat vaule of 0 which is "not registered", so your actually losing connection again after getting it.

    This is also shown with CGEV returning Mobile Equipment Detach and your XSIM goes to 0 which means your UICC is no longer intialised???

Children
  • 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?

Related