<?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>Open thread : Rx is always ON after communication is completed (Doesnt goes to sleep) - power consumption is high.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80653/open-thread-rx-is-always-on-after-communication-is-completed-doesnt-goes-to-sleep---power-consumption-is-high</link><description>Using windows 10 OS, and SES v5.40. 
 I am using nRF52833 device in my project along with nRF5_SDK_for_Thread_and Zigbee_v4.1.0_32ce5f8 SDK. 
 I am using openthread protocol for radio communication and i also know that we can use the below function to</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 26 Oct 2021 06:10:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80653/open-thread-rx-is-always-on-after-communication-is-completed-doesnt-goes-to-sleep---power-consumption-is-high" /><item><title>RE: Open thread : Rx is always ON after communication is completed (Doesnt goes to sleep) - power consumption is high.</title><link>https://devzone.nordicsemi.com/thread/335846?ContentTypeID=1</link><pubDate>Tue, 26 Oct 2021 06:10:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ac8bb1e5-35c4-4a57-8e8c-dba4e816bdfc</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Depending on whether you&amp;#39;re using a SoftDevice or not in your application the device will either go to sleep using the sd_app_evt_wait, or just use __WFE(); to wait for a wake-up event. The sd_app_evt_wait() also essentially does the same, except that it prepares the SoftDevice for sleep mode first.&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: Open thread : Rx is always ON after communication is completed (Doesnt goes to sleep) - power consumption is high.</title><link>https://devzone.nordicsemi.com/thread/335779?ContentTypeID=1</link><pubDate>Mon, 25 Oct 2021 13:40:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69ba9ddd-ae56-43f6-b77a-d9bbfde3bae3</guid><dc:creator>Abhijith.Desai</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I was just going through the thread examples in SDK we have.&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp;nRF5_SDK_for_Thread_and_Zigbee\examples\thread\simple_coap_server\pca10100\blank\ses&lt;/p&gt;
