<?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 to solve mqtt_disconnect error -57?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58737/how-to-solve-mqtt_disconnect-error--57</link><description>Window10 nrf tag: 1.2.0 SES v4.4.2a 
 I&amp;#39;m attempting to code a one-shot mqtt function, but it fails in v1.2.0 whiile it succeeded in v1.1.0. I coded the below main.c by modifying mqtt_simple a bit. I don&amp;#39;t touch other files but main.c 
 A mqtt_disconect</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 07 Mar 2020 10:57:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58737/how-to-solve-mqtt_disconnect-error--57" /><item><title>RE: How to solve mqtt_disconnect error -57?</title><link>https://devzone.nordicsemi.com/thread/238634?ContentTypeID=1</link><pubDate>Sat, 07 Mar 2020 10:57:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ef3ee89-51f0-43e1-a2b4-4e769293405b</guid><dc:creator>Yusuke</dc:creator><description>&lt;p&gt;what a shame. you are right. Thanks you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to solve mqtt_disconnect error -57?</title><link>https://devzone.nordicsemi.com/thread/238304?ContentTypeID=1</link><pubDate>Thu, 05 Mar 2020 13:15:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:462d7646-0757-4c2e-ade2-63a5b13fce17</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It looks like you&amp;#39;re not waiting for the callbacks (MQTT_EVT_CONNACK etc), so it would not be connected yet.&lt;/p&gt;
&lt;p&gt;Try waiting for the connection to successfully complete (ie: the corresponding CONNACK + subscribe ACK in your mqtt_evt_handler).&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>