<?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>Issue while establishing connection with MQTT broker using nRF9151</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/125334/issue-while-establishing-connection-with-mqtt-broker-using-nrf9151</link><description>Hi Team, 
 
 We are trying to establish connection between our nRF9151 board with NB-IoT enabled Jio Sim and MQTT broker using the sample provided in lesson-4-exercise-1 . However we are observing the below mentioned error. 
 
 With this sim we have already</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 08 Nov 2025 15:20:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/125334/issue-while-establishing-connection-with-mqtt-broker-using-nrf9151" /><item><title>RE: Issue while establishing connection with MQTT broker using nRF9151</title><link>https://devzone.nordicsemi.com/thread/553738?ContentTypeID=1</link><pubDate>Sat, 08 Nov 2025 15:20:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cef91b59-9255-4795-9f76-f3e88510c5ed</guid><dc:creator>Vivek</dc:creator><description>&lt;p&gt;So the devzone ticket&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/111177/tls-error-mqtt---error-in-mqtt_connect--111"&gt;tls-error-mqtt---error-in-mqtt_connect--111&lt;/a&gt;&amp;nbsp;helped us and we are able to solve the issue by moving struct mqtt_utf8 password, user_name; to global space.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Vivek&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue while establishing connection with MQTT broker using nRF9151</title><link>https://devzone.nordicsemi.com/thread/553557?ContentTypeID=1</link><pubDate>Thu, 06 Nov 2025 12:50:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:630cc3a0-7db5-4aee-9387-5d790416e557</guid><dc:creator>Vivek</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;span&gt;&amp;Oslash;yvind,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;We could resolve the -114 issue with the shared config but now observing another errors while establishing the connection with the broker. We are using the base code from&amp;nbsp;&lt;a href="https://academy.nordicsemi.com/courses/cellular-iot-fundamentals/lessons/lesson-4-cellular-fundamentals/topic/lesson-4-exercise-1/"&gt;lesson-4-excercise-1&lt;/a&gt;&amp;nbsp;with some changes as mentioned below.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Errors are as below:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:00:00.289,367] &amp;lt;inf&amp;gt; Lesson4_Exercise1: Initializing modem library
[00:00:00.557,281] &amp;lt;inf&amp;gt; Lesson4_Exercise1: Connecting to LTE network
[00:01:38.373,413] &amp;lt;inf&amp;gt; Lesson4_Exercise1: RRC mode: Connected
[00:01:44.323,822] &amp;lt;inf&amp;gt; Lesson4_Exercise1: Network registration status: Connected - home network
[00:01:44.323,974] &amp;lt;inf&amp;gt; Lesson4_Exercise1: Connected to LTE network
[00:01:44.324,615] &amp;lt;inf&amp;gt; Lesson4_Exercise1: IPv6 Address found custom_broker_ipv6_addr
[00:01:44.325,805] &amp;lt;err&amp;gt; Lesson4_Exercise1: Error in mqtt_connect: -118
[00:01:44.325,836] &amp;lt;inf&amp;gt; Lesson4_Exercise1: Reconnecting in 60 seconds...
[00:02:14.527,160] &amp;lt;inf&amp;gt; Lesson4_Exercise1: RRC mode: Idle
[00:02:44.332,916] &amp;lt;err&amp;gt; Lesson4_Exercise1: Error in mqtt_connect: -12
[00:02:44.332,977] &amp;lt;inf&amp;gt; Lesson4_Exercise1: Reconnecting in 60 seconds...
[00:03:44.340,057] &amp;lt;err&amp;gt; Lesson4_Exercise1: Error in mqtt_connect: -12
[00:03:44.340,118] &amp;lt;inf&amp;gt; Lesson4_Exercise1: Reconnecting in 60 seconds...&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The changes made in sample are as below&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In prj.conf&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_MQTT_BROKER_HOSTNAME=&amp;quot;custom_broker_ipv6_addr&amp;quot;
CONFIG_MQTT_PUB_TOPIC=&amp;quot;/device_id/data&amp;quot;
CONFIG_MQTT_BROKER_PORT=1883&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In mqtt_connection.c&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;static struct mqtt_utf8 password = MQTT_UTF8_LITERAL(&amp;quot;custom_password&amp;quot;);
static struct mqtt_utf8 user_name = MQTT_UTF8_LITERAL(&amp;quot;custom_username&amp;quot;);
client-&amp;gt;password = &amp;amp;password;
client-&amp;gt;user_name = &amp;amp;user_name;&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can you please let us know why this is happening?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Vivek&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Issue while establishing connection with MQTT broker using nRF9151</title><link>https://devzone.nordicsemi.com/thread/553020?ContentTypeID=1</link><pubDate>Fri, 31 Oct 2025 13:08:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:392b81ef-2fbc-43de-8968-442d6523006b</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you please try enabling the following in the&amp;nbsp;&lt;span&gt;sample provided in&amp;nbsp;&lt;/span&gt;&lt;a href="https://academy.nordicsemi.com/courses/cellular-iot-fundamentals/lessons/lesson-4-cellular-fundamentals/topic/lesson-4-exercise-1/"&gt;lesson-4-exercise-1&lt;/a&gt; prj.conf, as these are already set in the Modem Shell sample:&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;CONFIG_NET_IPV4=y
CONFIG_NET_IPV6=y&lt;/pre&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>