<?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>Change of channel mask between advertised events</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80566/change-of-channel-mask-between-advertised-events</link><description>Hi 
 I succeeded in changing the channel mask in the advertize_init function, but I could not change it in the middle of the function. 
 For example, I want to change the channel mask when a flag is raised, but I get an error. Do I need to stop the advertisement</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 13 Oct 2021 08:55:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80566/change-of-channel-mask-between-advertised-events" /><item><title>RE: Change of channel mask between advertised events</title><link>https://devzone.nordicsemi.com/thread/333861?ContentTypeID=1</link><pubDate>Wed, 13 Oct 2021 08:55:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ffd00223-e00f-4b69-a8c8-4bd163bcd9a3</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Thanks for the update. Not sure if this is what happened here, but please note that Softdevice APIs such as sd_ble_gap_adv_stop() can only be called from an interrupt contexts with priority lower than &amp;#39;4&amp;#39; (i.e. function can be called from priority 5, 6, or 7)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change of channel mask between advertised events</title><link>https://devzone.nordicsemi.com/thread/333854?ContentTypeID=1</link><pubDate>Wed, 13 Oct 2021 08:39:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:26935353-4773-4548-ba8f-2c4334d4b212</guid><dc:creator>noboru</dc:creator><description>&lt;p&gt;Sorry ... I was able to solve it myself!&lt;br /&gt;It didn&amp;#39;t work in other functions such as events, but by running it in the main function, I was able to get the desired behavior.&lt;br /&gt;Thank you very much.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Change of channel mask between advertised events</title><link>https://devzone.nordicsemi.com/thread/333700?ContentTypeID=1</link><pubDate>Tue, 12 Oct 2021 10:47:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88524fd4-80c6-45d4-a14b-7efa96c0a707</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It&amp;#39;s not possible to change advertising paramaters such as the channel mask while advertising, so you need to stop advertising, then re-initialize it with the new parameters before you start it again. What&amp;#39;s the error you get you call&amp;nbsp;sd_ble_gap_adv_stop()?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>