<?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>Using a one shot timer to stop BT scan after a while caused a kernel panic</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/113243/using-a-one-shot-timer-to-stop-bt-scan-after-a-while-caused-a-kernel-panic</link><description>Hi, 
 I&amp;#39;m using the Bluetooth sample called Central HIDS and want to develop a feature that stops BT scanning after a few minutes. 
 However, during development, I encountered that when BT started scanning, the one shot timer entered the expiration function</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 26 Jul 2024 03:12:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/113243/using-a-one-shot-timer-to-stop-bt-scan-after-a-while-caused-a-kernel-panic" /><item><title>RE: Using a one shot timer to stop BT scan after a while caused a kernel panic</title><link>https://devzone.nordicsemi.com/thread/495722?ContentTypeID=1</link><pubDate>Fri, 26 Jul 2024 03:12:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:546b2909-0464-486b-94a3-5c8d388ce002</guid><dc:creator>Kevin Lin</dc:creator><description>&lt;p&gt;Hi Jared,&lt;/p&gt;
&lt;p&gt;T&lt;span&gt;hank you for your prompt reply.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;ll try your suggestion and see what the results are, thanks.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Kevin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using a one shot timer to stop BT scan after a while caused a kernel panic</title><link>https://devzone.nordicsemi.com/thread/494779?ContentTypeID=1</link><pubDate>Fri, 19 Jul 2024 11:40:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48fec0ba-326a-4999-bfb2-c1cc78db8b53</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;bt_scan_stop() can not be called from interrupt context (callback handler), instead move it to either a &lt;a href="https://docs.zephyrproject.org/latest/kernel/services/threads/workqueue.html"&gt;work queue&lt;/a&gt;, or call it from main context.&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>