<?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>HID example how to disable automatically  bound</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/89675/hid-example-how-to-disable-automatically-bound</link><description>Hi, 
 I&amp;#39;m using SDK17.02 HID example on nRF52810. 
 
 What can I do so that my device is not automatically bound when it connects with other new devices.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 14 Jul 2022 12:54:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/89675/hid-example-how-to-disable-automatically-bound" /><item><title>RE: HID example how to disable automatically  bound</title><link>https://devzone.nordicsemi.com/thread/376960?ContentTypeID=1</link><pubDate>Thu, 14 Jul 2022 12:54:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:563bc3ab-a896-4288-a8a3-e0392c7c8afc</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi again,&lt;/p&gt;
&lt;p&gt;If you have a look at the ble_hids_mouse example you can find&amp;nbsp; PM_EVT_CONN_SEC_SUCCEEDED event in&amp;nbsp;pm_evt_handler().&amp;nbsp;&lt;br /&gt;It&amp;#39;s when the link is encrypted.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;But note that by default if the link is not encrypted the CCCD will not be enabled and you won&amp;#39;t be able to send any notification.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID example how to disable automatically  bound</title><link>https://devzone.nordicsemi.com/thread/376897?ContentTypeID=1</link><pubDate>Thu, 14 Jul 2022 08:06:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:930fd55c-1fb3-412c-aec2-00bccc9a48e0</guid><dc:creator>Taylor</dc:creator><description>&lt;p&gt;Sorry for my description.&lt;/p&gt;
&lt;p&gt;I mean how could I&amp;nbsp; get the status of finishing&amp;nbsp;&lt;span&gt;pairing? After that I need to send HID data.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID example how to disable automatically  bound</title><link>https://devzone.nordicsemi.com/thread/376895?ContentTypeID=1</link><pubDate>Thu, 14 Jul 2022 08:02:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7080d2d4-5ff7-496c-82d0-b2cc48c5f307</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Taylor,&amp;nbsp;&lt;br /&gt;By default the HID service requires encryption. So you don&amp;#39;t need to do anything.&amp;nbsp;&lt;br /&gt;For example you can find in the HIDs example in the SDK: Just work pairing is required:&amp;nbsp;&lt;br /&gt;&lt;img style="max-height:768px;max-width:688px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/1376x1536/__key/communityserver-discussions-components-files/4/pastedimage1657785772171v1.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID example how to disable automatically  bound</title><link>https://devzone.nordicsemi.com/thread/376883?ContentTypeID=1</link><pubDate>Thu, 14 Jul 2022 06:50:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:557e469f-ad7c-4e05-87ce-db2290d3c95f</guid><dc:creator>Taylor</dc:creator><description>&lt;p&gt;Hung Bui, thanks for your reply.&lt;/p&gt;
[quote userid="2121" url="~/f/nordic-q-a/89675/hid-example-how-to-disable-automatically-bound/376757"]If you disconnect and stop advertising it shouldn&amp;#39;t be reconnected.&amp;nbsp;[/quote]
&lt;p&gt;I used wrong handle in&amp;nbsp;sd_ble_gap_adv_stop(uint8_t adv_handle), I have solved it now.&lt;/p&gt;
&lt;p&gt;I have public a problem about NRF_ERROR_FORBIDDEN when using HID, and Nordic replied to me&lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;span&gt;You have to ensure that you go through pairing before you try to send anything over the link, since the HID service requires encryption to be enabled.&amp;nbsp;&lt;/span&gt;&amp;quot;&lt;/p&gt;
&lt;p&gt;Actually, I solved it with a wrong way, and I closed this ticket -_-.So what should I do to make sure&amp;nbsp;&lt;span&gt;HID service paring and requiring encryption&amp;nbsp;have done?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID example how to disable automatically  bound</title><link>https://devzone.nordicsemi.com/thread/376757?ContentTypeID=1</link><pubDate>Wed, 13 Jul 2022 11:11:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4fea873-fe5a-4de0-bc53-dd450dbbef8a</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Taylor,&amp;nbsp;&lt;br /&gt;If you disconnect and stop advertising it shouldn&amp;#39;t be reconnected.&amp;nbsp;&lt;br /&gt;There are 2 things you need to check:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;- Check if you actually disconnect after you call&amp;nbsp;&lt;span&gt;sd_ble_gap_disconnect&amp;nbsp;(). You can check if you receive&amp;nbsp;BLE_GAP_EVT_DISCONNECTED event. You can also verify using a&lt;a href="https://www.nordicsemi.com/Products/Development-tools/nRF-Sniffer-for-Bluetooth-LE"&gt; sniffer&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;- Check if the code automatically start advertising after disconnected. In most of our code we will start advertising after we disconnect. Please make sure you remove such code. If you use ble_advertising module, you need to set&amp;nbsp;ble_adv_on_disconnect_disabled=true using&amp;nbsp;ble_advertising_modes_config_set() call.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID example how to disable automatically  bound</title><link>https://devzone.nordicsemi.com/thread/376738?ContentTypeID=1</link><pubDate>Wed, 13 Jul 2022 09:22:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7fde0070-78dc-4f1c-9617-a5e037d2dfe5</guid><dc:creator>Taylor</dc:creator><description>&lt;p&gt;Hi Hung Bui,&lt;/p&gt;
&lt;p&gt;There is a new question.&lt;/p&gt;
&lt;p&gt;I have enabled&amp;nbsp;&lt;span&gt;automatically request bonding. When I want to&amp;nbsp; automatically disconnect with a phone,&amp;nbsp; my device will&amp;nbsp;automatically connecting again. For example the&amp;nbsp; battery on low power.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I have tried using&amp;nbsp;sd_ble_gap_disconnect and stopping advertising immediately, it doesn&amp;#39;t work.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;BTW, I could not delete bonding information because my device need to connect&amp;nbsp;automatically when I start advertising again.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: HID example how to disable automatically  bound</title><link>https://devzone.nordicsemi.com/thread/375762?ContentTypeID=1</link><pubDate>Wed, 06 Jul 2022 11:45:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1d59427-91e8-4f3a-aa94-953e4aacd964</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Taylor,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;By default when a phone connect to a HID device it will automatically request bonding. It&amp;#39;s the default behavior because HID device is usually a keyboard or mouse so the link should be encrypted.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You can reject the pairing request from the phone if the device doesn&amp;#39;t want to bond at the moment.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;You can have a look at this post:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/67920/option-to-disable-peer-manager"&gt;Option to disable Peer Manager&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note that you can block connection from unwanted device by using whitelisting. This way you don&amp;#39;t need to modify the peer manager.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>