<?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>Set new channel map</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/61624/set-new-channel-map</link><description>Hi everyone! 
 Could anyone clarify a few questions regarding channel mapping? 
 1. Is that true if I want to use specific BLE channels I need to do it just once on a central device? 2. Is that true once channel map is set it will be used for all next</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 15 Jun 2022 09:27:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/61624/set-new-channel-map" /><item><title>RE: Set new channel map</title><link>https://devzone.nordicsemi.com/thread/372517?ContentTypeID=1</link><pubDate>Wed, 15 Jun 2022 09:27:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aa43a5bd-f2a4-494c-b489-6777f737bf1a</guid><dc:creator>EthanJia</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;Thanks! I got it. Appreciate it a lot.&lt;/p&gt;
&lt;p&gt;Best regards :-)&lt;/p&gt;
&lt;p&gt;Ethan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Set new channel map</title><link>https://devzone.nordicsemi.com/thread/372499?ContentTypeID=1</link><pubDate>Wed, 15 Jun 2022 08:13:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:802db4ad-2183-42b0-bd73-a46f02714066</guid><dc:creator>Sigurd</dc:creator><description>[quote user="EthanJia"] but there are no default channel monitoring methods running in the background?[/quote]
&lt;p&gt;Correct.&amp;nbsp;&lt;/p&gt;
[quote user="EthanJia"]We should integrate the monitoring function into those examples/templates by ourselves. Is that correct?[/quote]
&lt;p&gt;Typically it&amp;#39;s the BLE central that implements this. If you are creating a BLE central, then you might want to use the&amp;nbsp;Quality of Service feature to set new channel maps.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Set new channel map</title><link>https://devzone.nordicsemi.com/thread/372437?ContentTypeID=1</link><pubDate>Tue, 14 Jun 2022 16:19:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8761ece-45ce-4bde-8cd8-35e24bf5476a</guid><dc:creator>EthanJia</dc:creator><description>&lt;p&gt;Hi there!&lt;/p&gt;
[quote userid="15146" url="~/f/nordic-q-a/61624/set-new-channel-map/251959#251959"]This channel map means that all data channels can be used. It will do&amp;nbsp;frequency hopping, but it will by-default not be adaptive. To be adaptive, you would need to periodically update the channel map based on&amp;nbsp;&lt;span&gt;the measurements of the energy levels on the Bluetooth Low Energy channels. The&amp;nbsp;&lt;/span&gt;Quality of service feature for channel monitoring in the SoftDevice can be used for this. See &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.0.1/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html#gaebe458be0d54576a131db1c9b2d8ff8b"&gt;this link&lt;/a&gt;&amp;nbsp;, you might find &lt;a href="https://github.com/jimmywong2003/nrf52-central-channel-map-update-with-survey"&gt;this repo&lt;/a&gt;&amp;nbsp;useful.[/quote]
&lt;p&gt;So, according to this, can I understand it in this way, that SoftDevice itself only implements the frequency hopping function, but there are no default channel monitoring methods running in the background? &lt;/p&gt;
&lt;p&gt;Further speaking, all of the examples/templates in nRF5 SDK and SoftDevice do not perform channel monitoring. We should integrate the monitoring function into those examples/templates by ourselves. Is that correct?&lt;/p&gt;
&lt;p&gt;Really appreciate it if this could be helped ASAP.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards :-)&lt;/p&gt;
&lt;p&gt;Ethan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Set new channel map</title><link>https://devzone.nordicsemi.com/thread/253156?ContentTypeID=1</link><pubDate>Thu, 04 Jun 2020 05:59:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c26d6e28-24ff-45be-9e00-1a2ffb6ef6dd</guid><dc:creator>dmitry_t</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;Thank you for the clarification.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m currently working on more priority task, so I&amp;#39;ll back to this and check channel map settings later on.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Dmitry.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Set new channel map</title><link>https://devzone.nordicsemi.com/thread/251959?ContentTypeID=1</link><pubDate>Wed, 27 May 2020 12:50:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3296357-c94b-435e-bfd0-eb2e57d8cd46</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user=""]1. Is that true if I want to use specific BLE channels I need to do it just once on a central device?[/quote]
&lt;p&gt;Yes, from the documentation &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s140.api.v7.0.1%2Fstructble__gap__opt__ch__map__t.html"&gt;here&lt;/a&gt;, we have that &amp;quot;&lt;span&gt;When setting the channel map, it applies to all current and future connections&amp;quot;.&lt;/span&gt;&lt;/p&gt;
[quote user=""]2. Is that true once channel map is set it will be used for all next connections until it&amp;#39;s changed again?[/quote]
&lt;p&gt;&amp;nbsp;Yes, see 1.&lt;/p&gt;
[quote user=""]3. Is that true it&amp;#39;s not necessary to set channel map only when connection event happens? I can do it, say, when I initialize central device, because connection handler is only applicable for sd_ble_opt_get().[/quote]
&lt;p&gt;&amp;nbsp;Correct. You can set it as part of the initialization for the&amp;nbsp;central device.&lt;/p&gt;
[quote user=""]4. Is that true default values of channel map 0xff,0xff,0xff,0xff,0x1f mean that adaptive frequency hopping is used?[/quote]
&lt;p&gt;&amp;nbsp;This channel map means that all data channels can be used. It will do&amp;nbsp;frequency hopping, but it will by-default not be adaptive. To be adaptive, you would need to periodically update the channel map based on&amp;nbsp;&lt;span&gt;the measurements of the energy levels on the Bluetooth Low Energy channels. The&amp;nbsp;&lt;/span&gt;Quality of service feature for channel monitoring in the SoftDevice can be used for this. See &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s140.api.v7.0.1/group___b_l_e___g_a_p___f_u_n_c_t_i_o_n_s.html#gaebe458be0d54576a131db1c9b2d8ff8b"&gt;this link&lt;/a&gt;&amp;nbsp;, you might find &lt;a href="https://github.com/jimmywong2003/nrf52-central-channel-map-update-with-survey"&gt;this repo&lt;/a&gt;&amp;nbsp;useful.&lt;/p&gt;
[quote user=""]5. Is that true if I set, say, following map 0x00,0xff,0xff,0xff,0x1f this means channels from 0 to 7 will be used for connection [/quote]
&lt;p&gt;Since you set ch_map[0] = 0x00; and ch_map[1] = 0xfe;, it will be 0 to 8. And based on my testing, it will be the other way around, 0 to 8 will not be used. Advertising channels are not used.&lt;/p&gt;
[quote user=""]6. When does a central device provide information about channel map to a peripheral device? My understanding is it happens on connection?[/quote]
&lt;p&gt;Based on my testing, I see that the SoftDevice will shortly after the connection is established send a&amp;nbsp;LL_CHANNEL_MAP_REQ packet with the updated channel map to the peripheral device.&lt;/p&gt;
[quote user=""]When I read channel map upon connection by using sd_ble_opt_get() I always get default values 0xff,0xff,0xff,0xff,0x1f.[/quote]
&lt;p&gt;&amp;nbsp;When I use the code you attached, and read the channel map some time after the BLE_GAP_EVT_CONNECTED I get this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;info&amp;gt; app: err_code = 0, map 0,FE,FF,FF,1F&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Try reading it after 1-2 seconds, and see if you get the expected result. If you have very long connection intervals, you might need to wait more than 1-2 seconds. If it does not work, I recommend using nRF Sniffer to analyze what is happening on-air. See &lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Sniffer-for-Bluetooth-LE"&gt;this&lt;/a&gt; and &lt;a href="https://infocenter.nordicsemi.com/topic/ug_sniffer_ble/UG/sniffer_ble/intro.html"&gt;this&lt;/a&gt; link.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>