<?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>How to connected severals smartphone HID Keyboard</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/86678/how-to-connected-severals-smartphone-hid-keyboard</link><description>Good Morning, 
 I started with example ble_app_hids_keyboard for nrf52840 with nRF5_SDK_17.1.0 and I added uart_init() function to use UARTE0 and I modified uart_event_handle() for received a message &amp;quot;UART_OK&amp;quot; when I received on the rx pin an character</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 Apr 2022 14:40:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/86678/how-to-connected-severals-smartphone-hid-keyboard" /><item><title>RE: How to connected severals smartphone HID Keyboard</title><link>https://devzone.nordicsemi.com/thread/362409?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2022 14:40:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b533111-f03d-4049-af04-5dc2ddcd7b8d</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;The&amp;nbsp;ble_advertising_init() will cycle through advertising as configured by the&amp;nbsp;parameters supplied. The advertisement will throw a callback in&amp;nbsp;on_adv_evt() each time it change mode, and finally when all modes have elapsed it throw the&amp;nbsp;BLE_ADV_EVT_IDLE event in&amp;nbsp;&lt;span&gt;on_adv_evt(). In this case you can either go to sleep or start advertisment again by for instance calling&amp;nbsp;ble_advertising_start() or&amp;nbsp;ble_advertising_restart_without_whitelist().&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kenneth&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connected severals smartphone HID Keyboard</title><link>https://devzone.nordicsemi.com/thread/362400?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2022 14:25:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e4bb1ff6-2ace-47c4-ad2f-4d0035c4c469</guid><dc:creator>alexandre trilles </dc:creator><description>&lt;p&gt;Good Morning Kenneth,&lt;/p&gt;
&lt;p&gt;thanks for information, I &amp;#39;m going to see&amp;nbsp; accurately examples .&amp;nbsp;&lt;/p&gt;
&lt;p&gt;On the same example HID Keyboard, my application is always power on. I have so put it comment sleep_mode() function into static void on_adv_evt(ble_adv_evt_t ble_adv_evt),&amp;nbsp; I have the same problem as this post:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;quot;LED 1 blinks indicating that it is advertising, and for a few minutes it is visible in nRF Connect. But, after approximately 5 minutes the device is no longer visible. However, the LED continues to blink as though the device is still advertising.&amp;quot;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;this is the POST:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/21413/completely-disabling-sleep-mode/83955#83955"&gt;Completely disabling sleep mode - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone (nordicsemi.com)&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I looked at the following function &amp;quot;advertising_init&amp;quot; but nothing tells me how to set an infinite time with a value of 0 !&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**@brief Function for initializing the Advertising functionality.
 */
