<?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>Is it possible in a HID mode disable bonding to HID?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45827/is-it-possible-in-a-hid-mode-disable-bonding-to-hid</link><description>Hi! 
 SDK15, s132, SD6.0.0, nRF52832 
 I have nRF52832 in central mode and some bonded HID devices and another nRF52832 peripherial devices. 
 Now in the my central nRF52832 I start advertise with HID services. If any smartphon wants to bond with my device</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Apr 2019 14:54:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45827/is-it-possible-in-a-hid-mode-disable-bonding-to-hid" /><item><title>RE: Is it possible in a HID mode disable bonding to HID?</title><link>https://devzone.nordicsemi.com/thread/183185?ContentTypeID=1</link><pubDate>Tue, 23 Apr 2019 14:54:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ecf1fde6-67e4-4a92-88ea-5f20e07aa2a4</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;You may need to look at the HID mouse example that show bonding and whitelist, but the general idea is that you will now need to handle the&amp;nbsp;BLE_ADV_EVT_WHITELIST_REQUEST event in&amp;nbsp;on_adv_evt() to reply with the&amp;nbsp;ble_advertising_whitelist_reply().&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible in a HID mode disable bonding to HID?</title><link>https://devzone.nordicsemi.com/thread/181694?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2019 15:51:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1dde233c-cd0c-4728-8d2c-58320e56fbcf</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;I try to use&amp;nbsp;ble_app_bms project.&lt;/p&gt;
