<?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>&amp;quot;sd_ble_opt_get&amp;quot; channel map response &amp;quot;BLE_ERROR_INVALID_CONN_HANDLE&amp;quot;</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13956/sd_ble_opt_get-channel-map-response-ble_error_invalid_conn_handle</link><description>Hi, 
 I am working on the heart_rate_collector example code of nrf51-ble-driver_linux_0.5.0.
When I use &amp;quot;sd_ble_opt_set&amp;quot; to set channel map as below, the API will retrun NRF_SUCCESS 
 ble_opt_t new_opt_config;
 memset(&amp;amp;new_opt_config, 0, sizeof(new_opt_config</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 23 May 2016 05:31:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13956/sd_ble_opt_get-channel-map-response-ble_error_invalid_conn_handle" /><item><title>RE: "sd_ble_opt_get" channel map response "BLE_ERROR_INVALID_CONN_HANDLE"</title><link>https://devzone.nordicsemi.com/thread/53309?ContentTypeID=1</link><pubDate>Mon, 23 May 2016 05:31:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:659059b7-8238-4fbd-9489-4bdda6820444</guid><dc:creator>Ryan Huang</dc:creator><description>&lt;p&gt;Yes,  the value of p_ble_evt-&amp;gt;evt.gap_evt.conn_handle is (0000).
Do I miss some parameters or settings for the API function?
Could you please show me an example to use the API function?
Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "sd_ble_opt_get" channel map response "BLE_ERROR_INVALID_CONN_HANDLE"</title><link>https://devzone.nordicsemi.com/thread/53308?ContentTypeID=1</link><pubDate>Fri, 20 May 2016 12:16:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d1f3c29-c59d-452d-9aac-91da4200c0a8</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;Is that (0000) the value of p_ble_evt-&amp;gt;evt.gap_evt.conn_handle; as well?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "sd_ble_opt_get" channel map response "BLE_ERROR_INVALID_CONN_HANDLE"</title><link>https://devzone.nordicsemi.com/thread/53306?ContentTypeID=1</link><pubDate>Fri, 20 May 2016 08:01:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:409f755f-2445-4cd4-909f-9cd0545a07c5</guid><dc:creator>Ryan Huang</dc:creator><description>&lt;p&gt;I add some debug message as below&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ble_opt_t opt;
  	memset(&amp;amp;opt, 0, sizeof(opt));
	printf(&amp;quot;p_gap_evt-&amp;gt;conn_handle =%04X\n&amp;quot;,p_gap_evt-&amp;gt;conn_handle);
  	opt.gap_opt.ch_map.conn_handle = p_gap_evt-&amp;gt;conn_handle;
	printf(&amp;quot;opt.gap_opt.ch_map.conn_handle =%04X\n&amp;quot;,opt.gap_opt.ch_map.conn_handle);
  	uint32_t error_code = sd_ble_opt_get(BLE_GAP_OPT_CH_MAP, &amp;amp;opt);
  	printf(&amp;quot;error_code =%x, ChMap %02X %02X %02X %02X %02X\r\n&amp;quot;,error_code,
    		opt.gap_opt.ch_map.ch_map[0], opt.gap_opt.ch_map.ch_map[1],
                     opt.gap_opt.ch_map.ch_map[2],
    		opt.gap_opt.ch_map.ch_map[3], opt.gap_opt.ch_map.ch_map[4]);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The result as below&lt;/p&gt;
&lt;p&gt;p_gap_evt-&amp;gt;conn_handle =0000&lt;/p&gt;
&lt;p&gt;opt.gap_opt.ch_map.conn_handle =0000&lt;/p&gt;
&lt;p&gt;Error: File: (null), Line: 0, Error code: 7&lt;/p&gt;
&lt;p&gt;error_code =3002, ChMap 00 00 00 00 00&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "sd_ble_opt_get" channel map response "BLE_ERROR_INVALID_CONN_HANDLE"</title><link>https://devzone.nordicsemi.com/thread/53305?ContentTypeID=1</link><pubDate>Fri, 20 May 2016 07:25:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:55634dbe-c7a9-49f0-bdf6-6864a2c4ef9c</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;Yes, I saw that from your code snippet. I just wanted to know if you checked what the actual value is when passing it to sd_ble_opt_get . You should only get the BLE_ERROR_INVALID_CONN_HANDLE if this handle is incorrect.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "sd_ble_opt_get" channel map response "BLE_ERROR_INVALID_CONN_HANDLE"</title><link>https://devzone.nordicsemi.com/thread/53304?ContentTypeID=1</link><pubDate>Fri, 20 May 2016 06:59:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1b391736-bc93-4a14-b56b-017e47da1821</guid><dc:creator>Ryan Huang</dc:creator><description>&lt;p&gt;I pass &amp;quot;p_ble_evt-&amp;gt;evt.gap_evt.conn_handle&amp;quot; that come from the application&amp;#39;s BLE Stack events to opt.gap_opt.ch_map.conn_handle .&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: "sd_ble_opt_get" channel map response "BLE_ERROR_INVALID_CONN_HANDLE"</title><link>https://devzone.nordicsemi.com/thread/53307?ContentTypeID=1</link><pubDate>Fri, 20 May 2016 06:26:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b9c3009-8e28-4b38-9986-004220a362c6</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;What is the value of opt.gap_opt.ch_map.conn_handle that you pass to sd_ble_opt_get?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>