<?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 Not Connecting on nRF9160 Board</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/112186/mqtt-sample-not-connecting-on-nrf9160-board</link><description>Hi, 
 Sorry, i am new to MQTT so may be asking a stupid question, please bear with me. 
 I am trying to run the MQTT sample (nrf\samples\net\mqtt) and get the following output 
 
 
 Looking at the cellular monitor, it suggests I am connecting? 
 
 
 Any</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 01 Jul 2024 12:22:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/112186/mqtt-sample-not-connecting-on-nrf9160-board" /><item><title>RE: MQTT Sample Not Connecting on nRF9160 Board</title><link>https://devzone.nordicsemi.com/thread/491595?ContentTypeID=1</link><pubDate>Mon, 01 Jul 2024 12:22:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b3d7f77-8ae3-4a3f-856a-669d7fc8605f</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi&amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;Oslash;yvind,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have managed to update my toolchain to v2.7.0-rc3. (I had previously tried to update to rc2 and rc1 but it kept flagging an error, so i was running v.2.6.1)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Updating to rc3 also enabled me to also update to the latest firmware.&lt;/p&gt;
&lt;p&gt;Anyway, this has allowed&amp;nbsp;me to connect correctly. I have not changed my location, I am still physically in the same place, still using a SIM from Tescos.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;+CEREG: 2,&amp;quot;01B0&amp;quot;,&amp;quot;07C2B478&amp;quot;,7
+CSCON: 1
+CGEV: ME PDN ACT 0,0
+CNEC_ESM: 50,0
+CEREG: 1,&amp;quot;01B0&amp;quot;,&amp;quot;07C2B478&amp;quot;,7,,,&amp;quot;11100000&amp;quot;,&amp;quot;11100000&amp;quot;
[00:00:03.503,845] &amp;lt;inf&amp;gt; network: Network connectivity established
+CSCON: 0
+CSCON: 1
[00:00:13.781,951] &amp;lt;inf&amp;gt; transport: Connected to MQTT broker
[00:00:13.781,982] &amp;lt;inf&amp;gt; transport: Hostname: test.mosquitto.org
[00:00:13.782,043] &amp;lt;inf&amp;gt; transport: Client ID: 352656106650388
[00:00:13.782,043] &amp;lt;inf&amp;gt; transport: Port: 8883
[00:00:13.782,073] &amp;lt;inf&amp;gt; transport: TLS: Yes
[00:00:13.782,135] &amp;lt;inf&amp;gt; transport: Subscribing to: 352656106650388/my/subscribe/topic
[00:00:13.894,958] &amp;lt;inf&amp;gt; transport: Subscribed to topic 352656106650388/my/subscribe/topic
+CSCON: 0
+CSCON: 1
+CSCON: 0
[00:01:00.413,665] &amp;lt;inf&amp;gt; transport: Published message: &amp;quot;Hello MQTT! Current uptime is: 60404&amp;quot; on topic: &amp;quot;352656106650388/my/publish/topic&amp;quot;
+CSCON: 1
+CSCON: 0
+CSCON: 1
+CSCON: 0
[00:02:00.413,940] &amp;lt;inf&amp;gt; transport: Published message: &amp;quot;Hello MQTT! Current uptime is: 120404&amp;quot; on topic: &amp;quot;352656106650388/my/publish/topic&amp;quot;
+CSCON: 1
+CSCON: 0
+CSCON: 1
+CSCON: 0
+CEREG: 1,&amp;quot;01B0&amp;quot;,&amp;quot;081A1682&amp;quot;,7,,,&amp;quot;11100000&amp;quot;,&amp;quot;11100000&amp;quot;
[00:03:00.414,215] &amp;lt;inf&amp;gt; transport: Published message: &amp;quot;Hello MQTT! Current uptime is: 180404&amp;quot; on topic: &amp;quot;352656106650388/my/publish/topic&amp;quot;
+CSCON: 1
+CSCON: 0&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So, thanks for your help.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Regards,&lt;br /&gt;Rod&lt;/p&gt;
&lt;p&gt;PS my next step is to update the broker address, user name and password to allow me to connect to a different server but i will close this ticket and open a new one if required.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample Not Connecting on nRF9160 Board</title><link>https://devzone.nordicsemi.com/thread/490687?ContentTypeID=1</link><pubDate>Tue, 25 Jun 2024 14:41:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb90059f-74ec-44aa-8f43-578c8aee4d77</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Yes, correct, the signal seems to be the issue here. From the modem trace I see that your connection times out. If O2 confirms that Tesco SIM should be fully supported, and your device is registered to home network (as it states), then I would suggest testing at other locations.&lt;/p&gt;
&lt;p&gt;Could there be equipment close to your board/location causing interreference with the LTE signal?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample Not Connecting on nRF9160 Board</title><link>https://devzone.nordicsemi.com/thread/490559?ContentTypeID=1</link><pubDate>Tue, 25 Jun 2024 09:57:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69f4cca9-6c79-4ec5-a44b-0761da818365</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Thanks&amp;nbsp;&lt;span&gt;&amp;Oslash;yvind,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I talked to O2 and they told me that the Tesco SIM I have uses their network so it will act the same as an O2 SIM.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;It seems to be connecting but I dont think the signal is&amp;nbsp;&lt;/span&gt;strong enough.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1719309308262v1.png" alt=" " /&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;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/trace_2D00_2024_2D00_06_2D00_25T09_2D00_53_2D00_38.262Z.mtrace"&gt;devzone.nordicsemi.com/.../trace_2D00_2024_2D00_06_2D00_25T09_2D00_53_2D00_38.262Z.mtrace&lt;/a&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;Rod&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample Not Connecting on nRF9160 Board</title><link>https://devzone.nordicsemi.com/thread/490474?ContentTypeID=1</link><pubDate>Tue, 25 Jun 2024 06:57:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de513439-a7db-4673-9e8c-b4a9d8230828</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Thanks for providing this trace.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;There seems to be an issue with the Vodafone SIM as it gets rejected from the network with message:&lt;/p&gt;
&lt;p&gt;Roaming not allowed in this tracking area (13)&lt;/p&gt;
&lt;p&gt;I would reach out to Vodafone and ask them about the coverage in your area. I reached out to our sales team in the UK yesterday regarding your case, and they informed me that O2 is the only one doing LTE-M in the UK, but there seems to be an issue with the SIM you were using. Best to try a O2 SIM to test with LTE-M.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample Not Connecting on nRF9160 Board</title><link>https://devzone.nordicsemi.com/thread/490406?ContentTypeID=1</link><pubDate>Mon, 24 Jun 2024 16:15:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f27b75f-e7b4-4053-b992-9bc07761581f</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;Here is the trace from the vodafone SIM.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/trace_2D00_2024_2D00_06_2D00_24T16_2D00_08_2D00_30.209Z.mtrace"&gt;devzone.nordicsemi.com/.../trace_2D00_2024_2D00_06_2D00_24T16_2D00_08_2D00_30.209Z.mtrace&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample Not Connecting on nRF9160 Board</title><link>https://devzone.nordicsemi.com/thread/490176?ContentTypeID=1</link><pubDate>Mon, 24 Jun 2024 08:51:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8229a7d-460c-4bd8-8814-366b0b1922ba</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;From the initial post your device was connected to LTE-M (digit 7) on home network, i.e. the SIM providers network:&lt;br /&gt;&lt;code&gt;+CEREG: 1,&amp;quot;01B0&amp;quot;,&amp;quot;081A1682&amp;quot;,7,,,&amp;quot;00011110&amp;quot;,&amp;quot;00011011&amp;quot;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;More information on the &lt;a href="https://docs.nordicsemi.com/bundle/ref_at_commands/page/REF/at_commands/nw_service/cereg_read.html"&gt;CEREG command can be found here&lt;/a&gt;.&lt;/p&gt;
[quote user="RodWatt"] am using a Tesco PAYG SIM currently but have tried SIMS from EE and Vodafone. Can you recommend&amp;nbsp;one?[/quote]
&lt;p&gt;For the UK there are &lt;a href="https://www.gsma.com/solutions-and-impact/technologies/internet-of-things/deployment-map/"&gt;two&amp;nbsp;operators listed in the GSMA IoT Deployment map&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;Telefonica for LTE-M&lt;/p&gt;
&lt;p&gt;Vodafone for NB-IoT&lt;/p&gt;
&lt;p&gt;Could you provide logs from your device using the Vodafone SIM? Most importantly the SIM need to support LTE-M and/or NB-IoT. You could have a go with &lt;a href="https://www.wirelesslogic.com/"&gt;Wireless Logic&amp;#39;s roaming SIM&lt;/a&gt;&amp;#39;&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><item><title>RE: MQTT Sample Not Connecting on nRF9160 Board</title><link>https://devzone.nordicsemi.com/thread/490171?ContentTypeID=1</link><pubDate>Mon, 24 Jun 2024 08:36:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d11c9ca7-474f-4357-a426-ab8860b2b486</guid><dc:creator>RodWatt</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;I just outside Cambridge, in CB23 postcode. I have put the SIM card in a mobile phone and and seeing &amp;quot;4 bars&amp;quot; so I think Im getting a strong signal. Maybe I am using an incompatible SIM card. Can you recommend&amp;nbsp;one for this area?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Does the MQTT demo use LTE-M or NBIOT?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Rod&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample Not Connecting on nRF9160 Board</title><link>https://devzone.nordicsemi.com/thread/490168?ContentTypeID=1</link><pubDate>Mon, 24 Jun 2024 08:31:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30ecba0a-bb53-48bf-badd-89005d9160ba</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Thanks Rod!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The device is timing out during the connection. My initial thought is that your connection is poor, i.e. bad signal strength.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;At what location are you testing?&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><item><title>RE: MQTT Sample Not Connecting on nRF9160 Board</title><link>https://devzone.nordicsemi.com/thread/490027?ContentTypeID=1</link><pubDate>Fri, 21 Jun 2024 15:25:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d921fda-fd20-428c-9df0-0aad54c35721</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;I moved to 1.3.5 and saw the same error but when i moved to 1.3.4, it seems to be working better.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1718983427885v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Its still not connecting&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1718983474405v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Here is the trace file&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/trace_2D00_2024_2D00_06_2D00_21T15_2D00_21_2D00_04.370Z.mtrace"&gt;devzone.nordicsemi.com/.../trace_2D00_2024_2D00_06_2D00_21T15_2D00_21_2D00_04.370Z.mtrace&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Any suggestions?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Rod&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample Not Connecting on nRF9160 Board</title><link>https://devzone.nordicsemi.com/thread/490022?ContentTypeID=1</link><pubDate>Fri, 21 Jun 2024 15:08:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a85b7abc-2c18-4e5e-b9d8-30a3e1d93b4f</guid><dc:creator>RodWatt</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;I updated the firmware to the latest version.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2024_2D00_06_2D00_21-at-15.37.24.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;However, this seems to have introduced more errors. The trace-sim-lte connection-ppm status is stuck at Trace.&lt;/p&gt;
&lt;p&gt;There is also an error around the database.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Screenshot-2024_2D00_06_2D00_21-at-15.53.04.png" alt=" " /&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;Do i need to change something else to use the latest&amp;nbsp;&lt;/span&gt;firmware?&lt;/p&gt;
&lt;p&gt;Rod&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: MQTT Sample Not Connecting on nRF9160 Board</title><link>https://devzone.nordicsemi.com/thread/489709?ContentTypeID=1</link><pubDate>Thu, 20 Jun 2024 11:38:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f36f440e-e04f-486c-97d6-348ab5cbe86d</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;No, no reason, i just have not updated to the latest :-( I will update the modem firmware and let you know.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Rod&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample Not Connecting on nRF9160 Board</title><link>https://devzone.nordicsemi.com/thread/489705?ContentTypeID=1</link><pubDate>Thu, 20 Jun 2024 11:33:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffb82895-dc6b-4d2b-b75e-5066a94dc839</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Thanks Rod! The logs show that you are having same hard fault, and this might be related to the modem FW you are running. Any reason for running mfw 1.2.3, could you try with modem fw 1.3.x?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample Not Connecting on nRF9160 Board</title><link>https://devzone.nordicsemi.com/thread/489363?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2024 16:34:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:110b106d-c592-40d5-8377-71f92fd444a6</guid><dc:creator>RodWatt</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/trace_2D00_2024_2D00_06_2D00_18T15_2D00_55_2D00_53.314Z.mtrace"&gt;devzone.nordicsemi.com/.../trace_2D00_2024_2D00_06_2D00_18T15_2D00_55_2D00_53.314Z.mtrace&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2024_2D00_06_2D00_18T15_5F00_55_5F00_37.310Z_2D00_log.txt"&gt;devzone.nordicsemi.com/.../2024_2D00_06_2D00_18T15_5F00_55_5F00_37.310Z_2D00_log.txt&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;is this what you need?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Rod&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample Not Connecting on nRF9160 Board</title><link>https://devzone.nordicsemi.com/thread/489284?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2024 11:57:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b50b36de-f7d1-4f9b-97c7-a4cb7f74c772</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;/p&gt;
[quote user="RodWatt"]I am using a Tesco PAYG SIM currently but have tried SIMS from EE and Vodafone[/quote]
&lt;p&gt;There does not seem to be an issue with the SIM you are using, from what I can see in the Cellular Monitor. You are connected to home network using LTE-M. The signal might be a little bad.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Could you &lt;a href="https://docs.nordicsemi.com/bundle/nrf-connect-cellularmonitor/page/capturing.html"&gt;please provide a modem trace from your device&lt;/a&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><item><title>RE: MQTT Sample Not Connecting on nRF9160 Board</title><link>https://devzone.nordicsemi.com/thread/489236?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2024 09:21:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae7bc4ae-ea8b-4d8f-8efc-7b1076c3b9b8</guid><dc:creator>RodWatt</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;I have not changed the code so am trying to connect to the default of&amp;nbsp;test.mosquitto.org. I am using a Tesco PAYG SIM currently but have tried SIMS from EE and Vodafone. Can you recommend&amp;nbsp;one? I am based in the UK.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Cheers,&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Rod&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: MQTT Sample Not Connecting on nRF9160 Board</title><link>https://devzone.nordicsemi.com/thread/489219?ContentTypeID=1</link><pubDate>Tue, 18 Jun 2024 08:40:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4903ff3f-afa0-4c6c-9055-5084d0448cfc</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello Rod,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What MQTT&amp;nbsp;broker are you trying to connect? And with what SIM card?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;From the start of the log, the LTE Link Controller reports the following&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:00:00.508,270] &amp;lt;err&amp;gt; lte_lc: Could not send AT command, error: 65536
[00:00:00.508,270] &amp;lt;err&amp;gt; lte_lc: Failed to set system mode and mode preference, err -14&lt;/pre&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;#define&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;NRF_EFAULT&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;14&lt;/span&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /**&amp;lt; Bad address */&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;code&gt;&lt;/code&gt;&lt;/code&gt;
&lt;div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;#define&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;NRF_ETIMEDOUT&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;116&lt;/span&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; /**&amp;lt; Connection timed out */&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;Here is my output after building the default MQTT sample (with nRF Connect SDK v2.6.0)&lt;/div&gt;
&lt;div&gt;&lt;pre class="ui-code" data-mode="text"&gt;+CSCON: 1
+CGEV: ME PDN ACT 0,0
+CNEC_ESM: 50,0
+CEREG: 5,&amp;quot;8173&amp;quot;,&amp;quot;01165700&amp;quot;,7,,,&amp;quot;11100000&amp;quot;,&amp;quot;11100000&amp;quot;
[00:00:09.843,292] &amp;lt;inf&amp;gt; network: Network connectivity established
[00:00:15.231,231] &amp;lt;inf&amp;gt; transport: Connected to MQTT broker
[00:00:15.231,262] &amp;lt;inf&amp;gt; transport: Hostname: test.mosquitto.org
[00:00:15.231,323] &amp;lt;inf&amp;gt; transport: Client ID: 350457791991456
[00:00:15.231,323] &amp;lt;inf&amp;gt; transport: Port: 1883
[00:00:15.231,353] &amp;lt;inf&amp;gt; transport: TLS: No
[00:00:15.231,414] &amp;lt;inf&amp;gt; transport: Subscribing to: 350457791991456/my/subscribe/topic
[00:00:15.303,253] &amp;lt;inf&amp;gt; transport: Subscribed to topic 350457791991456/my/subscribe/topic
+CSCON: 0
[00:01:00.324,523] &amp;lt;inf&amp;gt; transport: Published message: &amp;quot;Hello MQTT! Current uptime is: 60315&amp;quot; on topic: &amp;quot;350457791991456/my/publish/topic&amp;quot;
+CSCON: 1
+CSCON: 0
[00:02:00.324,707] &amp;lt;inf&amp;gt; transport: Published message: &amp;quot;Hello MQTT! Current uptime is: 120315&amp;quot; on topic: &amp;quot;350457791991456/my/publish/topic&amp;quot;
+CSCON: 1
+CSCON: 0&lt;/pre&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;KInd regards,&lt;br /&gt;Øyvind&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>