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

Whisper Ware (nRf9160)

Without doubt there is a new variation of software emerging:

We are all familiar with Firmware and Software, however I really feel the need to coin the term "Whisper Ware" when it comes to the nRF9160 which I must add we are absolutely committed to making work.

I have personally spent the last 12 hours, uninstalling, changing branches, reinstalling, and trying my best to follow every "whisper" in this forum to make any of the sample applications work.

Even more frustrating is that for a brief time they did seem to function.

Now whatever I do, AT commands time out as follows:

Error: 'AT+CFUN? ' timed out

If someone would be kind enough to give detailed instruction on how I may be able to start "from scratch" and therefore remove any legacy that may exist, I would be very grateful.

I'm using Windows 10 and clearly very very frustrated.

On the ever positive side, I'm thrilled to bits that the implementation currently is such a mess, as most will or already have simply given up as they will not have the sincere patience that I have.

Parents
  • Hi John,
    I can confirm that the asset tracker in v0.4.0 runs fine on the nrf9160-dk.

    Let us first figure out if you can connect to the network.
    Please flash the AT client as described in the Getting started tutorial.


    Then I want you to open and use the LTE Link Monitor with the nrf9160DK connected to your computer and select your kit in the LTE Link Monitor and hit the reset button on the nRF91DK.

    One thing to note with the LTE Link Monitor status sidebar:

    Is that it does not update automatically, you have to actually send the "AT+CFUN?" command so the LTE Link Monitor application will go through all the necessary AT commands (a script) and send them to the modem and then it will update the responses to the "status sidebar".


    Here you can see I actually have a connection but the status bar has not been updated: (this is after ~3 minutes after It went through the automatic AT commands)

    If I send the "AT+CFUN?" command again you can see that it will update to the correct parameters:

    and you actually see that I have a connection with the network. ("Telenor Norge AS" in my case)


    Please confirm that this happens on your side as well before we move on to the next step.


    Now that we know that we have a network connection we can try the "asset_tracker" application which will connect to the nrf cloud.

    I am adding the precompiled .hex file of the "Asset_tracker" merged with the "Secure Partition Manager" (SPM):  (this is from the v0.4.0 release)

    asset_tracker.hex

    To flash this .hex file please use the following command in the command line:

    nrfjprog --program asset_tracker.hex -f nrf91 --sectorerase -r --verify

    Note: You can use the LTE Link Monitor as a standard serial output Terminal if you deselect the "Automatic requests" setting:

    This will prohibit that the LTE Link Monitor will run through the script sending AT commands when sending for example "AT+CFUN?". (it will only send it once)


    Please have the LTE Link Monitor open while testing the "asset_tracker" application to easier see what is actually going on.

    Here you can see the output after the "asset_tracker" got a connection with the nrf cloud server.

    - "LTE LC config ..." is showing while the kit is trying to get a network attachment, and the following output is from the application itself saying it found and got access to the nrf cloud server.

    If you get the same output, you can now go into www.nrfcloud.com and pair your nRF91DK with your account following the steps on the nrf cloud webpage. (you do not need to register the iBasis SIM card more than once)

    After you have followed the Pairing sequence given by nrfcloud you should see this verified in the output terminal as well.

    Now you should be connected to nrfcloud.


    Extra tip:

    For faster attachment with the network the next time you power on the board is to save the information about the network in the modem flash.

    To do this just send the AT command "AT+CFUN=0".

    This will Power off the modem as well as saving the network information in the modem flash.

    (note that you need to power cycle the board after this command to turn on the modem)


    Best Regards,
    Martin L.

  • Ok, so I'm connected.

    Loading asset Tracker now.

    It seems I'm unable to download the asset_tracker.hex you have given me. Says "forbidden"

    You do not have permission to view this directory or page.

    Anyway in an attempt t move forward Jan gave me this merged.hex from the master branch a few moments ago.

    I've tried loading it using Segger (4.16) Window 10

    All I get is LTE Lc Config....

    And led 3 flashing.

    I think this means that it's trying to resolve DNS and obviously can't.

    jan_merged.hex

    I've also tried as you suggested

    nrfjprog.exe --program jan_merged.hex -f nrf91 --sectorerase --verify
    Parsing hex file.
    Erasing page at address 0x0.
    Erasing page at address 0x1000.
    Erasing page at address 0x2000.
    Erasing page at address 0x3000.
    Erasing page at address 0x8000.
    Erasing page at address 0x9000.
    Erasing page at address 0xA000.
    Erasing page at address 0xB000.
    Erasing page at address 0xC000.
    Erasing page at address 0xD000.
    Erasing page at address 0xE000.
    Erasing page at address 0xF000.
    Erasing page at address 0x10000.
    Erasing page at address 0x11000.
    Erasing page at address 0x12000.
    Erasing page at address 0x13000.
    Erasing page at address 0x14000.
    Erasing page at address 0x15000.
    Erasing page at address 0x16000.
    Erasing page at address 0x17000.
    Erasing page at address 0x18000.
    Erasing page at address 0x19000.
    Erasing page at address 0x1A000.
    Erasing page at address 0x1B000.
    Erasing page at address 0x1C000.
    Erasing page at address 0x1D000.
    Erasing page at address 0x1E000.
    Erasing page at address 0x1F000.
    Erasing page at address 0x20000.
    Erasing page at address 0x21000.
    Erasing page at address 0x22000.
    Erasing page at address 0x23000.
    Erasing page at address 0x24000.
    Erasing page at address 0x25000.
    Erasing page at address 0x26000.
    Erasing page at address 0x27000.
    Erasing page at address 0x28000.
    Erasing page at address 0x29000.
    Erasing page at address 0x2A000.
    Erasing page at address 0x2B000.
    Erasing page at address 0x2C000.
    Erasing page at address 0x2D000.
    Erasing page at address 0x2E000.
    Erasing page at address 0x2F000.
    Erasing page at address 0x30000.
    Erasing page at address 0x31000.
    Erasing page at address 0x32000.
    Applying system reset.
    Checking that the area to write is not protected.
    Programming device.
    Verifying programming.
    Verified OK.

    Same result

    SPM: NS image at 0x8000
    
    
    
    
    SPM: NS MSP at 0x2002a898
    
    
    
    
    SPM: NS reset vector at 0xfda1
    
    
    
    
    SPM: prepare to jump to Non-Secure image.
    
    
    
    
    ***** Booting Zephyr OS v1.14.99-ncs1-1066-gf210011b9609 *****
    
    
    
    
    Application started
    
    
    
    
    LTE LC config ...

    Just a guess Martin is there a new version of uicr_tcxo.hex that should be loaded?

    I used the NRF Connect Programmer and erased all.

    I understand that this required uicr_tcxo.hex to be reloaded with the following command

    nrfjprog.exe --program uicr_tcxo.hex -f nrf91 --sectorerase --verify

    uicr_tcxo.hex

    Above is the file I loaded, then the modem from:

    https://www.nordicsemi.com/Products/Low-power-cellular-IoT/nRF9160/Download#infotabs

    Then compiled and loaded asset _tracker producing merged.hex and downloaded intel hex file.

    Quite a bunch of times now.

  • Hi Martin.

    I've used an ibasis sim

    Flashed your asset_tracker (4).hex

    Same result.

    With reference to your comment that uicr.hex isn't required.

    It seems that after an erase all with NRF Connect Programmer that the modem software is unable to be installed, however if I flash uicr it can be.

    Not understanding fully the function that uicr performs, I'm curious if I'm using the correct version as it certainly seems to be doing "something".

    If you also say that I shouldn't be silly enough to erase all...then someone has to do it Slight smile


    C:\Users\jcris\Desktop\Modem>nrf9160_mdm_dfu --update
    Configure APP IPC as non-secure
    Configure IPC HW for DFU
    Configure APP RAM as non-secure
    Store DFU indication into shared memory
    Power up / reset modem
    Start polling IPC.MODEM_CTRL_EVENT to receive root key digest
    Modem responded with a5000001
    Modem root key digest received: 72b3d7c13e549acf08bbc48cb936b9b861e4cbae28a7537c9859a6d945ee9489
    Store IPC DFU executable into shared memory
    Send IPC.APP_CTRL_TASK
    Start polling IPC.MODEM_CTRL_EVENT To receive 'Started' indication from DFU executable
    ERROR: Time out, no event received after 10 sec.

    C:\Users\jcris\Desktop\Modem>cd ..

    C:\Users\jcris\Desktop>cd uicr

    C:\Users\jcris\Desktop\UICR>nrfjprog.exe --program uicr_tcxo.hex -f nrf91 --sectorerase --verify
    Parsing hex file.
    WARNING: A UICR write operation has been requested but UICR has not been
    WARNING: erased. Please verify that the result is correct.
    Applying system reset.
    Checking that the area to write is not protected.
    Programming device.
    Verifying programming.
    Verified OK.

    C:\Users\jcris\Desktop\UICR>cd ..

    C:\Users\jcris\Desktop>cd modem

    C:\Users\jcris\Desktop\Modem>nrf9160_mdm_dfu --update
    Configure APP IPC as non-secure
    Configure IPC HW for DFU
    Configure APP RAM as non-secure
    Store DFU indication into shared memory
    Power up / reset modem
    Start polling IPC.MODEM_CTRL_EVENT to receive root key digest
    Modem responded with a5000001
    Modem root key digest received: 72b3d7c13e549acf08bbc48cb936b9b861e4cbae28a7537c9859a6d945ee9489
    Store IPC DFU executable into shared memory
    Send IPC.APP_CTRL_TASK
    Start polling IPC.MODEM_CTRL_EVENT To receive 'Started' indication from DFU executable
    IPC DFU 'Started' indication from DFU received
    Updating modem firmware
    Programming pages from address 0x59602000
    Programming pages from address 0x6000
    Programming pages from address 0x50000
    Programming pages from address 0x60000
    Programming pages from address 0x70000
    Programming pages from address 0x80000
    Programming pages from address 0x90000
    Programming pages from address 0xa0000
    Programming pages from address 0xb0000
    Programming pages from address 0xc0000
    Programming pages from address 0xd0000
    Programming pages from address 0xe0000
    Programming pages from address 0xf0000
    Programming pages from address 0x100000
    Programming pages from address 0x110000
    Programming pages from address 0x120000
    Programming pages from address 0x130000
    Programming pages from address 0x140000
    Programming pages from address 0x150000
    Programming pages from address 0x160000
    Programming pages from address 0x170000
    Programming pages from address 0x180000
    Programming pages from address 0x190000
    Programming pages from address 0x1a0000
    Programming pages from address 0x1b0000
    Programming pages from address 0x1c0000
    Programming pages from address 0x1d0000
    Programming pages from address 0x1e0000
    Programming pages from address 0x1f0000
    Programming pages from address 0x200000
    Programming pages from address 0x210000
    Programming pages from address 0x220000
    Programming pages from address 0x230000
    Programming pages from address 0x27c000
    Programing firmware time: 47.579352
    Firmware update time including overhead: 50.544982
    Firmware updated.
    Starting verification
    Digest reading started
    Firmware digest received from modem: bf002e90453a1ed0566e8ff81580d78ef8bbd44cdf3886abf51dc853f9443349
    Verification success
    Total time used: 55.257405

    C:\Users\jcris\Desktop\Modem>

    2019-06-03T19_40_06.536Z-log.txt

    Here's the current log file from NRF Connect Link Monitor.

  • Hi John,

    This will be fixed in the next modem DFU release.

    The reason I am saying that you do not need the "UICR.hex" is that this is set by the application. That means that you can flash whatever application you like to the nrf91 and the UICR are will be programmed correctly.
    This can be confirmed by erasing all and then flashing an application and doing the modem dfu. So please disregard the uicr.hex from now on.

    With regards to the log from LTE Link Monitor, could you disable the "automatic requests" and only run the asset_tracker without sending AT commands since this can interfere with the connection process happening in the "LTE LC Config". 


    Best Regards,

    Martin L.

  • Hi Martin.

    I erased all then flashed the merged hex using:nrfjprog

    C:\Users\jcris\Desktop\AWS Stuff>nrfjprog.exe --program jan_merged.hex -f nrf91 --sectorerase --verify
    Parsing hex file.
    Erasing page at address 0x0.
    Erasing page at address 0x1000.
    Erasing page at address 0x2000.
    Erasing page at address 0x3000.
    Erasing page at address 0x8000.
    Erasing page at address 0x9000.
    Erasing page at address 0xA000.
    Erasing page at address 0xB000.
    Erasing page at address 0xC000.
    Erasing page at address 0xD000.
    Erasing page at address 0xE000.
    Erasing page at address 0xF000.
    Erasing page at address 0x10000.
    Erasing page at address 0x11000.
    Erasing page at address 0x12000.
    Erasing page at address 0x13000.
    Erasing page at address 0x14000.
    Erasing page at address 0x15000.
    Erasing page at address 0x16000.
    Erasing page at address 0x17000.
    Erasing page at address 0x18000.
    Erasing page at address 0x19000.
    Erasing page at address 0x1A000.
    Erasing page at address 0x1B000.
    Erasing page at address 0x1C000.
    Erasing page at address 0x1D000.
    Erasing page at address 0x1E000.
    Erasing page at address 0x1F000.
    Erasing page at address 0x20000.
    Erasing page at address 0x21000.
    Erasing page at address 0x22000.
    Erasing page at address 0x23000.
    Erasing page at address 0x24000.
    Erasing page at address 0x25000.
    Erasing page at address 0x26000.
    Erasing page at address 0x27000.
    Erasing page at address 0x28000.
    Erasing page at address 0x29000.
    Erasing page at address 0x2A000.
    Erasing page at address 0x2B000.
    Erasing page at address 0x2C000.
    Erasing page at address 0x2D000.
    Erasing page at address 0x2E000.
    Erasing page at address 0x2F000.
    Erasing page at address 0x30000.
    Erasing page at address 0x31000.
    Erasing page at address 0x32000.
    Applying system reset.
    Checking that the area to write is not protected.
    Programming device.
    Verifying programming.
    Verified OK.

    C:\Users\jcris\Desktop\Modem>nrf9160_mdm_dfu --update
    Configure APP IPC as non-secure
    Configure IPC HW for DFU
    Configure APP RAM as non-secure
    Store DFU indication into shared memory
    Power up / reset modem
    Start polling IPC.MODEM_CTRL_EVENT to receive root key digest
    Modem responded with a5000001
    Modem root key digest received: 72b3d7c13e549acf08bbc48cb936b9b861e4cbae28a7537c9859a6d945ee9489
    Store IPC DFU executable into shared memory
    Send IPC.APP_CTRL_TASK
    Start polling IPC.MODEM_CTRL_EVENT To receive 'Started' indication from DFU executable
    ERROR: Time out, no event received after 10 sec.

    C:\Users\jcris\Desktop\Modem>

    I tried the same process using Segger, same result.

    However if I load SPM using the secure 10090 board and download the .elf

    I can then DFU the modem software.


  • One of the problems with making a working nRF9160 sample project is that the software tools, modem firmware, and SDK version all have bugs where only specific combinations work. After considerable anguish I got the Asset Tracker example project to build
    and run.

    This version of tools worked:


    Segger Embedded Studio for ARM Relese 4.16
    Note this is different from Segger Embedded Studio for BLE development.


    C:\Users\cwallach\cgnuarmemb\7 2018-q2-update


    C:\Users\CWallach>cmake --version
    cmake version 3.14.1

    C:\Users\CWallach>git version
    git version 2.21.0.windows.1

    C:\Users\CWallach>python -V
    Python 3.7.3

    C:\Users\CWallach>ninja --version
    1.9.0

    C:\Users\CWallach>gperf --version
    GNU gperf 3.1

    Modem firmware mfwnrf916007029alpha.zip

    SDK branch v0.4.0-rc2


    Load project SPM (/ncs2/nrf/samples/nrf9160/spm) using the PCA10090 board selection
    Make sure the GNU library is set correctly and that you are pointing to the nCS2/zephyr base directory
    Build the file (F7)
    Load Asset Tracker application (/ncs2/nrf/application/asset_tracker) using the PCA10090ns board selection
    Build Solution
    /target (Select J-link)
    /target download File (Intel Hex) (/ncs2/nrf/application/asset_tracker/build_PCA10090/zephyr/merge.hex
    Monitor the output in the Link Monitor when you reset the board.


    Hope this helps!

  • Thanks very much for your response.

    Quick question, are you able to program your board with the merged hex asset tracker here:

    0535.jan_merged.hex

    I'd be really interested if it works for you...

Reply Children
  • Flashed but doesn't work and reboots every minute or so.

  • Thanks very much for doing that.

    Mine doesn't reboot, but only does this:

    SPM: NS image at 0x8000
    
    
    
    
    SPM: NS MSP at 0x2002a4a8
    
    
    
    
    SPM: NS reset vector at 0xfd6d
    
    
    
    
    SPM: prepare to jump to Non-Secure image.
    
    
    
    
    ***** Booting Zephyr OS v1.14.99-ncs1 *****
    
    
    
    
    Application started
    
    
    
    
    LTE LC config ...
  • Hi John, 

    I tested your application "0535.jan_merged.hex".

    SPM: NS reset vector at 0xfda1
    SPM: prepare to jump to Non-Secure image.
    ***** Booting Zephyr OS v1.14.99-ncs1-1066-gf210011b9609 *****
    Application started
    LTE LC config ...
    NRF_CLOUD_EVT_TRANSPORT_CONNECTED
    NRF_CLOUD_EVT_USER_ASSOCIATION_REQUEST
    Please enter the user association pattern using the buttons and switches
    Button 2
    Button 1
    Switch 2
    Switch 1
    Switch 2
    Switch 1
    NRF_CLOUD_EVT_USER_ASSOCIATED
    NRF_CLOUD_EVT_TRANSPORT_DISCONNECTED
    NRF_CLOUD_EVT_TRANSPORT_CONNECTED
    NRF_CLOUD_EVT_USER_ASSOCIATED
    NRF_CLOUD_EVT_READY
    NRF_CLOUD_EVT_SENSOR_ATTACHED
    NRF_CLOUD_EVT_SENSOR_ATTACHED
    NRF_CLOUD_EVT_SENSOR_ATTACHED
    NRF_CLOUD_EVT_SENSOR_ATTACHED
    NRF_CLOUD_EVT_SENSOR_ATTACHED
    NRF_CLOUD_EVT_SENSOR_ATTACHED
    NRF_CLOUD_EVT_SENSOR_ATTACHED
    NRF_CLOUD_EVT_SENSOR_ATTACHED
    GPS device found

    Notice the ***** Booting Zephyr OS v1.14.99-ncs1-1066-gf210011b9609 *****

    Is different than what you are getting as output.


    Please do the following;

    - Erase what's on the chip: nrfjprog -e

    - Confirm that you flash that file the following way:

    nrfjprog --program 0535.jan_merged.hex -f nrf91 --sectorerase -r  --verify

    Then you should get the same output.

    (it is possible that there was "garbage data" from before interfering the application)

    Best Regards,
    Martin L.

  • Hi Martin, I did what you said and yesterday I was getting a different result, whereby I was seeing a continuous reboot complaining about a 111 error. Which in thinking about it may be entirely reasonable because looking at your log you have paired with nrfcloud.

    I'm guessing that my connection and CWALLACH's connection is "being refused" because a particular IMEI "yours" already has paired with nrfcloud.

    However this morning after

    After nrfjprog -e

    nrfjprog --program 0535.jan_merged.hex -f nrf91 --sectorerase -r  --verify

    I only receive

    SPM: NS image at 0x8000
    
    
    
    
    SPM: NS MSP at 0x2002a898
    
    
    
    
    SPM: NS reset vector at 0xfda1
    
    
    
    
    SPM: prepare to jump to Non-Secure image.
    
    
    
    
    ***** Booting Zephyr OS v1.14.99-ncs1-1066-gf210011b9609 *****
    
    
    
    
    Application started
    
    
    
    
    LTE LC config ...
    
    


    Are we missing a couple of steps here as discussed yesterday?

    Shouldn't I be loading SPM and downloading .elf first, because of the UICR and then reflashing the modem software then doing:?

    nrfjprog --program 0535.jan_merged.hex -f nrf91 --sectorerase -r  --verify

    Anyway the above non repeatable behavior regardless of the SPM thing seems similar to my experience with the NZ distributor that I spent several hours with yesterday, who were as always extremely helpful.

    Between ourselves we had two different machines (Windows 10) using the MASTER branch of the software Segger 4.16 Both compiled the Asset Tracker.

    With no changes to the merged.hex produced we were able to make three nrf9160-DK function as expected (begin pairing process) and by erasing the chip and loading SPM .elf and modem and same merged.hex fail whereby the pairing process was never initiated.

    By doing as mentioned above I think we have eliminated (I hope) the tools and the application, as it would seem most unlikely that we were able to between ourselves make identical boards (version 0.8.5) vacillate between functioning as expected and failing reliably with the same merged.hex. We can only surmise and or conclude that it is something related to the UICR mechanism and or modem. which we have no control over.

    On a completely different note:

    I have noticed that sometimes (perhaps it's me) that my environment becomes unstable when I manipulate the versions using git checkout <tag> and west update to the point that I trash the directory and start again with the following:

    mkdir ncs
    cd ncs
    west init -m github.com/.../fw-nrfconnect-nrf
    west update

    Then everything returns to normal for a while.

    If I may make a suggestion, as it seems that most users will be using either
    the MASTER branch or a tagged release of their choice that to avoid/eliminate any
    possible corruption potentially caused by Git or West that it would be really
    simple to upload relevant zips (in the usual format) of the tagged releases on the
    Nordic website?

    The software is complex enough without having to absolutely rely upon the various
    scripts involved to hopefully deliver the correct version of the software, which
    currently from my own experience, without grumbling about Git or anyone else
    most certainly doesn't seem as reliable as it should/could be.
    :)


    
    

  • Hi John,

    • Please use the recommended v0.4.0 tag

    How to get the v0.4.0 tag of NCS:

    cd ncs/ncs
    git checkout master
    git pull
    git checkout v0.4.0
    west update

    Then you do not need to worry about any other versions since this is a stable release. (it is not recommended to use the master branch)

    • Program the Asset Tracker sample

    Programming Asset Tracker tutorial

    If you have provisioned other keys to the modem flash you have overwritten the already pre-provisioned nrf cloud credentials which can be the reason why you cannot connect to the nrf cloud. If you can run the standard mqtt_simple sample and see that you get the expected result : https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/nrf9160/mqtt_simple/README.html

    Then this is most likely the reason why you cannot access the nrf cloud.

    If that is the case we can send you the certificates over a Direct message if you want to connect to the nrf cloud with your nrf91DK.


    Please go through the nRF Connect SDK tutorial which will answer your other questions: https://devzone.nordicsemi.com/nordic/cellular-iot-guides/b/getting-started-cellular/posts/nrf-connect-sdk-tutorial


    Please disregard the UICR.hex since the same functionality has been implemented in the spm. 

    Best Regards,
    Martin L.

Related