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

nRF9160 DK software update

I used SES and wrote a printf message at main entrance: when I run in nRF Connect I can see the message that I wrote just after I press the RESET button (OK). Still, as I can't get a connection to NB-IoT, I decided to roll back to the mfw_nrf9160_0.7.0-alpha version: I flashed the board but when I run it I still see my printf message, meaning that still the old code is running.

Can you explain? 

I am still not able to connect although I could before trials with SES...

Parents Reply Children
  • So, this is like a Softdevice in the nRF51 family: I wondered already. Thanks.

    However, I already found out why the unit doesn't connect: AT%XSYSTEMMODE? returns 1,0,0,0, even I make the sequence below:

    AT+CFUN=4
    AT%XSYSTEMMODE=0,1,0,2
    AT+CFUN=0

    After reset and start, I send AT%XSYSTEMOMODE? and I get 1,0,0,0!

    If I send:

    AT+CFUN=4
    AT%XSYSTEMMODE=0,1,0,2
    AT+CFUN=1

    if I am fast enough and send AT%XSYSTEMMMODE? I get 0,1,0,2 but a few seconds later the system resets and then, after start (AT+CFUN=1) I get 1,0,0,0 if I ask for system mode.

    It just doesn't accept 0,1,0,2!

    What can I do?

  • You do not need to reset the whole device. Only enter the following commands after reseting the Development Kit:

    AT+CFUN=4 //ensure the modem is offline

    AT%XSYSTEMMODE=0,1,0,0 //set modem to NB-IoT
    AT+CFUN=1 //start modem

    This will start the modem and it will begin trying to attach to the LTE network for NB-IoT. There is no need to reset the device again after this as this will just place the modem back into CFUN=4 mode and clear the XSYSTEMMODE selection.

    I do not have an answer to why the LTE preference is not working but I don't use it in my application, I just specify 0,1,0,0 whenever I need to swap to LTE from GPS mode.

    You can now run the command AT+CEREG? to check if the device has been able to connect to the network, be aware this may take a few minutes depending on the network coverage and signal strength.

  • Sorry, I can't answer to your comment because I see no REPLY button, so I do it here:

    The system crashes the moment a connection is established:

    AT+CFUN=1
    
    
    
    
    +CEREG: 2,"CB52","023AAF11",9
    
    
    
    
    
    
    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
    
    
    
    
    AT+CGDCONT?
    
    
    
    
    ***** Booting Zephyr OS v1.14.99-ncs1 *****
    
    
    
    
    Flash region(...)

    Maybe this trace can help to find identifying the problem...

  • What application are you running?

    nrf_cloud_connect failed: 22

    Unless I am mistaken, this is an error message for the asset_tracker application which handles modem control via lte_lc.c. It is therefore all scripted code and doesn't require manual at commands.

    The above at commands are for the at_client application which allows you to manually configure the modem.

    EDIT:

    I wasn't mistaken, that error is only used in two files in the entire ncs directory, lte_ble_gateway main.c and asset_tracker main.c, you must have one of these, 99% likely it's the asset_tracker

  • If you are in fact running the asset_tracker application, please see the following lines in lte_lc.c
    https://github.com/NordicPlayground/fw-nrfconnect-nrf/blob/master/drivers/lte_link_control/lte_lc.c#L46-L48
    These lines indicate that you need to add an additional line to your prj.conf file to configure the device to NB-IoT in that application. (or any application that directly uses LTE Link Control (lte_lc) to handle modem control)

    Try adding into the prj.conf file:

    CONFIG_LTE_NETWORK_MODE_NBIOT=y

Related