<?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>samples/net/aws_iot sample strange behavior using nRF9160</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/116559/samples-net-aws_iot-sample-strange-behavior-using-nrf9160</link><description>Hi, I&amp;#39;m having trouble running the samples/net/aws_iot sample on nRF9160-based board. 
 Configuration: - nCS: v2.6.0 - modem version: nrf9160_1.3.6 
 When running the sample with default settings for a nRF9160-based custom board using provided overlay</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 06 Jan 2025 15:37:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/116559/samples-net-aws_iot-sample-strange-behavior-using-nrf9160" /><item><title>RE: samples/net/aws_iot sample strange behavior using nRF9160</title><link>https://devzone.nordicsemi.com/thread/517065?ContentTypeID=1</link><pubDate>Mon, 06 Jan 2025 15:37:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4dd52d29-7788-4126-858e-2a3aa2a11439</guid><dc:creator>soutys</dc:creator><description>&lt;p&gt;Anyway, the problem has been solved by changing the value of `MQTT_HELPER_PAYLOAD_BUFFER_LEN` to 4096. It was just misleading that `NRF_MODEM_LIB` sets it to 2048 by default.&lt;br /&gt;&lt;br /&gt;Thanks for help!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: samples/net/aws_iot sample strange behavior using nRF9160</title><link>https://devzone.nordicsemi.com/thread/517055?ContentTypeID=1</link><pubDate>Mon, 06 Jan 2025 15:14:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3dbb99a-bdc7-4245-a10b-09bc59c2409d</guid><dc:creator>Hakon</dc:creator><description>[quote user="soutys"]That&amp;#39;s why I don&amp;#39;t understand the connection between this Kconfig option and the modem&amp;#39;s TLS buffer size.[/quote]
