<?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>Helpon improving an IoT application.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97392/helpon-improving-an-iot-application</link><description>Hi, 
 
 I am developing an application where we send some sensor data to the cloud. I have a prototype that kind of works, but I want to ask the forum what can be done better and optimized to make it more efficient. 
 I have the problem that the application</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 07 Mar 2023 15:59:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97392/helpon-improving-an-iot-application" /><item><title>RE: Helpon improving an IoT application.</title><link>https://devzone.nordicsemi.com/thread/413927?ContentTypeID=1</link><pubDate>Tue, 07 Mar 2023 15:59:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7225a4df-883b-4c44-8b79-5e0c9c49c73b</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If you haven&amp;#39;t seen it already, I recommend that you take a look at our &lt;a href="https://academy.nordicsemi.com/"&gt;DevAcademy&lt;/a&gt;. It contains courses on both the SDK and the nRF9160, and it does also cover some power saving features.&lt;/p&gt;
&lt;p&gt;We also have an Online Power Profiler, which gives you an estimated power consumption based on different network parameters: &amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/power/w/opp/3/online-power-profiler-for-lte"&gt;Online Power Profiler for LTE&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The corresponding user guide gives some explanations about the different parameters: &amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/power/w/opp/4/guidelines-lte"&gt;Guidelines (LTE)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;However, in short, as long as the application is not doing anything (i.e. all threads are sleeping, waiting for semaphores or other kernel objects, poll()&amp;#39;ing a socket, or similar) the system will go to sleep (System On Idle to be specific).&lt;/p&gt;
&lt;p&gt;Other than making sure that the application sleeps as much as possible, you should also try to use the radio as little as possible. That often means balancing the tradeoff of lower power consumption by disconnecting (from the server and/or network), vs sending regularly to keep the connections alive. Typically, keeping the connection alive is &amp;quot;cheaper&amp;quot; than closing and re-opening the connection each time, but if you transmit very rarely, the higher &amp;quot;re-connection cost&amp;quot; can be worth it compared to many small keep-alive packets.&lt;/p&gt;
&lt;p&gt;For sending every 30 minutes, PSM and a long keep-alive time is probably the best combination, as Torje suggested. But, you should note that it is up to the network if you get PSM or not, and it is not always covered by roaming agreements. Though, from your log, it looks like you do get PSM.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Didrik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Helpon improving an IoT application.</title><link>https://devzone.nordicsemi.com/thread/413752?ContentTypeID=1</link><pubDate>Tue, 07 Mar 2023 09:44:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3def2279-9e9f-43e8-b589-cb997b0ed1dc</guid><dc:creator>Torje</dc:creator><description>&lt;p&gt;Hey!&lt;/p&gt;
&lt;p&gt;Adding my two cents to a couple of the questions:&lt;br /&gt;If you send within 30 minutes, you should stay connected to MQTT and to LTE. Stay in LTE PSM-mode, and it saves a lot of power instead of renegotiating with the network every time. Use a MQTT keepalive time longer than the 30 minutes, and you wont spend power on waking up for pings.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- Torje&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>