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

Problems connecting nRF9160 DK to gcloud.

Hello!

So I'm working on a project where I try to connect the nRF9160 DK to the google cloud. I tried to manage this by following this guide: https://devzone.nordicsemi.com/nordic/cellular-iot-guides/b/software-and-protocols/posts/how-to-connect-nrf91-to-google-cloud

However, when running the code and booting up the nRF9160 DK I get this:



the description of the "gcloud: MQTT connect failed: -111" is failed authentication. I have checked if the private key and the certificate is matching, and they are.

The guide says Google's root certificate is needed and will be handled by the gcloud library, this is where I'm becoming a little uncertain. Should I just replace the ROOT_CERT with one of the ones that google provides like this: 


or is this where I have misunderstood?

Appreciate all the help I could get!

Parents
  • Hi,

    Yes, ROOT_CERT is Google's root certificate, which you can get using the following link: roots.pem (the file will automatically download when clicking the link). The certificates file contains several certificates, but in the project from the blog post the last certificate in the file was used. The root certificates have been updated since then, but I would try using the last one in the latest certificates file as well.

    Please note that the blog post as well as the project is more than a year old and based on an old and outdated version of NCS (I believe it was based on v0.4.0). Therefore, the project will not work as it is with newer versions of NCS, and I would not recommend using v0.4.0. You would have to port the project to a newer version of NCS if you want to use it. Someone in the comments of that blog post has ported the gcloud library to NCS v1.3.0, and also added support for Thingy:91, so I would advise you to take a look at that. You can find the github repo here.

    Please don't hesitate to ask if you have any more questions!

    Best regards,

    Marte

  • Thank you for your answer! I did not manage to make the code work, neither by porting it or looking at the github repo that you linked. This is probably because of the lack of knowledge from my end. However, I tried this tutorial instead, which I managed to get up and running. The downside is that I now have to make my own server instead of using the google cloud.

Reply Children
No Data
Related