<?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_connect error no 22 appearing after several successful connections.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97008/mqtt_connect-error-no-22-appearing-after-several-successful-connections</link><description>Hello, 
 We&amp;#39;ve been developing some software,for the nrf9160, based on the asset tracker that posts to an AWS server periodically using the aws_iot library. After many days of running without incident the device appears to have stopped posting altogether;</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 01 Mar 2023 12:39:27 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97008/mqtt_connect-error-no-22-appearing-after-several-successful-connections" /><item><title>RE: mqtt_connect error no 22 appearing after several successful connections.</title><link>https://devzone.nordicsemi.com/thread/412738?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2023 12:39:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:629806cb-c453-42dc-8216-4328f147d68d</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;In order to have better insight into the problem, please provide modem trace.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mqtt_connect error no 22 appearing after several successful connections.</title><link>https://devzone.nordicsemi.com/thread/412610?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 21:27:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c8d64cc-06e6-4159-828b-7201b1d5a290</guid><dc:creator>Jstone40649</dc:creator><description>&lt;p&gt;Sure, I&amp;#39;ll get working on that though it&amp;#39;s a very non-deterministic problem so it might take a while. These devices often run for months on end without encountering issues. I can add that configuration and setup more devices, but it&amp;#39;s not something that&amp;#39;s occurring often though when it does occur it appears to latch.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;In the meantime is it possible to look into possible causes for EINVAL responses out of aws_iot_connect()?&lt;br /&gt;&lt;br /&gt;I&amp;#39;ve been looking through myself and it seems that most of the time that function returns EINVAL when there&amp;#39;s some incorrect configuration information. If that&amp;#39;s consistent it would mean that some part of our configuration is being corrupted during runtime which we can look into.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If there&amp;#39;s other situations where an EINVAL could originate from we could do debugging on that.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;If at all possible I&amp;#39;d like to have some idea of where I could&amp;nbsp;start looking for these sort of things, while I wait for more data from the devices themselves.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mqtt_connect error no 22 appearing after several successful connections.</title><link>https://devzone.nordicsemi.com/thread/412453?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 10:08:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:299c77af-7fdf-4aa2-8089-f0b65cde41a1</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Could you provide application log after you enable&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_NET_LOG"&gt;CONFIG_NET_LOG&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_MQTT_LOG_LEVEL_DBG"&gt;CONFIG_MQTT_LOG_LEVEL_DBG&lt;/a&gt;&amp;nbsp;configuration options in your prj.conf file?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mqtt_connect error no 22 appearing after several successful connections.</title><link>https://devzone.nordicsemi.com/thread/412280?ContentTypeID=1</link><pubDate>Mon, 27 Feb 2023 13:22:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:959a6817-d841-42af-bc02-55b3a0b77282</guid><dc:creator>Jstone40649</dc:creator><description>&lt;p&gt;Sure, I&amp;#39;m not sure what specifically might be important. I&amp;#39;ll cover what I can, but if you&amp;#39;ve got a more specific question let me know.&lt;/p&gt;
&lt;p&gt;We have a custom board with an NRF9160 being used to post data to AWS. The application&amp;#39;s purpose is to generally sit idle, waiting for an external &amp;#39;Post&amp;#39; command.&amp;nbsp;That trigger causes the modem to connect, if the modem connects it triggers AWS to&amp;nbsp; connect, if AWS connects it triggers a publish; then we format a JSON message and attempt to publishes that to AWS.&lt;/p&gt;
&lt;p&gt;The general purpose of the app is post data to the cloud periodically, every hour or so, otherwise it sits &amp;#39;idle/sleeping&amp;#39;.&amp;nbsp;&lt;br /&gt;Code-wise it&amp;#39;s largely based off the Asset Tracker example, and uses the application event structure. Once fully provisioned the devices will be booted once, and then expected to run &amp;#39;forever&amp;#39;. Before running into this &amp;quot;EINVAL&amp;quot; issue, the device has happily posted dozens, if not hundreds of times. This error also appears to be latching, as the device will never post again, unless we re-boot via power cycle.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mqtt_connect error no 22 appearing after several successful connections.</title><link>https://devzone.nordicsemi.com/thread/411987?ContentTypeID=1</link><pubDate>Fri, 24 Feb 2023 13:43:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21f2f530-ad6c-427b-ac81-cb17124c3d41</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;The error you see is EINVAL 22 Invalid Argument error.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Could you provide more information about your application?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>