<?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>nRF9160DK and AWS Greengrass Discovery Sequence</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/69303/nrf9160dk-and-aws-greengrass-discovery-sequence</link><description>Hi, 
 I am trying to implement the AWS Discovery Sequence with the nRF9160DK board as the AWS Greengrass connected device. I am using the nRF Connect SDK v1.4.0 and used the HTTPS_CLIENT sample application as the basis of my implementation. I also had</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 09 Feb 2021 09:51:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/69303/nrf9160dk-and-aws-greengrass-discovery-sequence" /><item><title>RE: nRF9160DK and AWS Greengrass Discovery Sequence</title><link>https://devzone.nordicsemi.com/thread/293499?ContentTypeID=1</link><pubDate>Tue, 09 Feb 2021 09:51:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7418bc84-437e-438d-9cef-4e59386fa14e</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I talked to a colleague with more knowledge about this and gained more insight&lt;/p&gt;
[quote user="ronald-swiftlabs"]1) Confirmation that the modem (nrf_recvfrom) returns 0 bytes if it actually receives more than 2700 bytes[/quote]
&lt;p&gt;I can confirm this. However, this applies only for TLS (maybe DTLS). If you don&amp;#39;t encrypt your data it will be fine. Or you can run the TLS stack on the application side, and configure as large buffers as you&amp;nbsp;want.&lt;/p&gt;
[quote user="ronald-swiftlabs"]2) Is there a plan to increase TLS secure buffer in the future?[/quote]
&lt;p&gt;The answer here is unfortunately no.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160DK and AWS Greengrass Discovery Sequence</title><link>https://devzone.nordicsemi.com/thread/292020?ContentTypeID=1</link><pubDate>Fri, 29 Jan 2021 14:32:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:020fc396-63d8-48ad-b2e8-1f1b029c2656</guid><dc:creator>ronald-blackline</dc:creator><description>&lt;p&gt;I just need 2 more information:&lt;/p&gt;
&lt;p&gt;1) Confirmation that the modem (nrf_recvfrom) returns 0 bytes if it actually receives more than 2700 bytes&lt;/p&gt;
&lt;p&gt;2) Is there a plan to increase TLS secure buffer in the future?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160DK and AWS Greengrass Discovery Sequence</title><link>https://devzone.nordicsemi.com/thread/291920?ContentTypeID=1</link><pubDate>Fri, 29 Jan 2021 08:22:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c30e2b3-914b-4df9-b80f-dd68faf03c6e</guid><dc:creator>Simon</dc:creator><description>[quote user="ronald-swiftlabs"]Here is a little bit of information I just found out ... if i configure the response packet in such a way the HTTP response (including header) size is 1960 bytes, my app can received the HTTP response in entirety. However, if the response size is about 2700 bytes, the nrf_recvfrom() API returns 0 bytes.[/quote]
&lt;p&gt;These findings seems to align with this:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&amp;quot;&amp;nbsp;I found out that the modem firmware puts a limit to the TLS secure buffer of 2KB.&amp;quot;&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Do you agree?&lt;/p&gt;
&lt;p&gt;Do you have any more question/issues regarding this that you want me to investigate/forward internally?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160DK and AWS Greengrass Discovery Sequence</title><link>https://devzone.nordicsemi.com/thread/291133?ContentTypeID=1</link><pubDate>Mon, 25 Jan 2021 18:22:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc65d5df-ba18-4623-a38c-873b8cc18e43</guid><dc:creator>ronald-blackline</dc:creator><description>&lt;p&gt;Here is a little bit of information I just found out ... if i configure the response packet in such a way the HTTP response (including header) size is 1960 bytes, my app can received the HTTP response in entirety. However, if the response size is about 2700 bytes, the nrf_recvfrom() API returns 0 bytes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160DK and AWS Greengrass Discovery Sequence</title><link>https://devzone.nordicsemi.com/thread/291120?ContentTypeID=1</link><pubDate>Mon, 25 Jan 2021 16:57:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6d476dd5-b476-4a61-aeb5-400a67f48f94</guid><dc:creator>ronald-blackline</dc:creator><description>&lt;p&gt;With my latest code, it is not blocking anymore but Im receiving 0 bytes. Im still trying to capture logs on AWS if it is actually returning something. For the meantime, is providing you the merged HEX file of my firmware will help in reproducing the issue in your side?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160DK and AWS Greengrass Discovery Sequence</title><link>https://devzone.nordicsemi.com/thread/289785?ContentTypeID=1</link><pubDate>Mon, 18 Jan 2021 14:14:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3da8cfb-d9ed-437e-b6ad-c46070da9b89</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;You could try to do some &lt;a href="https://devzone.nordicsemi.com/nordic/nrf-connect-sdk-guides/b/getting-started/posts/nrf-connect-sdk-tutorial---part-3-ncs-v1-4-0#h131sk0f71xdy1hliuda1vq9p8n11weqgr"&gt;debugging&lt;/a&gt;&amp;nbsp;at the layer closest to the modem, try setting a breakpoint after &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/a61d43c681eb7e2609a01c1929ae6e2113d7f9a2/lib/bsdlib/nrf91_sockets.c#L764"&gt;nrf_recvfrom()&lt;/a&gt; and see if that function is blocking as well. It would be useful to be able to reproduce this myself. Are you able to upload a sample, and a step-by-step guide that helps me reproduce it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160DK and AWS Greengrass Discovery Sequence</title><link>https://devzone.nordicsemi.com/thread/289451?ContentTypeID=1</link><pubDate>Fri, 15 Jan 2021 13:59:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5bfef5c2-7860-497f-b004-8821d70d32fb</guid><dc:creator>ronald-blackline</dc:creator><description>&lt;p&gt;Thanks Simon! That should eliminate the modem from the issue.&lt;/p&gt;
&lt;p&gt;My application code basically performs a read call and that blocks. If the modem is not cause of the issue, then it might be the recv API? Below is the portion of the code where the hang happens:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;	off = 0;
	do {
		bytes = recv(fd, &amp;amp;recv_buf[off], RECV_BUF_SIZE - off, 0);
		if (bytes &amp;lt; 0) {
			printk(&amp;quot;recv() failed, err %d\n&amp;quot;, errno);
			goto clean_up;
		}
		off += bytes;

	} while (bytes != 0 /* peer closed connection */);
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Note RECV_BUF_SIZE = 4096. This code seems to work as long as received data is less than 1K. Where can I turn on debugging on this recv() API?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160DK and AWS Greengrass Discovery Sequence</title><link>https://devzone.nordicsemi.com/thread/289397?ContentTypeID=1</link><pubDate>Fri, 15 Jan 2021 12:05:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:613e313d-bc61-4724-905b-f2529d743868</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;These are the bytes forwarded to the application:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;21:24:26.857605 SOCKET_RPC_RECVFROM_NTF_MSG_TLS socket_id = 0, evt_data_len = 1024
21:24:26.857697 SOCKET_RPC_RECVFROM_NTF_MSG_TLS socket_id = 0, evt_data_len = 936&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Not sure if it&amp;#39;s possible to see the actual bytes, since they&amp;#39;re encrypted.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160DK and AWS Greengrass Discovery Sequence</title><link>https://devzone.nordicsemi.com/thread/289238?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2021 13:59:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fc086100-16a2-4b0b-8c83-0675d10b45e6</guid><dc:creator>ronald-blackline</dc:creator><description>&lt;p&gt;Can you also please confirm the actual bytes received by the modem and forwarded to the application from the modem trace?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160DK and AWS Greengrass Discovery Sequence</title><link>https://devzone.nordicsemi.com/thread/289102?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2021 09:40:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:db500b47-fb1e-42d6-b572-9d686b3de51e</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I got some feedback internally. In the modem trace you provided, the modem sends all the received data to the application, so the issue is most likely on the application side. Hopefully this helps you debug the issue.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160DK and AWS Greengrass Discovery Sequence</title><link>https://devzone.nordicsemi.com/thread/288814?ContentTypeID=1</link><pubDate>Wed, 13 Jan 2021 07:29:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:956d3707-5e4c-4cbd-8732-d66015016e32</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I would just like to tell you that I&amp;#39;ve reported your issue internally and provided the modem trace, hopefully someone with more knowledge about this are able to give some answers.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160DK and AWS Greengrass Discovery Sequence</title><link>https://devzone.nordicsemi.com/thread/287970?ContentTypeID=1</link><pubDate>Thu, 07 Jan 2021 13:53:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8aa0c69d-99f8-40b9-94f4-d9553d4720d3</guid><dc:creator>ronald-blackline</dc:creator><description>&lt;p&gt;I remembered if i trimmed down the payload to less than 1K, everything seems to work. I have to modify the HTTPS response payload originating from AWS Greengrass to trim it down to less than 1K. Otherwise, the call to &amp;#39;recv&amp;#39; seems to block.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160DK and AWS Greengrass Discovery Sequence</title><link>https://devzone.nordicsemi.com/thread/287890?ContentTypeID=1</link><pubDate>Thu, 07 Jan 2021 09:56:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b928d3f-1196-48f2-a284-bd79c4f8d398</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;In the case where you trimmed down your packet below 2KB, how did you calculate the size? Did you count in the whole TLS payload? Both the HTTP prototype and data?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160DK and AWS Greengrass Discovery Sequence</title><link>https://devzone.nordicsemi.com/thread/287290?ContentTypeID=1</link><pubDate>Mon, 04 Jan 2021 14:49:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:854aad68-edf7-4f6d-b775-1250bfda10c7</guid><dc:creator>ronald-blackline</dc:creator><description>&lt;p&gt;Hi Simon,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;m certain the issue is about the size of the HTTPS response. If the response size is about 2KBytes in size, I&amp;#39;m seeing the issue. Otherwise, the reply is fine. This is the reason I think the problem originates from the modem and any insights (from your team) from the modem trace I provided will be very helpful to my debugging.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160DK and AWS Greengrass Discovery Sequence</title><link>https://devzone.nordicsemi.com/thread/286525?ContentTypeID=1</link><pubDate>Thu, 24 Dec 2020 00:38:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ed4e5b7-ef95-4640-abcf-4a36b97856f7</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I talked to a colleague with more insight on this and he said that if you want information about http&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;s&lt;/strong&gt;&lt;/span&gt;, you won&amp;#39;t get it&amp;nbsp;from the modem trace, unless there is an issue with TLS. Could you try to enable more logging in the relevant libraries, that may give some more insight about the problem.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;A huge part of the support team are currently on Christmas vacaction, and you may experience delayed answers. Most of the staff will be back by january 4th and you can expect an answer after then.&amp;nbsp;I&amp;#39;ll see if I can reproduce this myself the 4th of January.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160DK and AWS Greengrass Discovery Sequence</title><link>https://devzone.nordicsemi.com/thread/285476?ContentTypeID=1</link><pubDate>Thu, 17 Dec 2020 01:02:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1747a88f-bd66-4df8-8642-540beca87d8c</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I&amp;#39;ll take a look at the modem trace. However, I&amp;#39;ll be gone until Monday so I won&amp;#39;t get time until then.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160DK and AWS Greengrass Discovery Sequence</title><link>https://devzone.nordicsemi.com/thread/285164?ContentTypeID=1</link><pubDate>Tue, 15 Dec 2020 16:39:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36a9dc7f-17b3-4f1e-b662-812c5307aa4a</guid><dc:creator>ronald-blackline</dc:creator><description>&lt;p&gt;Thank you for looking. Can you take a quick look at the modem trace and see if there is something that might be wrong when recieving the HTTP response?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF9160DK and AWS Greengrass Discovery Sequence</title><link>https://devzone.nordicsemi.com/thread/285160?ContentTypeID=1</link><pubDate>Tue, 15 Dec 2020 16:24:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:32fbd9fa-c188-4be2-9b58-717d746fb0bf</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I&amp;#39;m sorry for the delay on this. I&amp;#39;m not too familiar with AWS/AWS Greengrass, and encountered some problems when trying set it up to reproduce your issue. I will prioritize this ticket forward.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>