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

How do we use nrf9160DK with google cloud MQTT Pub/Sub?

Hi

We are a group of students working with the nRF9160dk.

We want to try connecting the nRF9160dk to google cloud and send data through MQTT.

We have tried to follow this guide (link to guide), but the setup does not work and we assume that it is because it's developed using an older SDK version.

We saw a repository (repository) in the comments of the guide which is more up to date.

Based on the newer repository, we have made a project that is similar in structure to the guide.

It builds and runs, but we don't know how it is supposed to subscribe to a topic we've made in the Pub/Sub service.

In addition we aren't sure if it's actually connected to our Google cloud project since the output in link monitor tells us we've got a connection, but it can't publish messages.

System info:

Operative System: Windows 10

Hardware: nRF9160dk, firmware 

Software: ncs v1.4.99-dev1

Zipped code & log from Link Monitor:

nrfgcloud_new.7z

Google cloud setup:

- Project Info
 

- Registry Info

- Device info

- Pub/Sub     topic & subscription & member/role

Parents Reply
  • Hi again!

    I have a working sample now. If you setup the device according to the blog post (or readme) it should work properly (even with the "old" Root CA). I've disabled topic subscription in the sample as there were some issues with the handling of the received messages, but I believe this is good enough for you to get started.

    The sample is tested on version 1.5 of the nRF Connect SDK. The main loop simply publishes data with a timestamp at fixed intervals. I hope this helps you on your way and as always; feedback would be appreciated! 

     nrf_to_gcloud_ncs1.5.0.zip
    Best regards,
    Carl Richard

Children
Related