<?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>Periodic Send function in mesh</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/99614/periodic-send-function-in-mesh</link><description>Hey, 
 
 I am developing a sensor on a LPN and through a friend node to a database. Now I want to send the sensor data every 5 minutes. 
 
 I was wondering if there is a function where I can just set it to 5 minutes and the function sends data every 5</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 11 May 2023 13:19:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/99614/periodic-send-function-in-mesh" /><item><title>RE: Periodic Send function in mesh</title><link>https://devzone.nordicsemi.com/thread/425122?ContentTypeID=1</link><pubDate>Thu, 11 May 2023 13:19:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c78ea181-e1fa-4ce6-9fff-9d8353b85414</guid><dc:creator>Chriis</dc:creator><description>&lt;p&gt;Yeah, Sorry it is a bit vague. I realise now.&lt;br /&gt;&lt;br /&gt;But I want to send a message (Sensor data) over BT mesh every 5 minutes. So with the timer you mentioned may be perfect.&lt;/p&gt;
&lt;p&gt;I will look into that.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Periodic Send function in mesh</title><link>https://devzone.nordicsemi.com/thread/425107?ContentTypeID=1</link><pubDate>Thu, 11 May 2023 12:43:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0bcb7304-d0ea-41d9-afb7-5172e53f28a6</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]&lt;p&gt;That is perfect but not periodic, it is a RTT function.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;I am not sure what you mean by this.&amp;nbsp;&lt;/p&gt;
[quote user="Chriis"]I have seen the the Node_setup.c file, and I understood that you can hardcode it that way.[/quote]
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Hardcode what? I don&amp;#39;t follow.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;However, it seems like what you are looking for is something like the app_timer, where you can set a repeated timer to time out every 5 minutes, and from that timeout handler, you would just call sensor_status_publish() or whatever you want to do. Is that correct?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If so, please see e.g. the example found in SDK (normal)\examples\ble_peripheral_ble_app_hrs. This uses the app timer to periodically simulate and send the battery status to the central.&lt;/p&gt;
&lt;p&gt;So try to add the app_timer to your application and set up a timer with a 5 min timeout.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It is a bit of work to add the app_timer, as it has a lot of dependencies. Look at the .c files that the ble_app_hrs examples includes, and what app_timer related .h files it includes in main.c. If there is a function it can&amp;#39;t find when you try to import it to your application, please search for it in the ble_app_hrs example, and include that .c/.h file in your project. Also check the preprocessor definitions in ble_app_hrs, as I remember that there is something app_timer related there as well. I believe it is the preprocessor definitions:&lt;/p&gt;
&lt;p&gt;APP_TIMER_V2&lt;br /&gt;APP_TIMER_V2_RTC1_ENABLED&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;That you need to include in your project as well as the .c files, .h files and sdk_config.h configurations that are needed for the app_timer to run.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Periodic Send function in mesh</title><link>https://devzone.nordicsemi.com/thread/425034?ContentTypeID=1</link><pubDate>Thu, 11 May 2023 08:12:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:526e9a58-d960-4b61-8ba3-4bfd35576419</guid><dc:creator>Chriis</dc:creator><description>&lt;p&gt;I have seen the the Node_setup.c file, and I understood that you can hardcode it that way. But this is not included in the sensor server example. Is there a way to edit it in this example.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>