<?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 Sample code is not connecting</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70807/mqtt-sample-code-is-not-connecting</link><description>The sample code at ncs/nrf/samples/nrf9160/mqtt_simple is not connecting. I dod not make any changes to the ode. I am using NB-IoT. LTE is connected. The link monitor, LTE is in green. The error code is ERROR: mqtt_connect -60 
 Kindly advice to resolve</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 10 Feb 2021 15:59:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70807/mqtt-sample-code-is-not-connecting" /><item><title>RE: MQTT Sample code is not connecting</title><link>https://devzone.nordicsemi.com/thread/293835?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2021 15:59:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b6a932b-e440-495a-afdc-7b7c7775102b</guid><dc:creator>vkadal</dc:creator><description>&lt;p&gt;I am able to successfully publish and subscribe data to test.mosquito.org and&amp;nbsp; visualize&amp;nbsp; through MQTT lens (Chrome extension)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am closing this tikcet. Thansf for the help&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample code is not connecting</title><link>https://devzone.nordicsemi.com/thread/293788?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2021 14:04:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f3ab62d-4bf7-46e0-99d1-c68ce31eff34</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Please use a service for ipv6 dns lookup. If you search using google/duckduckgo etc for this, you will find one. If you have ipv6 connection, you can use &amp;quot;nslookup&amp;quot; program.&lt;/p&gt;
&lt;p&gt;That will show that there&amp;#39;s only a ipv4 answer for &lt;a href="http://www.beavernews.net"&gt;www.beavernews.net:&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;$ nslookup beavernews.net
Server:		127.0.0.53
Address:	127.0.0.53#53

Non-authoritative answer:
Name:	beavernews.net
Address: 64.111.109.81

&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s an example how it should look if ipv4 and ipv6 are both reported:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;$ nslookup google.com
Server:		127.0.0.53
Address:	127.0.0.53#53

Non-authoritative answer:
Name:	google.com
Address: 172.217.5.238
Name:	google.com
Address: 2607:f8b0:4004:82a::200e&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample code is not connecting</title><link>https://devzone.nordicsemi.com/thread/293785?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2021 13:59:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:537699fe-576f-4f7d-a186-b2856d19ab95</guid><dc:creator>vkadal</dc:creator><description>&lt;p&gt;Last time you have told me to write to cloud MQTT&amp;nbsp; and check for IPv6 and they said they don&amp;#39;t support. In this case, I installed a mobile app, set my SIM to only IPv6 and it is transmitting data,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Did you try&amp;nbsp; to test the server for IPv6 compatibility ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample code is not connecting</title><link>https://devzone.nordicsemi.com/thread/293707?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2021 09:38:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fef641f3-e1a4-4973-bfa3-3a973d90d2e2</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Please see my former answer on how to check if a domain has ipv4 and ipv6 capabilities. As mentioned, the domain that you are connecting to doesn&amp;#39;t have ipv6.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample code is not connecting</title><link>https://devzone.nordicsemi.com/thread/293679?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2021 07:50:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:759a74b5-607b-4ece-ab24-c8d64c750031</guid><dc:creator>vkadal</dc:creator><description>&lt;p&gt;The server is running on a web server, but it works when tested with a mobile app&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample code is not connecting</title><link>https://devzone.nordicsemi.com/thread/293677?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2021 07:43:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abbd4b16-101a-4688-baec-bd439dee4090</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote userid="93926" url="~/f/nordic-q-a/70807/mqtt-sample-code-is-not-connecting/293673#293673"]The server details - &lt;a href="http://www.beavernews.net"&gt;www.beavernews.net&lt;/a&gt;&amp;nbsp;Port - 9999[/quote]
&lt;p&gt;That domain doesn&amp;#39;t support ipv6. Only the ipv4 address is returned:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;$ nslookup www.beavernews.net
Server:		127.0.0.53
Address:	127.0.0.53#53

