<?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>AWS IoT MQTT disconnect while awaiting acknowledgement</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/98876/aws-iot-mqtt-disconnect-while-awaiting-acknowledgement</link><description>I&amp;#39;m using nRF Connect SDK v2.0.x with a Thingy 91. I have established my own AWS account, created a thing with the suggested security policy, and produced certificates per the instructions at https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 26 Apr 2023 16:00:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/98876/aws-iot-mqtt-disconnect-while-awaiting-acknowledgement" /><item><title>RE: AWS IoT MQTT disconnect while awaiting acknowledgement</title><link>https://devzone.nordicsemi.com/thread/422579?ContentTypeID=1</link><pubDate>Wed, 26 Apr 2023 16:00:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f55e96da-96d5-498a-8450-50c053c257a4</guid><dc:creator>matty</dc:creator><description>&lt;p&gt;This seems to have been cleared up by using Toolchain Manager v1.2.4 to uninstall/remove nRF Connect SDK v2.0.0 and any other versions installed on the system and using the Extensions command in VS Code to uninstall nRF Connect for VS Code Package. Then, using Toolchain Manager v1.2.4 to install nRF Connect SDK v2.0.0 and then using the Open VS Code button in Toolchain Manager to get nRF Connect for VS Code back in place. Thank you for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AWS IoT MQTT disconnect while awaiting acknowledgement</title><link>https://devzone.nordicsemi.com/thread/421769?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2023 13:11:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5097f03-1b50-425d-9df2-8ce06252fe42</guid><dc:creator>matty</dc:creator><description>&lt;p&gt;I&amp;nbsp;created my AWS &amp;quot;Thing&amp;quot; without Device Shadow. In the AWS IoT console under Manage-&amp;gt;Things-&amp;gt;my_thing, Device Shadow is zero.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AWS IoT MQTT disconnect while awaiting acknowledgement</title><link>https://devzone.nordicsemi.com/thread/421748?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2023 12:19:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b9c768e-cd32-4649-9fab-a12522812321</guid><dc:creator>JyriLehtinen</dc:creator><description>&lt;p&gt;The aws_iot_send uses Zephyr native mqtt_publish() which is non blocking I believe. Successful return does not guarantee that the message was successfully sent or received, I think it returns after it&amp;#39;s been written to the socket or, if an error occurred before that (e.g client state was disconnected before the mqtt_publish() call).&lt;br /&gt;&lt;br /&gt;I just saw a bit similar behaviour with one of our demo devices, it started disconnecting from AWS with the reason CONNECTION_LOST, and this happening as it was receiving and updating the Thing Shadow.&amp;nbsp;Are you able to delete the Thing Shadow from the AWS-side?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AWS IoT MQTT disconnect while awaiting acknowledgement</title><link>https://devzone.nordicsemi.com/thread/421740?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2023 12:06:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f703d1ea-0b1e-41e4-80fb-b1c02a028250</guid><dc:creator>matty</dc:creator><description>&lt;p&gt;I am setting the qos member of the aws_iot_data structure to MQTT_QOS_1_AT_LEAST_ONCE.&lt;/p&gt;
&lt;p&gt;I expect to get a AWS_IOT_EVT_PUBACK event in the callback function I provided when I aws_iot_init not a AWS_IOT_EVT_DISCONNECTED.&lt;/p&gt;
&lt;p&gt;My app has three large buffers to send. It tries an aws_iot_send with the first and if successful will move on to the next and so on. I have tried a .qos of MQTT_QOS_0_AT_MOST_ONCE, and not waited on an acknowledgement/PUBACK. In this scenario, while the aws_iot_send returns successfully the first and second time, the&amp;nbsp;&lt;span&gt;AWS_IOT_EVT_DISCONNECTED happens before the third buffer and that one naturally fails since the socket isn&amp;#39;t connected.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For my app, the&amp;nbsp;AWS_IOT_EVT_DISCONNECTED always occurs 2 to 3 seconds after the first aws_iot_send.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AWS IoT MQTT disconnect while awaiting acknowledgement</title><link>https://devzone.nordicsemi.com/thread/421726?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2023 11:44:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:940d9517-6426-48f0-8487-a6b193ab4f75</guid><dc:creator>matty</dc:creator><description>&lt;p&gt;The Modem firmware is 1.3.4&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AWS IoT MQTT disconnect while awaiting acknowledgement</title><link>https://devzone.nordicsemi.com/thread/421710?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2023 11:17:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5d8d0520-a2e4-411d-be39-0cc21dde731c</guid><dc:creator>JyriLehtinen</dc:creator><description>&lt;p&gt;The message id is set by pseudorandom, get_sys_tick_u32() or something like that by the aws_iot library, unless set manually. The two messages listed there are separate messages. If sent with QoS 1 you should be getting PUBACK for those same ID&amp;#39;s if it&amp;#39;s successfully received by the broker.&lt;br /&gt;&lt;br /&gt;Have you checked that you&amp;#39;re sending with QoS 1 or 2? PUBACK won&amp;#39;t be sent for QoS 0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: AWS IoT MQTT disconnect while awaiting acknowledgement</title><link>https://devzone.nordicsemi.com/thread/421697?ContentTypeID=1</link><pubDate>Fri, 21 Apr 2023 10:33:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e225367d-fe4f-432d-b8cc-6852d544874e</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;what modem firmware are you running?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>