&lt;p&gt;2.nRF5_SDK_for_Thread_and_Zigbee\examples\thread\cli\mtd\usb\pca10100\blank\ses&lt;/p&gt;
&lt;p&gt;3.&amp;nbsp;nRF5_SDK_for_Thread_and_Zigbee\examples\thread\cli\ftd\usb\pca10100\blank\ses&lt;/p&gt;
&lt;p&gt;I could see that the thread_sleep(); function which is called to go to sleep&amp;nbsp;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1635168918348v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;The thing is i could not see the function which i expected the&amp;nbsp;otPlatRadioSleep(ot_instance); how exactly does the device go to sleep and i dont think prepare sleep is no really relavent for us..?&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Abhijith&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Open thread : Rx is always ON after communication is completed (Doesnt goes to sleep) - power consumption is high.</title><link>https://devzone.nordicsemi.com/thread/335445?ContentTypeID=1</link><pubDate>Fri, 22 Oct 2021 10:11:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc21c4de-dcf8-490d-9af6-e9bb219b57d1</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Adding the master key you posted in the sniffer trace you have uploaded did not &amp;quot;uncover&amp;quot; any extra information I&amp;#39;m afraid. Can you upload a new sniffer trace where this key is used to decode the packets?&lt;/p&gt;
&lt;p&gt;Most of our Thread example projects I.E. the Thread CLI example uses the following check to check if there are no pending tasks or log processes ongoing before calling the thread_sleep(); function which will put the device to sleep along with&amp;nbsp;any peripherals before going to sleep using __WFE();&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: Open thread : Rx is always ON after communication is completed (Doesnt goes to sleep) - power consumption is high.</title><link>https://devzone.nordicsemi.com/thread/335279?ContentTypeID=1</link><pubDate>Thu, 21 Oct 2021 11:31:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e740f693-0450-40c5-9b9a-20adeb15bbde</guid><dc:creator>Abhijith.Desai</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I tried to print only in the states and its corresponding radio states, i can see that the radio goes to sleep only once and then it remains in rx once it completes the process&amp;nbsp;&lt;/p&gt;
&lt;p&gt;the below code snippet is used in all the states of that function i shared.&lt;/p&gt;
&lt;p&gt;if(THSM_WirelessState_previous != THSM_WirelessState)&lt;br /&gt; {&lt;br /&gt; printf(&amp;quot;\n\r State : %d ..&amp;quot;,THSM_WirelessState); &lt;br /&gt; THSM_WirelessState_previous = THSM_WirelessState;&lt;br /&gt; }&lt;br /&gt; pres_state1 = otPlatRadioGetState(COMWIRELESS_ot_instance);&lt;br /&gt; if(prev_state1 != pres_state1)&lt;br /&gt; {&lt;br /&gt; printf(&amp;quot;\n Radio status: %d&amp;quot;, pres_state1);&lt;br /&gt; prev_state1 = pres_state1;&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;Note : Gap in the log represents the wakeup of device every 60s. guess this is helpful.&lt;/p&gt;
&lt;p&gt;Also it would be good if we have any example for managing the receive and sleep states of radio.&lt;/p&gt;
&lt;p&gt;And the enums remains the same&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Abhijtih&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Print-states-in-diffent-states.txt"&gt;devzone.nordicsemi.com/.../Print-states-in-diffent-states.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Open thread : Rx is always ON after communication is completed (Doesnt goes to sleep) - power consumption is high.</title><link>https://devzone.nordicsemi.com/thread/335260?ContentTypeID=1</link><pubDate>Thu, 21 Oct 2021 11:01:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c3b4eb84-006d-4a0e-a28c-347727738ce1</guid><dc:creator>Abhijith.Desai</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I tried to print the data to extract the master key,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;#ifdef DEBUG&lt;br /&gt; ConsolePrint(&amp;quot;Thread version : %s\n&amp;quot;, (uint32_t)otGetVersionString());&lt;br /&gt; ConsolePrint(&amp;quot;Network name : %s\n&amp;quot;, (uint32_t)otThreadGetNetworkName(COMWIRELESS_ot_instance));&lt;br /&gt; ConsolePrint(&amp;quot;Channel : %d\n&amp;quot;, otLinkGetChannel(COMWIRELESS_ot_instance));&lt;br /&gt; ConsolePrint(&amp;quot;PAN ID : 0x%04x\n&amp;quot;, otLinkGetPanId(COMWIRELESS_ot_instance));&lt;br /&gt; #endif&lt;br /&gt; const otExtAddress *pExtAddress = otLinkGetExtendedAddress(COMWIRELESS_ot_instance);&lt;br /&gt; #ifdef DEBUG&lt;br /&gt; ConsolePrint(&amp;quot;ExtendedAddress: &amp;quot;);&lt;br /&gt; for (uint8_t u8Counter = 0; u8Counter &amp;lt; OT_EXT_ADDRESS_SIZE; u8Counter++)&lt;br /&gt; {&lt;br /&gt; ConsolePrint(&amp;quot;%02x &amp;quot;, pExtAddress-&amp;gt;m8[u8Counter]);&lt;br /&gt; }&lt;br /&gt; ConsolePrint(&amp;quot;\n&amp;quot;);&lt;br /&gt; #endif&lt;br /&gt; const otMasterKey *pMasterKey = otThreadGetMasterKey(COMWIRELESS_ot_instance);&lt;br /&gt; #ifdef DEBUG&lt;br /&gt; ConsolePrint(&amp;quot;MasterKey : &amp;quot;);&lt;br /&gt; for (uint8_t u8Counter = 0; u8Counter &amp;lt; OT_MASTER_KEY_SIZE; u8Counter++)&lt;br /&gt; {&lt;br /&gt; ConsolePrint(&amp;quot;%02x &amp;quot;, pMasterKey-&amp;gt;m8[u8Counter]);&lt;br /&gt; }&lt;br /&gt; ConsolePrint(&amp;quot;\n&amp;quot;); &lt;br /&gt; #endif&lt;/p&gt;
&lt;p&gt;And i get this as the master key.. and the same key i am using in wireshark to decode it..&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt; OT_DEVICE_ROLE_CHILD&lt;br /&gt;Thread version : OPENTHREAD/20191113-00534-gc6a258e3; NRF52833; Apr 5 2020 21:43:42&lt;br /&gt;Network name : RDS110R_Thread&lt;br /&gt;Channel : 12&lt;br /&gt;PAN ID : 0x6329&lt;br /&gt;ExtendedAddress: 72 15 1f 60 49 d0 69 be &lt;br /&gt;MasterKey : ea 88 12 96 01 83 2e bc 05 dc 06 b6 8f e3 94 20 &lt;/p&gt;
&lt;p&gt;I guess you can add the same decryption key in your preferences -&amp;gt; IEEE&amp;nbsp;802.15.4 -&amp;gt; Decryption keys so that you can see the decoded data&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Open thread : Rx is always ON after communication is completed (Doesnt goes to sleep) - power consumption is high.</title><link>https://devzone.nordicsemi.com/thread/335206?ContentTypeID=1</link><pubDate>Thu, 21 Oct 2021 07:41:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5399d285-cc53-416d-9bb7-b5c7f2c80dec</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;It would be great if you are able to upload a sniffer log with decoded packets. In the debug log, it&amp;#39;s a bit hard to follow when only the states are being printed. Showing where the application goes in if() sets should be helpful as well.&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: Open thread : Rx is always ON after communication is completed (Doesnt goes to sleep) - power consumption is high.</title><link>https://devzone.nordicsemi.com/thread/335097?ContentTypeID=1</link><pubDate>Wed, 20 Oct 2021 12:27:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:577a9732-8259-4efc-a8f1-a6378fb7899a</guid><dc:creator>Abhijith.Desai</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Yes for sure we are not handling any sleep and receive states of radio manually right now. the THSM_IDLE and THSM_SLEEP states are just doing the application part and switching we are not trying to put radio to sleep since they say not required to put manually to sleep of invoke receive states of radio &lt;a href="https://github.com/openthread/openthread/issues/1495"&gt;https://github.com/openthread/openthread/issues/1495&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Please correct me if i am wrong in understanding&lt;/p&gt;
&lt;p&gt;Yes regarding the network key you are right we cannot add it once it is finished sniffing, will see the configuration part you suggested.&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;
&lt;p&gt;Abhijith&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Open thread : Rx is always ON after communication is completed (Doesnt goes to sleep) - power consumption is high.</title><link>https://devzone.nordicsemi.com/thread/334983?ContentTypeID=1</link><pubDate>Wed, 20 Oct 2021 06:12:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:158b9fbc-cce9-47c8-a33c-48798947a0ba</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Yes, I can see&lt;/p&gt;
&lt;p&gt;Have you followed section 3.1.1 in the &lt;a href="https://infocenter.nordicsemi.com/pdf/nRF_Sniffer_802154_User_Guide_v0.7.2.pdf"&gt;nRF Sniffer for 802.15.4 user guide&lt;/a&gt; to configure the decryption keys before starting to capture. This is something that must be done&amp;nbsp;&lt;strong&gt;before&amp;nbsp;&lt;/strong&gt; capturing data and won&amp;#39;t be &amp;quot;unlocked&amp;quot; by adding the correct key on a finished filter.&lt;/p&gt;
&lt;p&gt;Regarding the log and THSM sleep. Yes I can see that the debug log is putting the THSM to sleep, but it does not seem to set the radio into a sleeping state. I&amp;#39;m not able to see what exactly your THSM_sleep_e and THSM_idle_e events are doing from your code snippets. What functions are they calling that puts the nRF into sleep exactly?&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: Open thread : Rx is always ON after communication is completed (Doesnt goes to sleep) - power consumption is high.</title><link>https://devzone.nordicsemi.com/thread/334828?ContentTypeID=1</link><pubDate>Tue, 19 Oct 2021 11:04:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8cfcf099-2387-42ea-b46c-a1a8b7cae873</guid><dc:creator>Abhijith.Desai</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Yes i could see in the debugger window that THSM will go to sleep and then to idle(you can get that information from the debug log i shared).&lt;/p&gt;
&lt;p&gt;The state machine goes to sleep state but the radio state goes to sleep only once after pairing to network(that is what is my concern).&lt;/p&gt;
&lt;p&gt;SOrry for wrong information about&amp;nbsp;&lt;span&gt;OMWIRELESS_RadioSleep() we are calling it but the entire part inside that function is commented (after knowing that it is not required to manually switch the sleep and receive states of radio)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;ea88129601832ebc05dc06b68fe39420 or&amp;nbsp;4f42ca5cb60755cf61667e1a6beded7b or&amp;nbsp;47b314550ca8d0ef3f5842c038dd6b60 should be the key to open the sniffer data..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Open thread : Rx is always ON after communication is completed (Doesnt goes to sleep) - power consumption is high.</title><link>https://devzone.nordicsemi.com/thread/334822?ContentTypeID=1</link><pubDate>Tue, 19 Oct 2021 10:49:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c706d6a6-52d2-4fde-b7f4-026c845f41df</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The logging here seems a bit off to me, since the one and only time the Radio status reports back 1 (radio sleep) is after a PREPARE_WAKEUP call from the THSM? After that it seems like the state machine goes to sleep and wakes up numerous times without interfacing with the radio peripheral at all. During debugging, do you have any indication that the&amp;nbsp;&lt;strong&gt;THSM_SLEEP_e&lt;/strong&gt; event actually puts the radio to sleep? What does the COMWIRELESS_RadioSleep(); function do exactly, and are you sure that it is getting called?&lt;/p&gt;
&lt;p&gt;If you add some more prints (maybe inside the if settings, we should be able to see&amp;nbsp;&lt;strong&gt;where&amp;nbsp;&lt;/strong&gt;the application goes in each state. We&amp;#39;re not able to see much from the sniffer log unfortunately. Are you using another masterkey/IPv6 prefix than what is default? That would make Wireshark unable to decode the packets.&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: Open thread : Rx is always ON after communication is completed (Doesnt goes to sleep) - power consumption is high.</title><link>https://devzone.nordicsemi.com/thread/334787?ContentTypeID=1</link><pubDate>Tue, 19 Oct 2021 08:50:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ecfd3fb-e3d0-4c98-999e-8c2c16faa266</guid><dc:creator>Abhijith.Desai</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I tried to print the values over the debug terminal the things i can see right now is once the communication is completed it stays in radio receive state.Please find the logs and also the enums and also find the sniffer data for pairing and then trying&amp;nbsp;to communicate again &lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Sniff-power.pcapng"&gt;devzone.nordicsemi.com/.../Sniff-power.pcapng&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Print-states.txt"&gt;devzone.nordicsemi.com/.../Print-states.txt&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Open thread : Rx is always ON after communication is completed (Doesnt goes to sleep) - power consumption is high.</title><link>https://devzone.nordicsemi.com/thread/334646?ContentTypeID=1</link><pubDate>Mon, 18 Oct 2021 13:53:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:737ef8b7-3bef-446d-b55a-76816fc80d0c</guid><dc:creator>Abhijith.Desai</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Thanks for your reply on this.&lt;/p&gt;
&lt;p&gt;I have attached the RF state machine function haw we are handling it.. maybe ill be sharing the sniffer data soon&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/RF-State-machine.txt"&gt;devzone.nordicsemi.com/.../RF-State-machine.txt&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Open thread : Rx is always ON after communication is completed (Doesnt goes to sleep) - power consumption is high.</title><link>https://devzone.nordicsemi.com/thread/334342?ContentTypeID=1</link><pubDate>Fri, 15 Oct 2021 12:09:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8bb7f4f-afc8-455b-828e-df72f62ee198</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I&amp;#39;m sorry, but I&amp;#39;m not able to see what the issue is by just your description of the issue. I would think that the device is still expecting some data after the joining/pairing is completed perhaps.&lt;/p&gt;
&lt;p&gt;Can you share a snippet of your code, output of your debug log, and potentially a sniffer trace of what&amp;#39;s going on over the air so we can get a better look at what&amp;#39;s going on?&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>