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

Problem with MQTT_Simple

I am having a problem running MQTT_Simple on my nRF9160 DK.

The COM Port shows the following:

***** BUS FAULT *****
  Precise data bus error
  BFAR Address: 0x4002a514
***** Hardware exception *****
Current thread ID = 0x20000324
Faulting instruction address = 0x6704
Fatal fault in essential thread! Spinning...

I have recently updated SES, but the code still produces the bus fault.

Case ID: 226428 seems to be similar, but the discussion involves several "experiments" only some of which were productive.

So, could someone explicitly lists the steps needed to get this example working.  I wish to use it as the basis for a new product that sends data to the cloud.

Thank you,

-Craig Goldman

Parents
  • Have you tried updating to the latest firmware for the nrf9160 DK? Did you try "west update" to get the latest release?

    Also when, using the latest versions, you have to use build solution, connect target and then program the merged.hex file like mentioned here:

    https://devzone.nordicsemi.com/f/nordic-q-a/47032/mqtt_simple-programmed-to-wrong-address-range-00008000----00020abb

  • Thank you for your response (and sorry for the delay in responding).  I was not aware that I had to do something special to program the merged file.

    I am preparing to do a complete new download of the NCS directory and will try all these suggestions in the next few days.  I will report my results.

  • The monitor is acting different this morning.

    Also, I'm not sure this is a good location for cellular connection.  I'll try everything again at a better location this weekend.

    Here is Monitor snap shot

  • More interesting (promising?) information regarding mqtt_simple.

    I decided to re-build and re-download mqtt_simple on the board in a very strong cellular area.

    I also decided to activate the LTE_Monitor instead of the terminal emulator.

    When I reset the board, I got the same boot-up and the same error messages....
    ***** Booting Zephyr OS v1.14.99-ncs1-587-g5c5ba77d0170 *****
    The MQTT simple sample started
    LTE Link Connecting ...
    LTE Link Connected!
    ERROR: getaddrinfo failed 22
    ERROR: mqtt_connect -47

    Per earlier instructions, I send the command AT+CFUN?.  On the third try, the board sprung to life - the modem activated and the terminal every 10 seconds or so would send "AT+CESQ" and the device would respond with +CESQ: 99,99,255,255,255,76

    Eventually the "LTE" indicated it was searching.  It did this for awhile until I sent another AT+CFUN? command (using the push button this time).

    Everything now seems to be connected.

    Here are a couple of screen shots.

    I'm not sure how to attach the log file, if you are interested.

    This looks very good to me.  (Please tell me if I am being overly optimistic.)

    Still have issues with asset_tracker, but I'll play with it some more now that I know that you have to poke the application to get it to run.

    Is there anything more I can do with mqtt_simple?  Otherwise, I'll look into modifying this code to communicate with the 64Seconds mqtt_server.

    I appreciate all the help in getting me this far.

    If you can point me to any documents which discuss modifying mqtt_simple to be used in other applications or have any suggestions to get me started, I welcome all help.

    Thank you again.
    -Craig Goldman

  • Hi Craig,

     

    From the logs that you posted, it seems that your modem firmware is quite old.

    Could you please download the latest one from here:

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

    And try the mqtt_simple example again?

     

    Kind regards,

    Håkon

  • Sorry if this is a duplicate post, my previous reply a few minutes ago seems to have disappeared.

    Followed instructions and encountered problems.

    First, instructions call for command of "pip install nrf9160_mdm_dfu-0.10.1+dev-py3-none-any.whl", but the fie included in the download is "nrf9160_mdm_dfu-0.10.0+dev-py3-none-any.whl"

    Second, after I install, I run the following and get errors....

    c:\SwTools\Nordic Semi\2019-06-25 nRF9160 Modem Update>nrf9160_mdm_dfu --update
    Traceback (most recent call last):
      File "c:\python37\lib\runpy.py", line 193, in _run_module_as_main
        "__main__", mod_spec)
      File "c:\python37\lib\runpy.py", line 85, in _run_code
        exec(code, run_globals)
      File "C:\Python37\Scripts\nrf9160_mdm_dfu.exe\__main__.py", line 9, in <module>
      File "c:\python37\lib\site-packages\nrf9160_mdm_dfu\bin\nrf9160_mdm_dfu.py", line 24, in main
        nrf_dfu = nrf_dfu_API.nrf_dfu_API(quiet=args.quiet)
      File "c:\python37\lib\site-packages\nrf9160_mdm_dfu\api\nrf_dfu_API.py", line 37, in __init__
        self.api = API.API("NRF91")
      File "c:\python37\lib\site-packages\pynrfjprog\API.py", line 375, in __init__
        jlink_arm_dll_path = JLink.find_latest_dll()
      File "c:\python37\lib\site-packages\pynrfjprog\JLink.py", line 31, in find_latest_dll
        for root, dirs, files in os.walk(os.path.join(_DEFAULT_SEGGER_ROOT_PATH, jlink_sw_dirs[-1])):
    IndexError: list index out of range

    Any thoughts about what went wrong?
    Could it be that the download included "nrf9160_mdm_dfu-0.10.0+dev-py3-none-any.whl" but should have included "nrf9160_mdm_dfu-0.10.1+dev-py3-none-any.whl"?

    -Craig Goldman

  • Hi Craig,

     

    It looks like it cannot find your segger installation.

    Could you try downloading the latest driver from here, and see if that works?

    https://www.segger.com/downloads/jlink/

     

    Regarding the readme.txt, I'll report this internally. This should not have an impact on the modem upgrade procedure.

     

    Kind regards,

    Håkon

Reply Children
Related