&lt;p&gt;In func&amp;nbsp;static void advertising_init(void) I configure whitelist for works.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;init.config.ble_adv_whitelist_enabled = false;&lt;/p&gt;
&lt;p&gt;also I configure flags with&amp;nbsp;BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE&lt;/p&gt;
&lt;p&gt;But if I try to comment slow advertise- project fall.&lt;/p&gt;
&lt;p&gt;What should correct for works with whitelist and one advertise settings? Slow, for example.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void advertising_init(void)
{
    ret_code_t     err_code;
    ble_advertising_init_t init;

    memset(&amp;amp;init, 0, sizeof(init));

    init.advdata.name_type                = BLE_ADVDATA_FULL_NAME;
    init.advdata.include_appearance       = true;
    init.advdata.flags                    = BLE_GAP_ADV_FLAGS_LE_ONLY_LIMITED_DISC_MODE;
    
    init.advdata.uuids_complete.uuid_cnt  = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
    init.advdata.uuids_complete.p_uuids   = m_adv_uuids;

    init.config.ble_adv_whitelist_enabled = true; // false
    init.config.ble_adv_fast_enabled      = true;
    init.config.ble_adv_fast_interval     = APP_ADV_FAST_INTERVAL;
////    init.config.ble_adv_fast_timeout      = APP_ADV_DURATION;
////    init.config.ble_adv_slow_enabled      = false;

    init.evt_handler   = on_adv_evt;
    init.error_handler = ble_advertising_error_handler;

    err_code = ble_advertising_init(&amp;amp;m_advertising, &amp;amp;init);
    APP_ERROR_CHECK(err_code);

    ble_advertising_conn_cfg_tag_set(&amp;amp;m_advertising, APP_BLE_CONN_CFG_TAG);
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible in a HID mode disable bonding to HID?</title><link>https://devzone.nordicsemi.com/thread/181529?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2019 10:20:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:609d3d51-c6c2-4622-ba7f-b903774f8fd3</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;If you need to customize for such specific use case, I think you&amp;nbsp;need to modify the peer manager code on your need. The bonding process start with SEC_PARAMS_REQUEST event and you can call sd_ble_gap_sec_params_reply() with PAIRING_NOT_SUP. Please have a look &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.1.0/group___b_l_e___g_a_p___p_e_r_i_p_h___b_o_n_d_i_n_g___j_w___m_s_c.html?cp=2_3_1_1_0_2_1_3_10_7_0"&gt;here&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Note that an already bonded device when reconnecting and re-encryp the link, there will be no SEC_PARAMS_REQUEST event, but a SEC_INFO_REQUEST event. Please have a look &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v6.1.0/group___b_l_e___g_a_p___p_e_r_i_p_h___e_n_c___m_s_c.html?cp=2_3_1_1_0_2_1_3_10_5"&gt;here&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible in a HID mode disable bonding to HID?</title><link>https://devzone.nordicsemi.com/thread/181291?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2019 11:07:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ae6c1a6-a591-4285-96f0-1bce726b4117</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;Yes, I mean just allow connect, but without bonding. If I set&amp;nbsp;&lt;span&gt;pm_sec_params_set() with p_sec_param = NULL, I can&amp;#39;t connect to already bonded devices with central. As you remember, I use central with whitelist and advertise with HID service and with nus services. When&amp;nbsp;pm_sec_params_set() with p_sec_param = NULL I also need possibility connect to previous bonded devices with central.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible in a HID mode disable bonding to HID?</title><link>https://devzone.nordicsemi.com/thread/181287?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2019 10:58:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9d520a6e-b7f0-41e0-a279-92e0aec0516b</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;You mean, to allow connection but not allowing bonding ?&amp;nbsp;&lt;br /&gt;If that&amp;#39;s the case you would need to call&amp;nbsp;pm_sec_params_set() with p_sec_param = NULL to reject pairing.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible in a HID mode disable bonding to HID?</title><link>https://devzone.nordicsemi.com/thread/181273?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2019 09:34:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af57b3e0-4f60-4c31-9323-51e1e840213c</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;Ok, but I need possibility connect my advertise device to not bonded devices. Is there another method to forbid bonding with HID? May be&amp;nbsp;worth considering&amp;nbsp;&lt;span&gt;peer_manager_init() with bond settings?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible in a HID mode disable bonding to HID?</title><link>https://devzone.nordicsemi.com/thread/181246?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2019 08:11:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46e050fb-75ea-481b-a732-111d1c570db1</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Please have a look in our HID examples, for example the ble_app_hids_mouse. After disconnect it will do directed advertising and after that it will do advertising with whitelist.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible in a HID mode disable bonding to HID?</title><link>https://devzone.nordicsemi.com/thread/181133?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2019 15:24:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a8774b5-d5e9-41eb-93ef-7d58514da166</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;Oh!&lt;/p&gt;
&lt;p&gt;Ok, should I activate second WL for advertising?&lt;/p&gt;
&lt;p&gt;In wich example can I see how to use it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible in a HID mode disable bonding to HID?</title><link>https://devzone.nordicsemi.com/thread/181132?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2019 15:22:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9932e914-6191-4641-902c-70667dd5d6c5</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;There are 2 different whitelists here, one for scanning and one when advertising. They are not related.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;One has the list of peripheral you bonded to (when scanning) and one should have the list of the phone you connected to.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible in a HID mode disable bonding to HID?</title><link>https://devzone.nordicsemi.com/thread/181131?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2019 15:19:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0b13198e-a595-49e1-bb3e-aa9d2a5e5631</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;I understand how whitelist works. When I have bonded devices, I restart nRF and activate whitelist. At this case I scan only for whitelist devices. But if I also with scan from whitelist start advertise with hid service, possible to bond any smartphone.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It is true. But may be due to I use whitelist only for central side? And should use also for peripherial? But I think that whitelist common for central and peripherial.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible in a HID mode disable bonding to HID?</title><link>https://devzone.nordicsemi.com/thread/181128?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2019 15:14:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2888f3b-7b6b-4508-b1ee-4970dfd354c6</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;I am not sure you understand how whitelisting work.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;When you apply whitelisting, any other phone that is not in the list will &lt;strong&gt;not be able to connect to your device&lt;/strong&gt;. So there is no way they can bond or pair, regardless what service you have on your device. HID is just a normal service.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please double check if whitelist is really enabled. Please test with mouse/keyboard example in the SDK.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible in a HID mode disable bonding to HID?</title><link>https://devzone.nordicsemi.com/thread/181044?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2019 12:20:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e888146e-4d28-4e80-8f89-25c073b00fed</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;Yes, I understand about whitelist. But I think that this is not that case. I already use whitelist. When I try to bond- whitelist disable for receive all devices around. When I work in normal mode and don&amp;#39;t need any bond, I use enable whitelist. And connected only to previously bonded devices. But !!!! if works in this mode, if device advertise with hid service, possible to connect with another smartphone and bond with passkey.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible in a HID mode disable bonding to HID?</title><link>https://devzone.nordicsemi.com/thread/181029?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2019 11:54:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1beaec1-66ae-4ffb-9752-59f9a79d22c1</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;To find more about whitelisting, you can have a look at the ble_app_hids_mouse example. Have a look at the documentation &lt;a href="https://www.nordicsemi.com/DocLib/Content/SDK_Doc/nRF5_SDK/v15-3-0/lib_ble_advertising"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can call&amp;nbsp;ble_advertising_restart_without_whitelist() to start the mode without whitelist (accepting new bond)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible in a HID mode disable bonding to HID?</title><link>https://devzone.nordicsemi.com/thread/180948?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2019 08:34:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09d6690e-9985-4837-b3f1-802007deb106</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;May be you mean instead of whitelist&lt;/p&gt;
&lt;p&gt;static void peer_manager_init(void)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Is it possible in a HID mode disable bonding to HID?</title><link>https://devzone.nordicsemi.com/thread/180946?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2019 08:33:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e9a72e7-6756-4cfc-b9b5-f9fcc03197cd</guid><dc:creator>Mikhail</dc:creator><description>&lt;p&gt;Hi!&lt;/p&gt;
&lt;p&gt;Yes, you correct understand it.&lt;/p&gt;
&lt;p&gt;I want in normal mode just connect to already bonded to HID device (smartphone).&amp;nbsp;&lt;span&gt;Any other phones shouldn&amp;#39;t be able to connect and bond with it.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;How to use whitelist at this case? How to configure whitelist to work only with already bonded devices and for non bonded with any new devices?&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: Is it possible in a HID mode disable bonding to HID?</title><link>https://devzone.nordicsemi.com/thread/180832?ContentTypeID=1</link><pubDate>Mon, 08 Apr 2019 15:16:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f3cb34b9-3488-40e9-b1e5-8572713aca1d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please correct me if I&amp;#39;m wrong. You have a central device that connect to some HID devices. Now on your central device you also want it to be a HID peripheral so the phone can connect to it ? And you only wants some phones which are bonded to connect to it. Any other phones shouldn&amp;#39;t be able to connect and bond with it ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If it&amp;#39;s the case, you can use whitelist to block any non-bonded phone to connect to your device. You can have a special mode (pairing mode) that whitelist is disabled to allow unknown device to connect to your device.&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>