<?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>Ultra-low Power NB-IOT example code</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/102679/ultra-low-power-nb-iot-example-code</link><description>Hi, 
 I am looking for a sample code, which demonstrates the ultra-low power capabilities of the nRF9160 with the following features: 
 
 The device should send some dummy data to the nRF Cloud and then enter PSM. 
 After a certain TAU, the device should</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 21 Aug 2023 13:27:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/102679/ultra-low-power-nb-iot-example-code" /><item><title>RE: Ultra-low Power NB-IOT example code</title><link>https://devzone.nordicsemi.com/thread/442319?ContentTypeID=1</link><pubDate>Mon, 21 Aug 2023 13:27:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:beeffa79-51d3-4796-a6bf-54e17730a00d</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You can find the configuration information in the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.1/nrf/samples/nrf9160/udp/README.html#configuration"&gt;documentation&lt;/a&gt;. I think what you are saying sounds fine.&lt;/p&gt;
&lt;p&gt;To me it looks like the total frame size if generated by network, since that is the whole &lt;a href="https://en.wikipedia.org/wiki/Ethernet_frame"&gt;Ethernet_frame&lt;/a&gt;. There are differences between how the whole frames look like using Ethernet, Wi-Fi, LTE.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Michal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ultra-low Power NB-IOT example code</title><link>https://devzone.nordicsemi.com/thread/441555?ContentTypeID=1</link><pubDate>Wed, 16 Aug 2023 10:07:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b376e4c-6b67-4b52-9524-3131d862828f</guid><dc:creator>hypn0</dc:creator><description>&lt;p&gt;Dear Michal,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks you for your answer and sorry for my late reply, I had some trouble setting up my system for the reception of UDP packages. However, the UDP example works now and the average current in PSM mode is around 3 uA :-)&lt;/p&gt;
&lt;p&gt;I have a last question regarding the UDP example:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I want to send a certain amount of data in order to be able to compare it to another hardware solution I have to investigate. My understanding is that the size of the UDP payload in the code is determined by two settings:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;main.c&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define UDP_IP_HEADER_SIZE 28&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;(I assume this setting should not be changed)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;and there is this setting in the nRF Kconfig:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/0804.kconfig.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;I assume this one is represented by the CONFIG_UPD_DATA_UPLOAD_SIZE_BYTES define, which is also used in the main.c&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;pre class="ui-code" data-mode="text"&gt;	printk(&amp;quot;Transmitting UDP/IP payload of %d bytes to the &amp;quot;,
	       CONFIG_UDP_DATA_UPLOAD_SIZE_BYTES + UDP_IP_HEADER_SIZE);&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;So using these two values the total payload is 38 Bytes.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;However,&amp;nbsp;the size of the UPD packets I receive on the corresponding port are 60 bytes each. Are these additional bytes generated in the network or by the nRF9160?&lt;br /&gt;The following image shows the data I receive on the port caputred with Wireshark:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/3036.wireshark.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;As you can see the actual data is 10 Bytes, however, the total package size is 60 Bytes. I am not so familiar with UDP. My only concern is to know if the 60 bytes are sent by the NRF9160 or if the chip actually only sends the 38 bytes. I hope you understand what I mean.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;If I want to change the length of the data payload can I&amp;nbsp;just change the value in the Kconfig view?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/0804.kconfig.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-family:inherit;"&gt;Have a great day!&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ultra-low Power NB-IOT example code</title><link>https://devzone.nordicsemi.com/thread/440507?ContentTypeID=1</link><pubDate>Wed, 09 Aug 2023 12:59:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f212b086-f323-4e97-9563-82fd56073886</guid><dc:creator>Michal</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]Which of the given Application/Samples suits these requirements?&amp;nbsp;[/quote]
