<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>How do we use nrf9160DK with google cloud MQTT Pub/Sub?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71473/how-do-we-use-nrf9160dk-with-google-cloud-mqtt-pub-sub</link><description>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</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 23 Dec 2021 12:39:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71473/how-do-we-use-nrf9160dk-with-google-cloud-mqtt-pub-sub" /><item><title>RE: How do we use nrf9160DK with google cloud MQTT Pub/Sub?</title><link>https://devzone.nordicsemi.com/thread/344946?ContentTypeID=1</link><pubDate>Thu, 23 Dec 2021 12:39:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b843e07-77a5-490c-98f7-da2dfe5e7906</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi, Jeffrey!&lt;br /&gt;&lt;br /&gt;Great stuff! I will have a look at our version as well over the holidays and see if I can updated it to work with newer versions of the SDK.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;One thing that you should be aware of when connecting to GCloud. The JWT must be updated every 24 hours, according to the &lt;a href="https://cloud.google.com/iot/quotas#time_limits"&gt;specified time limits&lt;/a&gt;. I can&amp;#39;t see that the google_iot_mqtt sample does this, it should be updated.&lt;br /&gt;&lt;br /&gt;Have a merry Christmas!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do we use nrf9160DK with google cloud MQTT Pub/Sub?</title><link>https://devzone.nordicsemi.com/thread/340379?ContentTypeID=1</link><pubDate>Tue, 23 Nov 2021 14:30:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d48c5b2e-2f65-4a42-bbc9-920c958707f6</guid><dc:creator>Jeffrey Urban</dc:creator><description>&lt;p&gt;&lt;span&gt;I moved the example to a new repo&amp;nbsp;&lt;/span&gt;&lt;span&gt;&lt;a href="https://github.com/JeffreyUrban/sdk-nrf."&gt;github.com/.../sdk-nrf.&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do we use nrf9160DK with google cloud MQTT Pub/Sub?</title><link>https://devzone.nordicsemi.com/thread/340208?ContentTypeID=1</link><pubDate>Tue, 23 Nov 2021 00:37:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68993fbf-be2a-4f01-8939-6aac16584642</guid><dc:creator>Jeffrey Urban</dc:creator><description>&lt;p&gt;&lt;span&gt;As an alternative solution, I adapted the Zephyr google_iot_mqtt example to&amp;nbsp;work&amp;nbsp;&lt;/span&gt;&lt;span&gt;on my nRF9160-DK dev kit with nRF Connect SDK v1.71. and modem firmware v1.31. See&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/6154"&gt;this pull request&lt;/a&gt;.&amp;nbsp;Instructions are in&amp;nbsp;the README.rst.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do we use nrf9160DK with google cloud MQTT Pub/Sub?</title><link>https://devzone.nordicsemi.com/thread/339276?ContentTypeID=1</link><pubDate>Tue, 16 Nov 2021 15:02:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cbf1cd5d-f575-4b5a-a15c-b3e61c080d66</guid><dc:creator>Jeffrey Urban</dc:creator><description>&lt;p&gt;Trying the code from&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nrf_5F00_to_5F00_gcloud_5F00_ncs1.5.0.zip"&gt;nrf_to_gcloud_ncs1.5.0.zip&lt;/a&gt;&amp;nbsp;on nRF Connect v1.7.1 with my nRF9610 DK,&amp;nbsp;Zephyr&amp;nbsp;reboots after &amp;quot;Establishing LTE link&amp;quot; and before &amp;quot;Initializing modem info&amp;quot;. Sometimes it gets a little further, and crashes after &amp;quot;Initializing modem info&amp;quot;.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do we use nrf9160DK with google cloud MQTT Pub/Sub?</title><link>https://devzone.nordicsemi.com/thread/299992?ContentTypeID=1</link><pubDate>Tue, 16 Mar 2021 06:55:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4132b6f-a896-40a7-abc4-e273a484af57</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi again!&lt;br /&gt;&lt;br /&gt;No problem! Glad to hear that it works for you and that you got the subscription in order as well.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Please reach out if you face any other issues.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do we use nrf9160DK with google cloud MQTT Pub/Sub?</title><link>https://devzone.nordicsemi.com/thread/299937?ContentTypeID=1</link><pubDate>Mon, 15 Mar 2021 17:52:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee9b239d-ef32-409f-b823-64bbcfeb01a5</guid><dc:creator>Yuyanton</dc:creator><description>&lt;p&gt;Hi Carl Richard!&lt;br /&gt;&lt;br /&gt;Sorry for the delayed reply&lt;br /&gt;&lt;br /&gt;We had to temporarily set this on hold while working with other things. We have finally got back to testing with google cloud, and your sample is working fine! &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f604.svg" title="Smile"&gt;&amp;#x1f604;&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;We have also enabled subscription on the default command-topic from google devices. We did this by running this function on the received data:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt;int mqtt_readall_publish_payload(structmqtt_client *client, uint8_t *buffer, size_t length)&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you again for helping us!&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;&lt;br /&gt;Yuyanton&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do we use nrf9160DK with google cloud MQTT Pub/Sub?</title><link>https://devzone.nordicsemi.com/thread/296888?ContentTypeID=1</link><pubDate>Mon, 01 Mar 2021 14:17:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:382f94df-aae5-4129-8918-2fc806323d82</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi again!&lt;br /&gt;&lt;br /&gt;I have a working sample now. If you setup the device according to the &lt;a href="https://devzone.nordicsemi.com/nordic/cellular-iot-guides/b/software-and-protocols/posts/how-to-connect-nrf91-to-google-cloud"&gt;blog post&lt;/a&gt;&amp;nbsp;(or readme)&amp;nbsp;it should work properly (even with the &amp;quot;old&amp;quot; Root CA). I&amp;#39;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.&lt;br /&gt;&lt;br /&gt;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!&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/nrf_5F00_to_5F00_gcloud_5F00_ncs1.5.0.zip"&gt;devzone.nordicsemi.com/.../nrf_5F00_to_5F00_gcloud_5F00_ncs1.5.0.zip&lt;/a&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do we use nrf9160DK with google cloud MQTT Pub/Sub?</title><link>https://devzone.nordicsemi.com/thread/296744?ContentTypeID=1</link><pubDate>Mon, 01 Mar 2021 07:08:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f5a775d-82ba-48d8-a2b9-430e08cf4237</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi again!&lt;br /&gt;&lt;br /&gt;Just wanted to pop in and update that I&amp;#39;m working on getting a simple sample up and running now!&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do we use nrf9160DK with google cloud MQTT Pub/Sub?</title><link>https://devzone.nordicsemi.com/thread/296367?ContentTypeID=1</link><pubDate>Thu, 25 Feb 2021 16:34:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf3b45ed-8389-40cb-b058-2fda11c37169</guid><dc:creator>Yuyanton</dc:creator><description>&lt;p&gt;Hi again&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;We&amp;#39;ve been trying to port different gcloud projects over the past week, including, but not limited to (&lt;a href="https://docs.zephyrproject.org/latest/samples/net/cloud/google_iot_mqtt/README.html"&gt;ZephyrGoogleIoT&lt;/a&gt;&amp;nbsp;and pathfinder), but haven&amp;#39;t been able to make it work.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Unfortunately we don&amp;#39;t have enough experience to make a proper port of others code. Most of our attempts we don&amp;#39;t really know what we are doing.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Something we noticed across the different projects is that the CA certificate varies, but we don&amp;#39;t know how it works or how to set it up correctly.&amp;nbsp;That seems to be the issue.&lt;br /&gt;Everything else including JWT used for authenticating device seems to be the same for all the projects.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Would it be possible for you to make a simple example for our use case?&lt;/p&gt;
&lt;p&gt;(Connect to Gcloud, publish a message via MQTT from nrf9160dk)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind Regards,&lt;/p&gt;
&lt;p&gt;Yuyanton&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do we use nrf9160DK with google cloud MQTT Pub/Sub?</title><link>https://devzone.nordicsemi.com/thread/294896?ContentTypeID=1</link><pubDate>Wed, 17 Feb 2021 14:35:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88d85cb5-4353-41b7-bcdf-53801e15cad7</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi!&lt;br /&gt;&lt;br /&gt;1. Great!&amp;nbsp;&lt;br /&gt;&lt;br /&gt;2. Understood! Looking through the code now. Does the log provide any meaningful information? I still recommend debugging the code to see where it gets stuck. I&amp;#39;ve also attached the &lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/nrf9160-pathfinder"&gt;pathfinder project&lt;/a&gt;, which was done on NCS v1.0.0 (i.e. newer) and should be easier to port.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/pathfinder.zip"&gt;devzone.nordicsemi.com/.../pathfinder.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do we use nrf9160DK with google cloud MQTT Pub/Sub?</title><link>https://devzone.nordicsemi.com/thread/294695?ContentTypeID=1</link><pubDate>Tue, 16 Feb 2021 16:28:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cbd82545-51af-4a42-9422-bfb6bdb3be4e</guid><dc:creator>Yuyanton</dc:creator><description>&lt;p&gt;Hi again!&lt;/p&gt;
&lt;p&gt;1.&lt;/p&gt;
&lt;p&gt;Yes, the LED1 does turn on before gcloud_connect() is called.&lt;/p&gt;
&lt;p&gt;2.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We have not tested the gcloud_thread since we have made new changes to our code since the last time we uploaded our zip-file in DevZone.&amp;nbsp;&lt;br /&gt;The changes we&amp;#39;ve made does not make use of threads but&amp;nbsp;still tries&amp;nbsp;to connect to GCP after we&amp;#39;ve succesfully run Modem_configure(). This version of our code is based on mqtt_simple. We tried adding what we thought was necessary from gcloud.c.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Attached is our new version of the code.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/mqtt_5F00_gcloud_5F00_custom.zip"&gt;devzone.nordicsemi.com/.../mqtt_5F00_gcloud_5F00_custom.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do we use nrf9160DK with google cloud MQTT Pub/Sub?</title><link>https://devzone.nordicsemi.com/thread/294675?ContentTypeID=1</link><pubDate>Tue, 16 Feb 2021 15:24:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e307194b-3684-4d35-a765-a3920dd5c915</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi!&lt;br /&gt;&lt;br /&gt;Continuing our offline discussion here.&amp;nbsp;I notice two things in your log:&lt;br /&gt;1. The application tries to (seemingly) connect to GCP before the LTE connection is established. This may be because LOG messages are less prioritized than printk. Does LED1 turn on before&amp;nbsp;gcloud_connect(...) is called?&lt;br /&gt;2. The gcloud_thread is not started at all. The code you have based your application on has implemented some &lt;a href="https://github.com/mcallistertad/nrf_google_iot_core/blob/995e1a1af126efb189f4f16c4698c2484e012892/src/main.c#L719"&gt;changes to how the threads are started&lt;/a&gt;, though they are removed in your code. Try to add them again so that the thread is started properly. Alternatively you can uncomment line 72, 73 and 74 in gcloud.c.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How do we use nrf9160DK with google cloud MQTT Pub/Sub?</title><link>https://devzone.nordicsemi.com/thread/293777?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2021 13:29:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfe8b79a-fec2-4ecc-88cf-5cfad7f62503</guid><dc:creator>Marte Myrvold</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;As of now, we do not have any official updated example where the nRF9160 connects to Google Cloud. The first guide you linked to was a student project, and as such has not been updated. I believe it was built using NCS v0.4.0, so it&amp;#39;s very outdated, and you&amp;#39;re correct that this causes it to not work. The SDK has changed a lot since that version, so it might not be straightforward to get it to work with a newer version of NCS. Something you can also do is to look at the samples we have in NCS that connects to other cloud services and uses MQTT, such as&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.4.2/nrf/samples/nrf9160/mqtt_simple/README.html"&gt;Simple MQTT&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.4.2/nrf/samples/nrf9160/cloud_client/README.html"&gt;Cloud client&lt;/a&gt;, to see how this is done with other cloud services than Google.&lt;/p&gt;
&lt;p&gt;You should be able to see whether your device is connected or not in the Google Cloud Platform.&amp;nbsp;When you go to IoT Core -&amp;gt; &amp;lt;your_registry&amp;gt; -&amp;gt; Devices, you should be able to see a list over your devices and when they were last seen. If they haven&amp;#39;t been seen yet, you haven&amp;#39;t been able to connect to Google Cloud and communicate with it. You can also see active devices under Monitoring in IoT Core. From your log it seems like it wasn&amp;#39;t able to connect to Google Cloud. It started connecting, but there&amp;#39;s no log that you successfully connected, and it says that you&amp;#39;re trying to publish data while not connected.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marte&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>