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

  • This is great news, Craig. Good progress!
     

    craig.goldman said:
    I've installed the new SES as directed.  It does look a bit different.  Funny that it has the same revision number.

    Yes, I agree, I was expecting a different version number and more details that would give us an answer regarding the Nordic Edition.  Some feedback to the SES team. 

    craig.goldman said:
    Connecting the board opened three serial ports.  One is for the nRF52840, one does nothing and the third seems to be the MQTT application.

     Yes, this is correct. The three ports are explained here, while the baud rate is covered in the NCS v0.4.0 documentation in the chapter "Testing a Sample Application"
     

    craig.goldman said:
    No further characters after "LTE Link Connecting..."

     Can you please issue the command AT+CFUN? one or two times? This should give more output from the modem regarding connection status. If this does not work, please load the AT_client (samples/nrf9160/at_client). Documentation on AT commands are found in the AT Command Reference Guide.

    craig.goldman said:
    recoverable error: 3

     This seams to be an ERRATA, more information here. If you do keep meeting this message, please follow the workaround in the link.

    craig.goldman said:
    ERROR: getaddrinfo failed 22
    ERROR: mqtt_connect -47

    getaddrinfo is a function to resolve the host name into IPv4 and/or IPv6 addresses, and part of the nrfxlib repository. 22 means Invalid argument.  mqtt_connect is part of the Zephyr Project, and is the API to request new MQTT client connection. The error code translates to "Level 3 reset". Both error codes, 22 and 47, can be found in "errno.h". I do not know the reason for these errors and will discuss the issue with my team, to find a root cause.

    craig.goldman said:
    What should I do next?

     While I discuss the issue with my team, please try the AT_client example and issue the AT+CFUN? command, then provide me the output. 

    Thanks!

    Kind regards,
    Øyvind

  • Sorry for the delay in responding; it was a busy week.

    AT+CFUN? returns.... 
    +CFUN: 4

    Were you expecting a longer response?

    I've re-built the at_client example.  I had successfully built and ran this in March.

    It doesn't seem to be working, now.  I built this example with board nrf9160_pca10090.  Should it be built with nrf9160_pca10090ns?  Do I need to manually download a merged hex file?

    NRF_Connect asked me to download an update and I did.

    The LTE_Monitor is reporting an error  -- JLINK_ARM_DLL_TOO_OLD.

    How do I fix that?

  • NRF_Connect asked me to download an update and I did.

    The LTE_Monitor is reporting an error  -- JLINK_ARM_DLL_TOO_OLD.

    First of all, if you have update nRF Connect to v2.7, there are known bugs with this version. Please ensure latest version of LTE Link Monitor (update in nRC Connect) and please download latest JLink drivers from Segger.com. If this does not help, we strongly advise downgrading to v2.6.2. 

    craig.goldman said:
    AT+CFUN? returns.... 
    +CFUN: 4

     Ok, this means that your modem is set to Offline or Flight Mode Please see AT Command CFUN documentation. You need to issue the command "AT+CFUN=1"

     

    craig.goldman said:
    I built this example with board nrf9160_pca10090.  Should it be built with nrf9160_pca10090ns?

    Yes, it still needs to be nrf9160_pca10090ns. This is due to the complexity of the nRF9160, more information here.

    craig.goldman said:
    Do I need to manually download a merged hex file?

    Yes, in Segger Embedded Studio (SES) v4.16 you need to manually program the device.  See this post on how the process is. We are working with a fix for newer version SES.

    Let me know how this works for you!

    Kind regards,
    Øyvind

  • I have upgraded my JLINK DLL drivers.  "at_client" has been built with nrf9160_pca10090ns. The merged.hex was manually downloaded.

    nRF Connect is v2.7.0.  LTE Link Monitor is v0.9.2

    When I open the device it reports....
    Opening COM6: File not found

    LTE commands time-out.

    UART, Modem, etc. all marked as gray boxes.

    The code says it is running, but I'm not sure that it is working.

    How do I downgrade nRF Connect to v.2.6.2?

    Do you have any other suggestions?

  • craig.goldman said:
    When I open the device it reports....
    Opening COM6: File not found

     Can you please provide a screenshot of the LTE Link Monitor?

    craig.goldman said:
    How do I downgrade nRF Connect to v.2.6.2?

     The issues that were first seen in version 2.7 should be fixed now, so there should be no need to downgrade after all. 

Related