<?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>nRF Connect MQTT Sample Not Working as Expected</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112881/nrf-connect-mqtt-sample-not-working-as-expected</link><description>Hi, when I run the MQTT sample as is, I&amp;#39;m having problems with the TLS and port configuration. The terminal output is: 
 
 That looks correct, but on closer inspection the port is set to 1883 and TLS is turned off - neither of these are expected. I cannot</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 10 Jul 2024 19:55:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112881/nrf-connect-mqtt-sample-not-working-as-expected" /><item><title>RE: nRF Connect MQTT Sample Not Working as Expected</title><link>https://devzone.nordicsemi.com/thread/493245?ContentTypeID=1</link><pubDate>Wed, 10 Jul 2024 19:55:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2633bf64-ba3a-4b9f-b7f2-e85afc470cfd</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When building the unmodified MQTT sample with the command line, the following commands can be used for the nRF9161 DK:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;west build -b nrf9161dk_nrf9161_ns -- -DOVERLAY_CONFIG=overlay-tls-nrf91.conf&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Could you try the default setting?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect MQTT Sample Not Working as Expected</title><link>https://devzone.nordicsemi.com/thread/493208?ContentTypeID=1</link><pubDate>Wed, 10 Jul 2024 15:37:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db2c7015-b0be-4589-b766-23ae2b1f2e34</guid><dc:creator>hahu</dc:creator><description>&lt;p&gt;Update: I added some #warning preprocessor directives to the mqtt/src/modules/transport/credentials_provision/credentials_provision.c to check that the certificates &amp;amp; keys were being included only to find they weren&amp;#39;t.&amp;nbsp; I had assumed that mqtt/overlay-tls-nrf91.conf would automatically be used as I&amp;#39;m building for the nRF 9161 DK but it appears it wasn&amp;#39;t.&amp;nbsp; So, I added the contents of that file to prj.conf.&amp;nbsp; Now I can find &lt;span&gt;CONFIG_MQTT_HELPER_PORT and CONFIG_MQTT_LIB_TLS in build/zephyr/.config, but I&amp;#39;m now getting:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:02:42.741,546] &amp;lt;err&amp;gt; mqtt_helper: mqtt_connect, error: -111
[00:02:42.741,546] &amp;lt;err&amp;gt; transport: Failed connecting to MQTT, error code: -111&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So, the sample has now been modified, I suppose (I&amp;#39;ve also update the port and the broker domain)&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect MQTT Sample Not Working as Expected</title><link>https://devzone.nordicsemi.com/thread/493085?ContentTypeID=1</link><pubDate>Wed, 10 Jul 2024 08:51:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d584daa6-2253-4319-a17f-1811d41d1e8e</guid><dc:creator>hahu</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;NCS version: v2.6.1&lt;/li&gt;
&lt;li&gt;Building with the nRF Toolchain manager terminal (west build -p always -b nrf9161dk_nrf9161_ns nrf/samples/net/mqtt/)&lt;/li&gt;
&lt;li&gt;The sample is unmodified&lt;/li&gt;
&lt;li&gt;I can&amp;#39;t find &lt;span&gt;CONFIG_MQTT_HELPER_PORT or CONFIG_MQTT_LIB_TLS in build/zephyr/.config (or build/pm.config, in case that helps)&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span&gt;Hopefully that helps&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF Connect MQTT Sample Not Working as Expected</title><link>https://devzone.nordicsemi.com/thread/493040?ContentTypeID=1</link><pubDate>Tue, 09 Jul 2024 19:06:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:668376cf-f74d-46df-8a19-c35ea136fe45</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Which NCS version and board are you using?&lt;/p&gt;
&lt;p&gt;How do you build the sample?&lt;/p&gt;
&lt;p&gt;Do you modify the sample? If so, what are the modifications?&lt;/p&gt;
&lt;p&gt;Could you check the value of&amp;nbsp;&lt;span&gt;CONFIG_MQTT_HELPER_PORT=8884 and CONFIG_MQTT_LIB_TLS in the .config under build/zephyr?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>