&lt;p&gt;Ok, I assume the default value is set because of the TLS buffer limit when using modem TLS stack. I don&amp;#39;t think changing to offloaded sockets does anything to the default value of this config.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: samples/net/aws_iot sample strange behavior using nRF9160</title><link>https://devzone.nordicsemi.com/thread/516561?ContentTypeID=1</link><pubDate>Tue, 31 Dec 2024 09:14:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5e769f32-7223-4a4c-bf6f-38715c30ad5b</guid><dc:creator>soutys</dc:creator><description>&lt;p&gt;But the application uses offloaded sockets (e.g. we&amp;#39;re uploading certs to the modem using nrfcredstore). The MQTT_HELPER_PAYLOAD_BUFFER_LEN increases the buffer on the application (cpu) side. This has resolved our problems regarding incoming messages&amp;#39; size. That&amp;#39;s why I don&amp;#39;t understand the connection between this Kconfig option and the modem&amp;#39;s TLS buffer size.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: samples/net/aws_iot sample strange behavior using nRF9160</title><link>https://devzone.nordicsemi.com/thread/515473?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 12:22:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0fbea94a-5468-4f71-a66d-198b53a0c834</guid><dc:creator>Hakon</dc:creator><description>[quote user="soutys"]The question is - why the default value is set to 2048 if NRF_MODEM_LIB is set, and why not 4096 then?[/quote]
&lt;p&gt;For TLS, the modem limit is 2KB. But using mbedTLS stack instead will increase the available buffer size.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: samples/net/aws_iot sample strange behavior using nRF9160</title><link>https://devzone.nordicsemi.com/thread/514743?ContentTypeID=1</link><pubDate>Thu, 12 Dec 2024 12:59:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8986b655-8a86-4aca-863a-ad73f6a8e194</guid><dc:creator>soutys</dc:creator><description>&lt;p&gt;Okay, turns out, even though MQTT_HELPER_PAYLOAD_BUFFER_LEN default value is 2048 if NRF_MODEM_LIB, it is still configurable. So setting it to 4096 solved my problems (I think). The question is - why the default value is set to 2048 if NRF_MODEM_LIB is set, and why not 4096 then?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: samples/net/aws_iot sample strange behavior using nRF9160</title><link>https://devzone.nordicsemi.com/thread/514710?ContentTypeID=1</link><pubDate>Thu, 12 Dec 2024 11:22:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d58ece52-cf30-4367-9622-038fd1e3a8ab</guid><dc:creator>soutys</dc:creator><description>&lt;p&gt;Trying to reproduce it on a nrf9160 DK board, I&amp;#39;ve created a new device with the default Classic Shadow. To my surprise, after flashing the app with the proper certificates, it worked. Wireshark also showed no problems with the connection. I&amp;#39;ve decided to run modem trace on my custom board and I saw a lot of &amp;quot;Encrypted Alert&amp;quot; messages (followed by TCP&amp;#39;s RST messages). Unfortunately they couldn&amp;#39;t be decrypted because of using the ECDH key exchange.&lt;br /&gt;&lt;br /&gt;Then I&amp;#39;ve tried to connect my custom device to AWS using certs and device name of the nrf9160 DK I&amp;#39;ve created earlier. To my another surprise - it also worked well. &lt;strong&gt;After very long investigation I&amp;#39;ve discovered that the shadow length is &amp;quot;my enemy&amp;quot; &lt;/strong&gt;(my shadows have a lot of values, so they&amp;#39;re kinda long). I&amp;#39;ve decided to remove Classic Shadow and add it once again - after that a new error logs appeared. Using offloaded sockets on nrf9160, we have a 2048 B buffer available. BUT the messages sent by the server (topic: &lt;em&gt;$aws/things/&amp;lt;thing_name&amp;gt;/shadow/get/accepted&lt;/em&gt;) were too long for the device (&lt;strong&gt;ERR: mgtt_helper: Incoming MQTT message too long for payload buffer&lt;/strong&gt;). Turns out the incoming messages were &amp;gt; 2100 B long (they were containing also the metadata with timestamps...), so they were dropped and the device were continuously disconnecting and connecting again.&lt;br /&gt;&lt;br /&gt;So - the reason of such behavior is not large enough buffer of nrf91 modem (2kB). &lt;strong&gt;Is there a way to increase this value (on the ncs/zephyr side), so the device concatenate bigger messages and successfully decrypts them?&lt;/strong&gt; One of the solutions is to remove sending &amp;quot;metadata&amp;quot; on &amp;quot;get/accepted&amp;quot; topics (configured by AWS IoT rules) so the messages are shrank from &amp;gt;2KB to ~700B. But what if &amp;quot;someone&amp;quot; wants to use the received metadata? Is there a possibility to receive bigger messages?&lt;br /&gt;&lt;br /&gt;Thanks in advance!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: samples/net/aws_iot sample strange behavior using nRF9160</title><link>https://devzone.nordicsemi.com/thread/513607?ContentTypeID=1</link><pubDate>Thu, 05 Dec 2024 11:36:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:516b0113-900d-4d4b-a65c-24d9aabc04ed</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Do you have a DK available? Perhaps you can try reproducing it on a DK, write the certificates and do all the step again to make sure it reproduces. Also you can try to capture modem trace to see if it will show anything.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: samples/net/aws_iot sample strange behavior using nRF9160</title><link>https://devzone.nordicsemi.com/thread/512946?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2024 11:29:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:089e52cc-c844-4fa5-b7c5-a5d9642b78a4</guid><dc:creator>soutys</dc:creator><description>&lt;p&gt;Yes, we have proper policies to publish etc. In fact, I&amp;#39;ve ensured this by adding a new policy that &amp;quot;allows everything on everything&amp;quot; in case my previous policies were invalid. Still no change.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: samples/net/aws_iot sample strange behavior using nRF9160</title><link>https://devzone.nordicsemi.com/thread/512924?ContentTypeID=1</link><pubDate>Mon, 02 Dec 2024 10:25:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f146587e-d141-40da-ad91-9f2f1d9cb834</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;How is the MQTT endpoint set up? Do you have permission to publish? Are there any policies?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: samples/net/aws_iot sample strange behavior using nRF9160</title><link>https://devzone.nordicsemi.com/thread/512860?ContentTypeID=1</link><pubDate>Sun, 01 Dec 2024 14:30:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:04961a0d-2e6f-4a92-8537-b05ee5aad100</guid><dc:creator>soutys</dc:creator><description>&lt;p&gt;Nothing, actually. We&amp;#39;re just reading the shadow data, no jobs or commands are being used.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: samples/net/aws_iot sample strange behavior using nRF9160</title><link>https://devzone.nordicsemi.com/thread/512738?ContentTypeID=1</link><pubDate>Fri, 29 Nov 2024 11:58:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3042133d-5bbe-4874-b57d-f39fb7e047c0</guid><dc:creator>Hakon</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;can you provide more details on what you are doing on the AWS side?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>