<?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>Ask about time out of advertising duration of slow advertising</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/92523/ask-about-time-out-of-advertising-duration-of-slow-advertising</link><description>Hi Nordic support team 
 - I am using &amp;quot;nRF5_SDK_17.0.2_d674dde&amp;quot; - Refer to &amp;quot;ble_app_hids_keyboard&amp;quot; example. 
 I want to ask about slow advertising time out. I want assign 30 minutes for slow advertising. 
 Todo that I define: 
 #define APP_ADV_SLOW_DURATION</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 07 Oct 2022 02:54:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/92523/ask-about-time-out-of-advertising-duration-of-slow-advertising" /><item><title>RE: Ask about time out of advertising duration of slow advertising</title><link>https://devzone.nordicsemi.com/thread/389736?ContentTypeID=1</link><pubDate>Fri, 07 Oct 2022 02:54:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2966b200-091d-46b5-8273-177a208a33c6</guid><dc:creator>Quangca</dc:creator><description>&lt;p&gt;Hello Edvin, &lt;br /&gt;Thank you, i will try to do this with your suggestion to test running and it&amp;#39;s reliability.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ask about time out of advertising duration of slow advertising</title><link>https://devzone.nordicsemi.com/thread/389617?ContentTypeID=1</link><pubDate>Thu, 06 Oct 2022 12:16:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1dbaab39-eeac-44bf-892a-889be8b811b3</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Sorry. I read the first post a bit fast. I thought it said it was only an uint16_t.&lt;/p&gt;
&lt;p&gt;I see now. I think the reason you are seeing max&amp;nbsp;&lt;span&gt;65535 units is that&amp;nbsp;APP_ADV_SLOW_DURATION which is passed into ble_advertising_init() takes a&amp;nbsp;ble_advertising_t as an input parameter.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The parameter that holds the timeout here is the&amp;nbsp;ble_advertising_t -&amp;gt;&amp;nbsp;ble_gap_adv_params_t -&amp;gt;&amp;nbsp;duration, which is an uint16_t, which is why you see the capping of (max)uint16_t = 65535.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;You can try to change this to an uint32_t, but I have not tested, and I don&amp;#39;t know if there are any other limitations, or even a limit in the softdevice saying it can be maximum 65535 units.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Edvin&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ask about time out of advertising duration of slow advertising</title><link>https://devzone.nordicsemi.com/thread/389504?ContentTypeID=1</link><pubDate>Thu, 06 Oct 2022 03:43:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:69029dc2-bb02-419c-9d9e-5343dea23753</guid><dc:creator>Quangca</dc:creator><description>&lt;p&gt;hello Edvin,&lt;/p&gt;
&lt;p&gt;But i see that it is defined by&amp;nbsp;&lt;span&gt;ble_adv_slow_timeout&lt;/span&gt;&amp;nbsp; uint32_t not&lt;span&gt;&amp;nbsp;uint16_t Edvin.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I also think about 2 solution you suggest.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ask about time out of advertising duration of slow advertising</title><link>https://devzone.nordicsemi.com/thread/388939?ContentTypeID=1</link><pubDate>Mon, 03 Oct 2022 09:56:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e3bbcc5c-c42c-44cb-b950-4d58db870c65</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Since the timeout value is only a uint16_t, you can&amp;#39;t set 30 minutes of timeout directly. I have two suggestions:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;1: Set the timeout to 0 (basically meaning advertise forever). Then you can set an app_timer to expire after 30 minutes. Use the interrupt from this timer to stop the advertising manually using sd_ble_gap_adv_stop().&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2: You can set the timeout to 10 minutes, but you can use the application logic to restart the advertising for another 10 minutes two times, giving you a total of 30 minutes. This will not be noticeable from the scanners. This is probably the easiest option.&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></channel></rss>