&lt;p&gt;We two relevant samples that you could combine:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.1/nrf/samples/nrf9160/udp/README.html"&gt;nRF9160: UDP&lt;/a&gt; has sending dummy data, going to sleep and waking up after a given time.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.1/nrf/samples/nrf9160/nrf_cloud_rest_device_message/README.html"&gt;nRF9160: nRF Cloud REST Device Message&lt;/a&gt; is a sample for sending data to the nRF Cloud.&lt;/p&gt;
&lt;p&gt;Since you want to use NB-IoT you will have to change in &lt;code&gt;prj.conf&lt;/code&gt; from&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_LTE_NETWORK_MODE_LTE_M=y&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;to&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_LTE_NETWORK_MODE_NBIOT=y&lt;/pre&gt;&lt;/p&gt;
[quote user=""]Can you provide me with the documentation about how to enter PSM and how to configure TAU?&amp;nbsp;[/quote]
&lt;p&gt;If set up, the device should automatically enter PSM when it is done with the communication.&lt;/p&gt;
&lt;p&gt;You can change the settings in compile time via your prj.conf. In the UDP sample you can find the following section there:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;## PSM
CONFIG_UDP_PSM_ENABLE=y
CONFIG_LTE_PSM_REQ_RPTAU=&amp;quot;00100001&amp;quot;
CONFIG_LTE_PSM_REQ_RAT=&amp;quot;00000000&amp;quot;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Config documentation:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.1/kconfig/#CONFIG_LTE_PSM_REQ_RPTAU"&gt;CONFIG_LTE_PSM_REQ_RPTAU&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.1/kconfig/#CONFIG_LTE_PSM_REQ_RAT"&gt;CONFIG_LTE_PSM_REQ_RAT&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;As it can be seen there, the official documentation about the data formats can be found in 3GPP 27.007 Ch. 7.38. nd 3GPP 24.008 Ch. 10.5.7.4a (Periodic-TAU) and 3GPP 27.007 Ch. 7.38. and 3GPP 24.008 Ch. 10.5.7.3 (Active-Time), but for a quick reference you can for example use the &lt;a href="https://infocenter.nordicsemi.com/topic/ref_at_commands/REF/at_commands/nw_service/cpsms_set.html"&gt;+CPSMS&lt;/a&gt; AT command documentation.&lt;/p&gt;
&lt;p&gt;If you want to do it in runtime, we have the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.1/nrf/libraries/modem/lte_lc.html#enabling-power-saving-features"&gt;enabling power saving features&lt;/a&gt; in our LTE link controller library documentation. You can also find the API documentation there.&lt;/p&gt;
&lt;p&gt;You can also send the aforementioned AT command for setting this configuration.&lt;/p&gt;
&lt;p&gt;Also some networks may grant you Periodic-TAU, but not Active-Time. In that case the PSM will NOT work.&lt;/p&gt;
&lt;p&gt;For checking the actual granted values you can use the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.1/nrf/libraries/modem/lte_lc.html#c.lte_lc_psm_get"&gt;lte_lc_psm_get()&lt;/a&gt; function or &lt;a href="https://infocenter.nordicsemi.com/topic/ref_at_commands/REF/at_commands/nw_service/xmonitor_set.html"&gt;%XMONITOR&lt;/a&gt; AT command.&lt;/p&gt;
&lt;p&gt;Remember that Periodic-TAU is the maximum time your device can be offline. It should be larger than the actual time your device is asleep.&lt;/p&gt;
&lt;p&gt;The device should automatically go into the System ON sleep mode while in &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.1/zephyr/kernel/services/threads/system_threads.html"&gt;idle thread&lt;/a&gt;.&lt;/p&gt;
[quote user=""]Are there any current measurements provided by nordic, which&amp;nbsp;underpin the current values statet in the datasheet?&amp;nbsp;[/quote]
&lt;p&gt;We have for example a guide on &lt;a href="https://devzone.nordicsemi.com/guides/hardware-design-test-and-measuring/b/nrf9x/posts/getting-started-with-current-measurements-on-the-nrf9160"&gt;getting started with current measurements on the nRF9160&lt;/a&gt; that also has some real-life measurements using the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.4.1/nrf/samples/nrf9160/udp/README.html"&gt;UDP sample&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Michal&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>