Non-authoritative answer:
Name:	www.beavernews.net
Address: 64.111.109.81
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please google &amp;quot;ipv6 dns lookup&amp;quot; for online resolvers to verify if your broker has ipv6.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;H&amp;aring;kon&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;H&amp;aring;kon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample code is not connecting</title><link>https://devzone.nordicsemi.com/thread/293673?ContentTypeID=1</link><pubDate>Wed, 10 Feb 2021 07:02:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:85d4b6f4-8965-4a5e-9ee1-1777757341b4</guid><dc:creator>vkadal</dc:creator><description>&lt;p&gt;The server details - &lt;a href="http://www.beavernews.net"&gt;www.beavernews.net&lt;/a&gt;&amp;nbsp;Port - 9999. Topic name - data/upload . Message format -&amp;nbsp;(001,941,1755,1726,25300,32.69,0,1710)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I used a mobile app&amp;nbsp;&lt;a href="https://play.google.com/store/apps/details?id=com.sanyamarya.mqtizermqtt_client"&gt;https://play.google.com/store/apps/details?id=com.sanyamarya.mqtizermqtt_client&lt;/a&gt;&amp;nbsp; , set the SIM for IPv6 only and we were able to see the data being&amp;nbsp; posted. The data can be&amp;nbsp; viewed at&amp;nbsp;&lt;a href="http://www.beavernews.net:8090/rawData"&gt;http://www.beavernews.net:8090/rawData&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample code is not connecting</title><link>https://devzone.nordicsemi.com/thread/293339?ContentTypeID=1</link><pubDate>Mon, 08 Feb 2021 13:20:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4c7e549-6c66-447c-aad4-a144b7503ee5</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;what is the domain you&amp;#39;re trying to connect to?&lt;/p&gt;
&lt;p&gt;&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><item><title>RE: MQTT Sample code is not connecting</title><link>https://devzone.nordicsemi.com/thread/293323?ContentTypeID=1</link><pubDate>Mon, 08 Feb 2021 12:30:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:89c3e3a6-e180-449c-9030-9b7f115f7903</guid><dc:creator>vkadal</dc:creator><description>&lt;p&gt;As you advised, I wrote to cloudmqt and they specifically told me that their broker do not support ipv6. But the current broker we are using supports&amp;nbsp; both ipv6&amp;nbsp; and&amp;nbsp; ipv4. Is there any AT command to check the broker?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample code is not connecting</title><link>https://devzone.nordicsemi.com/thread/293263?ContentTypeID=1</link><pubDate>Mon, 08 Feb 2021 09:24:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3f3ee7fc-4c47-42b7-9c00-6b31531b03ba</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>[quote user="vkadal"]server other than mosquitto. I am&amp;nbsp; sharing the code and error log. Kindly check.&amp;nbsp;[/quote]
&lt;p&gt;As mentioned, the broker must also support ipv6, as your nb-iot network only supports ipv6. Can you please ensure that you are connecting to a broker that also supports ipv6?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample code is not connecting</title><link>https://devzone.nordicsemi.com/thread/293198?ContentTypeID=1</link><pubDate>Sat, 06 Feb 2021 08:19:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0514afb2-a5c4-4fa8-9dc8-4e3b487dd5c6</guid><dc:creator>vkadal</dc:creator><description>&lt;p&gt;Still I am not able to connect&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/4520.Error.txt"&gt;devzone.nordicsemi.com/.../4520.Error.txt&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/mqtt_5F00_simple_5F00_reconnect.zip"&gt;devzone.nordicsemi.com/.../mqtt_5F00_simple_5F00_reconnect.zip&lt;/a&gt; to server other than mosquitto. I am&amp;nbsp; sharing the code and error log. Kindly check.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample code is not connecting</title><link>https://devzone.nordicsemi.com/thread/292748?ContentTypeID=1</link><pubDate>Wed, 03 Feb 2021 16:34:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96ec7568-e954-4212-ae32-9d9cbb6d2032</guid><dc:creator>vkadal</dc:creator><description>&lt;p&gt;Your guess is correct. CloudMQTT did not support ipv6&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample code is not connecting</title><link>https://devzone.nordicsemi.com/thread/292497?ContentTypeID=1</link><pubDate>Tue, 02 Feb 2021 13:41:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4da6ae0c-0a5c-4cf7-b406-0b304f948bde</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;You can contact them and ask specifically. That website didn&amp;#39;t list any info related to ipv6.&lt;/p&gt;
&lt;p&gt;If you do a dns lookup on the mqtt broker nameserver, you should see if it supports IPv6 or not, provided that you have a ipv6 connection on your end.&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><item><title>RE: MQTT Sample code is not connecting</title><link>https://devzone.nordicsemi.com/thread/292493?ContentTypeID=1</link><pubDate>Tue, 02 Feb 2021 13:36:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9858b9c-794f-410b-9554-a2d4cbd27734</guid><dc:creator>vkadal</dc:creator><description>&lt;h5 id="what_is_cloudmqtt"&gt;What is CloudMQTT&lt;/h5&gt;
&lt;p&gt;CloudMQTT are managed Mosquitto servers in the cloud which provides lightweight methods of carrying out messaging using a publish/subscribe message queueing model.&amp;nbsp; -- This I have found in their website. For more details, please check&amp;nbsp; at&amp;nbsp;&lt;a href="https://www.cloudmqtt.com/docs/faq.html"&gt;https://www.cloudmqtt.com/docs/faq.html&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample code is not connecting</title><link>https://devzone.nordicsemi.com/thread/292479?ContentTypeID=1</link><pubDate>Tue, 02 Feb 2021 13:08:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:224417a5-165f-40d5-8a7a-a91a9a5fa009</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Have you checked with your mqtt provider that they support ipv6?&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><item><title>RE: MQTT Sample code is not connecting</title><link>https://devzone.nordicsemi.com/thread/292278?ContentTypeID=1</link><pubDate>Mon, 01 Feb 2021 14:25:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a88ac23a-170e-42bf-99e0-b5dd4cb15924</guid><dc:creator>vkadal</dc:creator><description>&lt;p&gt;Still the same error.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The MQTT simple sample startedLTE Link Connecting ...AT+CFUN=1OKAT+CFUN?+CFUN: 1OK+CEREG: 2,&amp;quot;FFFE&amp;quot;,&amp;quot;FFFFFFFF&amp;quot;,7,0,0,&amp;quot;11100000&amp;quot;,&amp;quot;11100000&amp;quot;+CEREG: 0,&amp;quot;FFFE&amp;quot;,&amp;quot;FFFFFFFF&amp;quot;,7,0,0,&amp;quot;11100000&amp;quot;,&amp;quot;11100000&amp;quot;+CEREG: 2,&amp;quot;C0D8&amp;quot;,&amp;quot;003AC006&amp;quot;,9,0,0,&amp;quot;11100000&amp;quot;,&amp;quot;11100000&amp;quot;+CSCON: 1+CEREG: 5,&amp;quot;C0D8&amp;quot;,&amp;quot;003AC006&amp;quot;,9,,,&amp;quot;11100000&amp;quot;,&amp;quot;11100000&amp;quot;LTE Link Connected!attempting to connect: ERROR: getaddrinfo failed -11hellomqtt_connect -47ERROR: getaddrinfo failed -11hellomqtt_connect -47ERROR: getaddrinfo failed -11hellomqtt_connect -47ERROR: getaddrinfo failed -11hellomqtt_connect -47ERROR: getaddrinfo failed -11hellomqtt_connect&amp;nbsp;-47&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample code is not connecting</title><link>https://devzone.nordicsemi.com/thread/292209?ContentTypeID=1</link><pubDate>Mon, 01 Feb 2021 12:34:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:494d132c-1c32-4482-a4fa-b3b489429ad9</guid><dc:creator>vkadal</dc:creator><description>&lt;p&gt;OK, will&amp;nbsp; do that. The code given by you works and connects to test.Mosquito.com&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample code is not connecting</title><link>https://devzone.nordicsemi.com/thread/292192?ContentTypeID=1</link><pubDate>Mon, 01 Feb 2021 11:34:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e2c87b5c-b954-4974-83c5-62e10fdc5615</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;
[quote user="Y0g1"]but if we try cloud mqtt it get stuck with error&amp;nbsp;[/quote]
&lt;p&gt;Could you configuring your project with &amp;quot;&lt;span&gt;CONFIG_NRF_CLOUD_IPV6=y&amp;quot; set and see if this helps?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kind regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Håkon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample code is not connecting</title><link>https://devzone.nordicsemi.com/thread/292065?ContentTypeID=1</link><pubDate>Sat, 30 Jan 2021 16:57:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:023fd3a7-58cf-4b58-96d2-45d5da12cafd</guid><dc:creator>Y0g1</dc:creator><description>&lt;p&gt;we tried again with ipv6 the mqtt now gets connected with&amp;nbsp;&lt;span&gt;test.mosquitto.org but gives following error&lt;pre class="ui-code" data-mode="text"&gt;LTE Link Connected!
attempting to connect: IPv6 Address found 2001:41d0:a:fed0::1
hello
[mqtt_evt_handler:170] 
MQTT client connected!
Subscribing to: my/subscribe/topic len 18
ERROR: mqtt_live -11
[mqtt_evt_handler:176] 
MQTT client disconnected 0
attempting to connect: IPv6 Address found 2001:41d0:a:fed0::1&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;but if we try cloud mqtt it get stuck with error&amp;nbsp;&lt;pre class="ui-code" data-mode="text"&gt;ERROR: getaddrinfo failed -11mqtt_connect -47&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample code is not connecting</title><link>https://devzone.nordicsemi.com/thread/292048?ContentTypeID=1</link><pubDate>Fri, 29 Jan 2021 18:11:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abfe8145-8ede-4d63-85ba-0f2ee1c7e63c</guid><dc:creator>vkadal</dc:creator><description>&lt;p&gt;Cloudmqtt accepts data in JSON format. So I need to check this&amp;nbsp; point&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample code is not connecting</title><link>https://devzone.nordicsemi.com/thread/292045?ContentTypeID=1</link><pubDate>Fri, 29 Jan 2021 17:04:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b879c03-41cf-4187-aea3-ade10375be34</guid><dc:creator>vkadal</dc:creator><description>&lt;p&gt;This code works fine. Then&amp;nbsp; I tried to connect to&amp;nbsp; cloudmqtt.com. Just changed the server name, port number, user name, password and clientID. Anything else need to be changed?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample code is not connecting</title><link>https://devzone.nordicsemi.com/thread/291859?ContentTypeID=1</link><pubDate>Thu, 28 Jan 2021 16:35:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d85a51c-0157-451e-ac97-c9abbbeafd1e</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Could it be that your network only provides you with ipv6 connectivity?&lt;/p&gt;
&lt;p&gt;This seems to be the case here atleast:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/65271/nf9160-how-to-set-apn-and-support-for-ipv6"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/65271/nf9160-how-to-set-apn-and-support-for-ipv6&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I have a quick patch here for mqtt_simple wrt. ipv6 connectivity you can check:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/mqtt_5F00_simple_5F00_ipv6_5F00_fix.zip"&gt;devzone.nordicsemi.com/.../mqtt_5F00_simple_5F00_ipv6_5F00_fix.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Unzip it, and use &amp;quot;git apply mqtt_simple_ipv6_fix.diff&amp;quot; to apply it.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;With this patch, and connecting to test.mosquitto.org, it should&amp;nbsp;print something similar to this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v2.4.0-ncs2  ***
The MQTT simple sample started
LTE Link Connecting ...
+CEREG: 2,&amp;quot;76C1&amp;quot;,&amp;quot;0102C305&amp;quot;,7,0,0,&amp;quot;11100000&amp;quot;,&amp;quot;11100000&amp;quot;
+CSCON: 1
+CEREG: 1,&amp;quot;76C1&amp;quot;,&amp;quot;0102C305&amp;quot;,7,,,&amp;quot;00000001&amp;quot;,&amp;quot;00101010&amp;quot;
LTE Link Connected!
IPv6 Address found 2001:41d0:a:fed0::1
[mqtt_evt_handler:227] MQTT client connected!
Subscribing to: my/subscribe/topic len 18
[mqtt_evt_handler:281] SUBACK packet id: 1234
&lt;/pre&gt;&amp;nbsp;&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><item><title>RE: MQTT Sample code is not connecting</title><link>https://devzone.nordicsemi.com/thread/291841?ContentTypeID=1</link><pubDate>Thu, 28 Jan 2021 15:14:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6598bba0-b1eb-4a43-8351-49b2a16ef9f5</guid><dc:creator>vkadal</dc:creator><description>&lt;p&gt;I did not get the source code from the distributor.&amp;nbsp; He might have got from one of his clients like me . so getting source code may not be possible&lt;/p&gt;
&lt;p&gt;Even after changing the configuration file, the error is same.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kindly let me know the procedure to set the APN manually&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample code is not connecting</title><link>https://devzone.nordicsemi.com/thread/291729?ContentTypeID=1</link><pubDate>Thu, 28 Jan 2021 09:58:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4de169d1-a632-474c-9ed7-1b62a564f4a7</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;My apologies, you&amp;#39;re right.&lt;/p&gt;
&lt;p&gt;Could you try to set this config and see if its able to successfully connect?&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_LTE_LEGACY_PCO_MODE=y&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;If that still does not work, you might need to set the APN manually. Do you have the source code for the project that you got from the disti?&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Kind regards,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Håkon&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample code is not connecting</title><link>https://devzone.nordicsemi.com/thread/291687?ContentTypeID=1</link><pubDate>Thu, 28 Jan 2021 08:24:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14650e78-a287-499f-9504-bf96568a1c6f</guid><dc:creator>vkadal</dc:creator><description>&lt;p&gt;As I said earlier,&amp;nbsp; I got a hex file from one of Indian distributors and that code works and connects to the&amp;nbsp; Nordic cloud. So it means the&amp;nbsp; NB-IoT operators settings are in order. However, let me check once again with the working code&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>