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
  • mfw is the modem firmware for the nRF9160 radio modem, it is not the same as the application firmware which is written to the partitioned flash memory. Changes to the modem firmware will not change the firmware you have loaded using SES; unless you reflash the flash memory using SES or CLI, nothing will change in that regard.

  • 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

Reply Children
  • Right, the asset_tracker requires human interaction to pair the device to the nrf cloud. If you want to simply test if the kit can connect to the NB-IoT network, you will need to swap application to the at_client application.

    Otherwise, try adding that line to prj.conf for the asset_tracker and then review the manual on pairing your nRF9160 DK to nRF Cloud. At which point I can not help as I have never connected to nRF Cloud as I do not have access to an NB-IoT network that can utilise MQTT protocols as needed for the asset_tracker application.

  • I added the line in prj.conf but I see no change in the project: it still is in LTE mode. Also, I can't find the file in SES, which I would expect. Where is it included?

    I searched for CONFIG_LTE_NETWORK_MODE_LTE_M in the whole ncs folder and I changed all occurrences to CONFIG_LTE_NETWORK_MODE_NBIOT. Now the unit runs in NB-IoT mode but it resets when connection is achieved. What CGDCONT settings should be done? I beleive it is necessary to define where and how we should connect to... am I wrong? 

  • /path/to/ncs/nrf/drivers/lte_link_control/lte_lc.c

  • Does the application at_client work in NB-IoT? Can I connect to nRF Cloud with it?

  • The at_client example allows you to test the Development Kit's connectivity to the NB-IoT network. It is the first stage of designing any NB-IoT device, as it allows you to test a device's ability to attach to the network, the network signal strength and if possible, sending test data to a server (not possible with NB-IoT using Nordic's at_client example but I have seen other modules that can do this via AT commands).

    You should run this example program first, then move to connecting to the nRF Cloud once you know for certain that the radio connection of your device is working as expected. It works the same way you have mentioned in the beginning of this question, via AT commands such as CFUN and XSYSTEMMODE, except this is the correct program to enter them.

    You will not be able to connect to the nRF Cloud using the at_client example program.

Related