<?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>Unable to connect nrf9160 https-client over NB-IOT</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97636/unable-to-connect-nrf9160-https-client-over-nb-iot</link><description>Hello, I am trying to create a socket and create a https request over NB-IOT. We started with the nrf9160 https-client sample, and changed the prefered and connection mode from LTE-M to NB-IOT. 
 We are located in Germany, and are connecting though a</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 05 Apr 2023 05:41:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97636/unable-to-connect-nrf9160-https-client-over-nb-iot" /><item><title>RE: Unable to connect nrf9160 https-client over NB-IOT</title><link>https://devzone.nordicsemi.com/thread/419137?ContentTypeID=1</link><pubDate>Wed, 05 Apr 2023 05:41:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ea90dcd6-b3dd-438d-add9-e0cf9ecb46c6</guid><dc:creator>Achim Kraus</dc:creator><description>&lt;p&gt;TCP isn&amp;#39;t really a &amp;quot;match&amp;quot; for NB-IoT. If you want to use it with TLS, you must even care of a couple more details.&lt;/p&gt;
&lt;p&gt;TCP inject some inner protocol messages, which are usually used to implement the TCP grants (reliability and congestion control). The larger RTT of NB-IoT makes the default timing for such additional traffic inadequate, therefore it takes even some more injected messages to control that. You can&amp;#39;t do too much except to relax your application timeouts (e.g. TCP connect timeout, HTTP request timeouts) and you may potential need retries for the TCP connect.&lt;/p&gt;
&lt;p&gt;If TLS comes into play, the you need to take care about the authentication mechanism. Usually only x509 is available and that comes with certificate chains. The size of such chains vary. Using a couple RSA 2048/4096 gets fast very large, AFAIK the TLS stack of the modem accepts only chains up to 4096 bytes at all, so usually you should better got for ECDSA certificates. TLS libraries usually also comes with timing assumption during the handshake, you need to relax them as good as you can.&lt;/p&gt;
&lt;p&gt;With both, relaxing TCP, TLS and HTTP timings, and ensure to use small x509 certificate chains, you may have a chance to make it working. But as I started, that&amp;#39;s far away from being a &amp;quot;winning match&amp;quot;. In the end it&amp;#39;s far not that stable as CoAP/DTLS 1.2 CID, especially, if the radio conditions are not that good.&lt;br /&gt; &amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to connect nrf9160 https-client over NB-IOT</title><link>https://devzone.nordicsemi.com/thread/419026?ContentTypeID=1</link><pubDate>Tue, 04 Apr 2023 10:59:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfe6379d-4447-403d-8a6d-c7502224bc70</guid><dc:creator>Hakon</dc:creator><description>[quote user="sawaiz"]Is there any example code or suggestion for testing http connections?[/quote]
&lt;p&gt;I couldn&amp;#39;t find any test samples for http specifically. If there are any tests, you would most probably find them under nrf/tests in the NCS repository.&lt;/p&gt;
[quote user="sawaiz"]Our guess is the lower bandwidth of NB-IOT isn&amp;#39;t suited for https connections and we need to test this over http.[/quote]
&lt;p&gt;This is true. Using any TCP based protocol is not recommended, because of the lower bandwidth of NB-IoT. Instead, you should consider using a UDP based protocol like CoAP.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to connect nrf9160 https-client over NB-IOT</title><link>https://devzone.nordicsemi.com/thread/417942?ContentTypeID=1</link><pubDate>Tue, 28 Mar 2023 15:14:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:549f4c3f-3daf-47ed-a0af-51c6b383c5b3</guid><dc:creator>sawaiz</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have some updates from testing. I installed the serial modem client and ran some testing with AT commands and was able to make a http request over NB-IOT. I did not figure out how to make https commands though that.&lt;/p&gt;
&lt;p&gt;Doing some more testing, it turned out the response was ~2300 characters which was causing problems.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We are able to make a connection over NB-IOT to &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;httpbin.org/ip&lt;/span&gt; with the https-client example (although it takes ~10-30s for the 62 bytes to be sent. But it does not work with our own server. Although everything responds quickly, both our server and httpbin, when we set it back to LTE-M.&lt;/p&gt;
&lt;p&gt;Our guess is the lower bandwidth of NB-IOT isn&amp;#39;t suited for https connections and we need to test this over http. I haven&amp;#39;t found any example code, or what lines I can comment out to make the https-client example connect over http instead. Is there any example code or suggestion for testing http connections?&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sawaiz&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Unable to connect nrf9160 https-client over NB-IOT</title><link>https://devzone.nordicsemi.com/thread/415292?ContentTypeID=1</link><pubDate>Tue, 14 Mar 2023 15:37:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74ff0753-dcf6-4b0d-bd7a-4480faa7ce2e</guid><dc:creator>JONATHAN LL</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Not sure if changing&amp;nbsp;to HTTP would make much of a change compared to HTTPS. It looks like the device is connected to the network from the log, but there is a timeout (error 116) so the server is not responding for some reason.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;You can test with legacy PCO. Alternatives that I can come to think of are some subscription restrictions with the SIM like no data for NB-IOT network or maybe a different APN.&amp;nbsp;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Jonathan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>