static void advertising_init(void)
{
    uint32_t               err_code;
    uint8_t                adv_flags;
    ble_advertising_init_t init;

    memset(&amp;amp;init, 0, sizeof(init));

    adv_flags                            = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
    init.advdata.name_type               = BLE_ADVDATA_FULL_NAME;
    init.advdata.include_appearance      = true;
    init.advdata.flags                   = adv_flags;
    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;
    init.config.ble_adv_directed_high_duty_enabled = true;
    init.config.ble_adv_directed_enabled           = false;
    init.config.ble_adv_directed_interval          = 0;
    init.config.ble_adv_directed_timeout           = 0;
    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_FAST_DURATION;
    init.config.ble_adv_slow_enabled               = true;
    init.config.ble_adv_slow_interval              = APP_ADV_SLOW_INTERVAL;
    init.config.ble_adv_slow_timeout               = APP_ADV_SLOW_DURATION;

    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;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For information, I use nRF SDK 17.1.0 and ble_app_hids_keyboard_pca100056_s140&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Alexandre&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connected severals smartphone HID Keyboard</title><link>https://devzone.nordicsemi.com/thread/362342?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2022 12:18:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a6409ff0-bbea-4125-b219-f9c942ad40bf</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Please find this devzone case that explain how a peripheral device can &amp;quot;switch&amp;quot; between central devices by manipulating the gap address. By changing the gap address the peripheral will appear as a new/different device to the central, so you can for instance switch back and forth between gap addresses to control which central you want to connect to:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/37369/switching-keyboard-mouse-between-3-paired-devices"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/37369/switching-keyboard-mouse-between-3-paired-devices&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also see (this one is likely most useful for you, since it contain an example to switch gap address):&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/57881/store-custom-application-data-using-peer-manager"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/57881/store-custom-application-data-using-peer-manager&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You must call ble_advertising_restart_without_whitelist() to advertise without whitelist. OR you configure advertisment in the advertising_init(), e.g.&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;init&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;config&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;ble_adv_whitelist_enabled&lt;/span&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &lt;/span&gt;&lt;span&gt;false&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to connected severals smartphone HID Keyboard</title><link>https://devzone.nordicsemi.com/thread/362274?ContentTypeID=1</link><pubDate>Thu, 07 Apr 2022 09:45:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:099c04cc-79b0-439b-9c03-5eb12fc95e1e</guid><dc:creator>alexandre trilles </dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I took the HID Keyboard example again and activated the nrf LOG. With the first phone I connect well and the HID application works well &amp;quot;hello&amp;quot; visible on an editor. But I can&amp;#39;t connect the second phone. I have read several posts and I did not understand the following remark:&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ff6600;color:#000000;"&gt;You could either try to scan without whitelist&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;POST:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/83461/nrf51822-as-hid-keyboard-how-to-pair-bond-to-multiple-devices-smartphones/346997#346997"&gt;nRF51822 as hid keyboard: how to pair/bond to multiple devices (smartphones) - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone (nordicsemi.com)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When you try to establish a connection with the second device, advertising with a whitelist is active and this prevents the connection to the second phone. &lt;span style="background-color:#ff6600;"&gt;You could either try to scan without whitelist&lt;/span&gt; and add second device to the whitelist when it is connected, or you could consider turning off the whitelist completely.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;1) How to make &amp;quot;scan without whitelist&amp;quot; ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;below my log connection and disconnection with first smartphone and when I&amp;#39;m to &amp;quot;slow advertising&amp;quot; my second smartphone don&amp;#39;t saw the peripheral Nordic_Keyboard,&amp;nbsp;&amp;nbsp;I would like to know how to connect with my second phone without &amp;quot;erase bonds!&amp;quot;&amp;nbsp; with push button 2 ?&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;info&amp;gt; app_timer: RTC: initialized.

&amp;lt;info&amp;gt; app: HID Keyboard example started.

&amp;lt;info&amp;gt; app: 	m_whitelist_peer_cnt 1, MAX_PEERS_WLIST 8

&amp;lt;info&amp;gt; app: Fast advertising.

&amp;lt;info&amp;gt; app: Slow advertising.

&amp;lt;info&amp;gt; app: Connected

&amp;lt;info&amp;gt; peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Bonding

&amp;lt;info&amp;gt; peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Bonding data, action: Update

&amp;lt;info&amp;gt; app: New Bond, add the peer to the whitelist if possible

&amp;lt;info&amp;gt; app: 	m_whitelist_peer_cnt 2, MAX_PEERS_WLIST 8

&amp;lt;info&amp;gt; peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update

&amp;lt;info&amp;gt; peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Local database, action: Update

&amp;lt;info&amp;gt; peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Central address resolution, action: Update

&amp;lt;info&amp;gt; peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Local database, action: Update

&amp;lt;info&amp;gt; peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Local database, action: Update

&amp;lt;info&amp;gt; app: High Duty Directed advertising.

&amp;lt;info&amp;gt; app: Disconnected

&amp;lt;info&amp;gt; app: Fast advertising with whitelist.

&amp;lt;info&amp;gt; app: Slow advertising with whitelist.

&amp;lt;info&amp;gt; app_timer: RTC: initialized.

&amp;lt;info&amp;gt; app: HID Keyboard example started.

&amp;lt;info&amp;gt; app: Erase bonds!

&amp;lt;error&amp;gt; peer_manager_handler: Peer deleted successfully: peer_id: 0

&amp;lt;info&amp;gt; peer_manager_handler: All peers deleted.

&amp;lt;info&amp;gt; app: 	m_whitelist_peer_cnt 1, MAX_PEERS_WLIST 8

&amp;lt;info&amp;gt; app: Fast advertising.

&amp;lt;info&amp;gt; app: Connected

&amp;lt;info&amp;gt; peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Bonding

&amp;lt;info&amp;gt; peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Bonding data, action: Update

&amp;lt;info&amp;gt; app: New Bond, add the peer to the whitelist if possible

&amp;lt;info&amp;gt; app: 	m_whitelist_peer_cnt 2, MAX_PEERS_WLIST 8

&amp;lt;info&amp;gt; peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update

&amp;lt;info&amp;gt; peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Local database, action: Update

&amp;lt;info&amp;gt; peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Central address resolution, action: Update

&amp;lt;info&amp;gt; peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Local database, action: Update

&amp;lt;info&amp;gt; peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Local database, action: Update

&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Thank you very much for help&lt;/p&gt;
&lt;p&gt;Alexandre&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/83461/nrf51822-as-hid-keyboard-how-to-pair-bond-to-multiple-devices-smartphones/346997#346997"&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>