<?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>Mqtt client  Nrf9160 Module</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70640/mqtt-client-nrf9160-module</link><description>My nrf9160 isn&amp;#39;t responsive to the AT commands for MQTT mentioned here . I want to know why is that so? I&amp;#39;ve put certificates in the module from AWS-Iot core and flashed at_client example inside the nrf9160 and trying to send AT #XMQTTCON command to connect</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 27 Jan 2021 09:43:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70640/mqtt-client-nrf9160-module" /><item><title>RE: Mqtt client  Nrf9160 Module</title><link>https://devzone.nordicsemi.com/thread/291454?ContentTypeID=1</link><pubDate>Wed, 27 Jan 2021 09:43:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33e743a5-1441-41ff-b28a-e166ff58233a</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I&amp;#39;m glad that you were able to fix this issue. I have reported the documentation bug to our NCS team.&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mqtt client  Nrf9160 Module</title><link>https://devzone.nordicsemi.com/thread/291165?ContentTypeID=1</link><pubDate>Tue, 26 Jan 2021 05:12:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1bb0cfa-3553-4925-b040-abc63dc8b855</guid><dc:creator>Ukhan</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;I could finally connect to AWS-IoT core on SLM.&lt;br /&gt;There are issues with the slm application I suppose, but here is what I did that let me connect.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Updated Modem to latest fw.&lt;/li&gt;
&lt;li&gt;Removed all the certificates that were there in the modem.&lt;/li&gt;
&lt;li&gt;Flashed new certificates on the modem for the IoT thing created in AWS.&lt;/li&gt;
&lt;li&gt;In AWS IoT Core, subscribed to all the topics mentioned below:&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;aws/things/uskh-n91/shadow/get/accepted&lt;/li&gt;
&lt;li&gt;aws/things/uskh-n91/shadow/get/rejected&lt;/li&gt;
&lt;li&gt;Aws/things/uskh-n91/shadow/update/accepted&lt;/li&gt;
&lt;li&gt;aws/things/uskh-n91/shadow/update/delta&lt;/li&gt;
&lt;li&gt;aws/things/uskh-n91/shadow/update/rejected&lt;/li&gt;
&lt;li&gt;aws/things/uskh-n91/shadow/delete/accepted&lt;/li&gt;
&lt;li&gt;aws/things/uskh-n91/shadow/delete/rejected&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;From LTE Link Monitor I sent the following commands:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;AT+CFUN=1&lt;/li&gt;
&lt;li&gt;AT+CFUN? (Queries all the configurations if automatic requests are enabled on LTE Link Monitor)&lt;br /&gt;&lt;br /&gt;Now, once I see&amp;nbsp;LTE is registered, I send the&amp;nbsp;&lt;span&gt;XMQTTCON&amp;nbsp; and it responds with&amp;nbsp;&lt;br /&gt;&lt;br /&gt;2021-01-26T02:36:27.941Z DEBUG modem &amp;lt;&amp;lt; OK&lt;br /&gt;2021-01-26T02:36:28.621Z DEBUG modem &amp;lt;&amp;lt; #XMQTTEVT: 0,0&lt;br /&gt;&lt;br /&gt;Attached are the logs for your reference. &lt;br /&gt;&lt;br /&gt;Now I haven&amp;#39;t dug deep into the issue and it&amp;nbsp;can be looked into further and fixed. &lt;br /&gt;&lt;br /&gt;However, following those steps I could establish a connection and publish and subscribe to AWS via MQTT.&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;Please update the documentation &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/serial_lte_modem/doc/MQTT_AT_commands.html#mqtt-publish-xmqttpub"&gt;here&lt;/a&gt;, like I mentioned before, that&amp;#39;s very misleading, stating 0 for connect and 1 for disconnect.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2021_2D00_01_2D00_26T02_5F00_35_5F00_42.210Z_2D00_log.txt"&gt;devzone.nordicsemi.com/.../2021_2D00_01_2D00_26T02_5F00_35_5F00_42.210Z_2D00_log.txt&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;terminal a contact on an electrical device (such as a battery) at which electric current enters or leaves More (Definitions, Synonyms, Translation) &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mqtt client  Nrf9160 Module</title><link>https://devzone.nordicsemi.com/thread/291124?ContentTypeID=1</link><pubDate>Mon, 25 Jan 2021 17:13:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bf1b7a2-8e65-4e36-b26e-c651c8f37fcc</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello &lt;a href="https://devzone.nordicsemi.com/members/ukhan"&gt;Ukhan&lt;/a&gt;,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m seeing the same issue as you with SLM. When trying to send XMQTTCON i receive ERROR. Will forward to our developer.&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mqtt client  Nrf9160 Module</title><link>https://devzone.nordicsemi.com/thread/290952?ContentTypeID=1</link><pubDate>Mon, 25 Jan 2021 09:03:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e89be6e-8d11-4942-800f-0fae4fa12c7b</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve been testing AWS_IoT on my side, and I&amp;#39;m not able to reproduce the error.&lt;br /&gt;&lt;br /&gt;Have you verified that&amp;nbsp;CONFIG_AWS_IOT_CLIENT_ID_STATIC is configured to your Thing ID, and that your device is programmed with correct certificates which belong to your Thing ID? Have you used correct certificates? As described in step 9 of &amp;quot;Creating a thing in AWS IoT&amp;quot;?&lt;br /&gt;&lt;br /&gt;Also, have you configured correct Rest API Endpoint in CONFIG_AWS_IOT_BROKER_HOST_NAME ? And configured&amp;nbsp;CONFIG_AWS_IOT_SEC_TAG to the correct sec tag used when provisioning certificates?&lt;br /&gt;&lt;br /&gt;I will test with the SLM MQTT API as well and get back to you.&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mqtt client  Nrf9160 Module</title><link>https://devzone.nordicsemi.com/thread/290632?ContentTypeID=1</link><pubDate>Fri, 22 Jan 2021 02:37:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b85acaf4-594e-4dda-bc6a-523da4f32897</guid><dc:creator>Ukhan</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8883_2D00_log.txt"&gt;devzone.nordicsemi.com/.../8883_2D00_log.txt&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/443_2D00_log.txt"&gt;devzone.nordicsemi.com/.../443_2D00_log.txt&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span&gt;Are you able to provide a full log output when connecting to AWS-IoT?&lt;br /&gt;See attachments.&lt;br /&gt;&lt;br /&gt;What modem fw are you running? &lt;br /&gt;&lt;span class="tx"&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;at+cgmr&lt;/pre&gt;
&lt;pre&gt;mfw_nrf9160_1.2.2&lt;/pre&gt;
&lt;p&gt;&lt;span&gt;&lt;br /&gt;And what is the network provider that you use?&lt;br /&gt;1nce&amp;nbsp;SIM and tried with two MNOs : Korea Telecom and SKT&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mqtt client  Nrf9160 Module</title><link>https://devzone.nordicsemi.com/thread/290429?ContentTypeID=1</link><pubDate>Thu, 21 Jan 2021 10:00:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10d08a57-2ab8-4544-8f2a-a1ff4a5ff9fe</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Are you able to provide a full log output when connecting to AWS-IoT? Both with 433 and 8333. I&amp;nbsp; will discuss this with our R&amp;amp;D team. What modem fw are you running? And what is the network provider that you use?&lt;br /&gt;&lt;br /&gt;&lt;em&gt;aws_iot_connect, error: -119&lt;/em&gt; means &amp;quot;&lt;a href="https://github.com/eblot/newlib/blob/2a63fa0fd26ffb6603f69d9e369e944fe449c246/newlib/libc/include/sys/errno.h#L150"&gt;Connection already in progress&lt;/a&gt;&amp;quot;, while&amp;nbsp;&lt;em&gt;mqtt_connect, error: -116&lt;/em&gt; means &amp;quot;&lt;a href="https://github.com/eblot/newlib/blob/2a63fa0fd26ffb6603f69d9e369e944fe449c246/newlib/libc/include/sys/errno.h#L147"&gt;Connection timed out&lt;/a&gt;&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mqtt client  Nrf9160 Module</title><link>https://devzone.nordicsemi.com/thread/290383?ContentTypeID=1</link><pubDate>Thu, 21 Jan 2021 04:26:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc4d2204-56cd-4fff-a973-d131f2ffeaa3</guid><dc:creator>Ukhan</dc:creator><description>&lt;p&gt;I tried the simple one before and AWS-IoT example as well. I tried everything again.&lt;br /&gt; And it seems to be a problem with the MNO as&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/farhangj"&gt;Farhang&lt;/a&gt;&amp;nbsp;pointed out in the ticket you shared.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Now, I have tried two different&amp;nbsp;MNOs KT and SK Telecom(by configuring with AT commands) and both of them have a problem with&amp;nbsp;socket connection.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;On AWS Cloudwatch I can see this&amp;nbsp;&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1611195550346v1.png" alt=" " /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The&amp;nbsp;AWS-IoT example in the&amp;nbsp;NCS, I tried that as well, with two different ports: 8333 and 443. &lt;br /&gt;With&amp;nbsp;433 it gives the&amp;nbsp;&lt;span style="background-color:#33cccc;"&gt;&lt;em&gt;aws_iot_connect, error: -119&lt;/em&gt;&lt;/span&gt; and with 8333 it gives&amp;nbsp;&lt;span&gt;&lt;span style="background-color:#00ffff;"&gt;&lt;em&gt;E: mqtt_connect, error: -116&lt;/em&gt;&lt;/span&gt;.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Can you highlight what else can I try?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mqtt client  Nrf9160 Module</title><link>https://devzone.nordicsemi.com/thread/290299?ContentTypeID=1</link><pubDate>Wed, 20 Jan 2021 14:25:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd93aecc-2ae1-4a92-9f6f-40617b1a67b4</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Have you tested the MQTT connection using e.g. &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.4.2/nrf/samples/nrf9160/mqtt_simple/README.html#nrf9160-simple-mqtt"&gt;Simple MQTT sample&lt;/a&gt;? Have a look at the &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/59767/cloud_send-fail-aws_iot-with-nrf9160"&gt;answer my colleague Heidi gives here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Please make sure to use correct username, password and sec_tag for your certificates. Have you verified that you have added correct certificates?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mqtt client  Nrf9160 Module</title><link>https://devzone.nordicsemi.com/thread/290282?ContentTypeID=1</link><pubDate>Wed, 20 Jan 2021 13:52:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:63684d01-c431-40c9-b6e8-3c525b423783</guid><dc:creator>Ukhan</dc:creator><description>&lt;p&gt;Could you explain how do I fix that? Do I need to issue a different at command before that?&lt;br /&gt;I was assuming all of this will be handled in the slm application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mqtt client  Nrf9160 Module</title><link>https://devzone.nordicsemi.com/thread/290228?ContentTypeID=1</link><pubDate>Wed, 20 Jan 2021 11:46:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88e7df87-2667-4c53-b8b4-428854c86048</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Yes, you are correct. There seems to be a bug in the documentation which I will report. This also explains the ERROR you received in your last comment.&lt;br /&gt;&lt;br /&gt;The MQTTEVT reports -128, which means &lt;a href="https://github.com/eblot/newlib/blob/2a63fa0fd26ffb6603f69d9e369e944fe449c246/newlib/libc/include/sys/errno.h#L161"&gt;&amp;quot;Socket is not connected&amp;quot;&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mqtt client  Nrf9160 Module</title><link>https://devzone.nordicsemi.com/thread/290131?ContentTypeID=1</link><pubDate>Wed, 20 Jan 2021 08:02:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40d02566-18bc-40a1-9668-981b0a18825b</guid><dc:creator>Ukhan</dc:creator><description>&lt;p&gt;Correct me if I am wrong but in the code the macro&amp;nbsp;AT_MQTTCON_CONNECT is set to 1 while in the documentation it says&amp;nbsp;&lt;/p&gt;
&lt;div class="highlight-default notranslate"&gt;
&lt;div class="highlight"&gt;
&lt;pre&gt;&lt;span class="n"&gt;AT&lt;/span&gt;&lt;span class="c1"&gt;#XMQTTCON=&amp;lt;op&amp;gt;[,&amp;lt;client_id&amp;gt;,&amp;lt;username&amp;gt;,&amp;lt;password&amp;gt;,&amp;lt;url&amp;gt;,&amp;lt;port&amp;gt;[,&amp;lt;sec_tag&amp;gt;]]&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;ul class="simple"&gt;
&lt;li&gt;
&lt;p&gt;The&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;&amp;lt;op&amp;gt;&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;parameter is an integer. It can accept one of the following values:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;0&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- Connect to the MQTT broker.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code class="docutils literal notranslate"&gt;&lt;span class="pre"&gt;1&lt;/span&gt;&lt;/code&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;- Disconnect from the MQTT broker.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That seems to be contradictory. I debugged and it seemed to hit the connect case&amp;nbsp;AT_MQTTCON_CONNECT case only when 1 was sent. And then it polls for CONACK where it returns error.&lt;br /&gt;&lt;br /&gt;So basically this is happening on nrf Connect&lt;br /&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1611129727411v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mqtt client  Nrf9160 Module</title><link>https://devzone.nordicsemi.com/thread/290097?ContentTypeID=1</link><pubDate>Wed, 20 Jan 2021 02:09:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:83a8e744-4aab-4877-b7e2-323927184725</guid><dc:creator>Ukhan</dc:creator><description>&lt;p&gt;&lt;span&gt;NCS:&amp;nbsp;v1.4.99, I suppose this is the latest.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;I tried with Serial LTE modem application as well.&amp;nbsp;&lt;br /&gt;Following the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/serial_lte_modem/doc/MQTT_AT_commands.html#id16"&gt;documentation&lt;/a&gt;, I send&amp;nbsp;&lt;span class="tx"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;pre&gt;AT#XMQTTCON=0,&amp;quot;nrf91&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;&amp;quot;,&amp;quot;myAWSendpoint.com&amp;quot;,8883,123&lt;/pre&gt;
&lt;pre&gt;ERROR&lt;/pre&gt;
&lt;p&gt;On nrf connect desktop app I can see that signal strength is fine and the module is awake as well.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;One weird thing is that on AWS-IoT core I can see that a&amp;nbsp;connection was established in the Manage section where it shows connections graph.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Mqtt client  Nrf9160 Module</title><link>https://devzone.nordicsemi.com/thread/289931?ContentTypeID=1</link><pubDate>Tue, 19 Jan 2021 08:24:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb17bc85-9c4c-4064-b6bd-b923f74df2be</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;First of all, what version of NCS are you working on?&lt;/p&gt;
[quote user=""]&amp;nbsp;flashed at_client example inside the nrf9160 and trying to send&amp;nbsp;&lt;span&gt;AT&lt;/span&gt;&lt;span&gt;#XMQTTCON command to&lt;/span&gt;[/quote]
&lt;p&gt;Have you tried with the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/serial_lte_modem/README.html#nrf9160-serial-lte-modem"&gt;Serial LTE modem application&lt;/a&gt;? The MQTT AT command is only available in this application.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/1777.pastedimage1611044664593v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Edit: For AT commands that work with the AT client, please &lt;a href="https://infocenter.nordicsemi.com/topic/ref_at_commands/REF/at_commands/intro.html"&gt;see the AT Commands documentation.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>