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

nRF9160 to Google Cloud Pub/Sub: Build errors

Hi,

I followed this guide to send data to the GCP using the Thingy:91 : https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/how-to-connect-nrf91-to-google-cloud

Im pretty sure I did it correct and followed all steps listed there.

But I can't get it to build. I tried it with the v0.4.0 tag and also master, cause this was recommended here in the forum.

This is my build error log:


Any help is appreciated!

Thanks,

Tim

Parents
  • Hi,

    I fixed the error. After moving the whole directory to the c drive root instead of using all these sub folders.

    After writing the hex file to the thingy:91 this is the serial output. Did messed something up with the certificates?

  • Hi,

    Have you tried with version v1.0.0 of ncs?

    Also, to get more information about when the hard fault happened, you can open the file /build/zephyr/zephyr.lst and search for your faulting instruction address, which is 1921c in the output above.

  • Yes, I'm already on v1.0.0.

    To be honest, I've no idea what this tells me:

    Thanks,

    Tim

  • Hi Tim,

    This tells you that it fails at 

    If you scroll up, you will see which function it fails in, which I assume is the following:

    It seems like the problem might be related to nRF9160DK and Thingy:91 having different pinouts, considering the project was originally written for the DK. I would assume that the LEDs are the problem, so one possible fix is to remove all instances in main.c where the following function is called

    Let me know whether this works.

    Best Regard,

    Marte

  • Hi Marte,

    this did the trick! Now it is not crashing anymore. Grimacing

    Now it fails at sending the data... :D 

    With the lte link monitor I proved that I have an lte connection, so this should not be the reason for the error.

    I also get the "CONNACK" so I have a connection, right?

    Right after the "Connect acknowledgment" I get "MQTT connect failed: 5". 

    I will search around to finf out what this means. :)

    Do you might have another tip for me?

    Best regards,

    Tim

  • Hi ,

    I tried it again today and now I get error -13.

    I tried to find some information about the error number but can't find any.

    Thanks.

    Tim

Reply
  • Hi ,

    I tried it again today and now I get error -13.

    I tried to find some information about the error number but can't find any.

    Thanks.

    Tim

Children
  • Hi Tim,

    In order to find what error number -13 is, you can use strerror().

    This will print what error number -13 corresponds to. You can add this where the following is in the code

    That is, line 635 in gcloud.c

    strerror() must take a positive error number, hence the minus in front of err in the code above.

    Hope this helps.

    Best regards,

    Marte

  • Hi ,

    now it works. The problem was in the Google Cloud I guess. Something with the certificates. The error was "connection refused" so I added the device again to the cloud. Slight smile

  • Hi Tim,

    Yes, connection refused does sound like a problem with certificates or how the device was added on Google Cloud.

    Great that you managed to solve it!

  • Hi

    I am facing the same above issue while connecting my Thingy91 PCA20035 device to Google cloud uisng MQTT bridge.

    I have placed nRFDKtoGoogleCloud folder inside the ncs-folder, for example giving the path \ncs\nrf\samples\nrf9160\nRF9160DKtoGoogleCloud.

    I followed this guide to send data to the GCP using the Thingy:91https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/how-to-connect-nrf91-to-google-cloud

    I m pretty sure I did it correct and followed all steps listed there.

    After writing the hex file to the thingy:91 this is the serial output.

    This is my build error logs:

    Please help me with the possible solution to fix the above issue.

    This is missing my final deadline for production.

    Thanks

     

  • Hi Dheeraj, please make a new ticket on DevZone and explain the issue while also linking to this ticket if it's similar. 

    Best regards,

    Heidi