<?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>Securing access to s112 based device</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/56949/securing-access-to-s112-based-device</link><description>Dear experts, 
 My BLE peripheral device uses s112 soft device with nRF52832 and nRF SDK v16 and now the basic data collection and transmission features all work fine with no security control. My device has two LEDs which I think can be used to depict</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 28 Jan 2020 09:20:44 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/56949/securing-access-to-s112-based-device" /><item><title>RE: Securing access to s112 based device</title><link>https://devzone.nordicsemi.com/thread/231332?ContentTypeID=1</link><pubDate>Tue, 28 Jan 2020 09:20:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77fd5949-3b59-469f-8626-36cf06a898de</guid><dc:creator>yf13</dc:creator><description>&lt;p&gt;Thank you, I will spend more time with Glucose sample and BMS sample later.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Securing access to s112 based device</title><link>https://devzone.nordicsemi.com/thread/231206?ContentTypeID=1</link><pubDate>Mon, 27 Jan 2020 14:49:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c29c8278-c0fc-490b-a78c-15706e3dd0d5</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user="yf13"]I tried the HRS example you mentioned but found that I can&amp;#39;t run it directly on my nRF52DK, error logs are below:[/quote]
&lt;p&gt;Sorry for that is a serialization example, you cannot run that standalone on 1 DK. You need 2 DK&amp;#39;s, the other one need to run ble_connectivity, and you need to connect the boards as shown at this page... &lt;a title="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/nrf51_setups_serialization.html?cp=7_1_1_4" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/nrf51_setups_serialization.html?cp=7_1_1_4" rel="noopener noreferrer" target="_blank"&gt;https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/nrf51_setups_serialization.html?cp=7_1_1_4&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You could refer to &amp;lt;nRF5_SDK&amp;gt;\examples\ble_peripheral\ble_app_hrs\pca10040e\s112&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The &lt;a title="Bond Management Application" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/ble_sdk_app_bms.html?cp=7_1_4_2_2_5"&gt;Bond Management Application&lt;/a&gt; is an example that demonstrates how to use the &lt;a title="Bond Management Service" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/group__ble__bms.html?cp=7_1_6_3_36"&gt;Bond Management Service&lt;/a&gt;. The example shows how to manage the storage of bond information and how to delete bonds after they have been established. For s112 project is under &amp;lt;nRF5_SDK_16.0.0&amp;gt;\examples\ble_peripheral\ble_app_bms\pca10040e\s112&lt;/span&gt;&lt;/p&gt;
[quote user="yf13"]Generally I am thinking to have my peripheral showing a random 4 digits passkey then ask the Android central app to enter it for bonding.&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;You can take a look at the&amp;nbsp;&lt;a title="Glucose Application" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/ble_sdk_app_gls.html?cp=7_1_4_2_2_11"&gt;Glucose Application&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
[quote user="yf13"]what are the proper params to achieve it with peer_manager?&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;It looks correct. Please also see&amp;nbsp;&lt;a title="Usage" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_pm_usage.html?cp=7_1_3_2_7_2"&gt;Peer Manager - Usage&lt;/a&gt;&amp;nbsp;and the&amp;nbsp;&lt;a title="Glucose Application" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/ble_sdk_app_gls.html?cp=7_1_4_2_2_11"&gt;Glucose Application&lt;/a&gt;.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="yf13"]how many central peers can we have for a nRF peripheral?&amp;nbsp;[/quote]
&lt;p&gt;&amp;nbsp;&lt;span&gt;It&amp;#39;s&amp;nbsp;&lt;/span&gt;&lt;span&gt;typically 4 different centrals. Please see this &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/48033/s112-up-to-4-peripherals"&gt;post&lt;/a&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Securing access to s112 based device</title><link>https://devzone.nordicsemi.com/thread/230961?ContentTypeID=1</link><pubDate>Sat, 25 Jan 2020 03:29:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f15f899-291c-4bd9-ac7a-a564a3ed22a5</guid><dc:creator>yf13</dc:creator><description>&lt;p&gt;Thank you Amanda!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I tried the HRS example you mentioned but found that I can&amp;#39;t run it directly on my nRF52DK, error logs are below:&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;warning&amp;gt; sphy_hci: Timeout, no ACK. Dropping.
&amp;lt;error&amp;gt; nrf_sdh_ble: sd_ble_cfg_set() returned NRF_ERROR_INTERNAL when attempting to set BLE_CONN_CFG_GAP.
&amp;lt;error&amp;gt; app: ERROR 17 [NRF_ERROR_BUSY] at /opt/nRF/components/serialization/application/transport/ser_sd_transport.c:304
PC at: 0x000158C7
&amp;lt;error&amp;gt; app: End of error report
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Maybe I can&amp;#39;t use that ser_s112_hci example directly on my nRF52DK board --- the name &amp;quot;ser_s112_hci&amp;quot; implies some special hardware configuration to me...&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;From the SDKv16 examples folder, I also noticed there is a &amp;quot;ble_app_bms&amp;quot; example, it seems like a BLE service based on the &amp;quot;peer manager&amp;quot; component? I made it to run on pca10040. after setting the USE_AUTHORIZATION_CODE to 0, I seemed can bond to it from the&amp;nbsp;&amp;quot;nRF Connect&amp;quot; Android app.&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: Bond Management example started with 1 peers
&amp;lt;info&amp;gt; app: Fast adverstising.
&amp;lt;info&amp;gt; peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update, no change
&amp;lt;info&amp;gt; app: Connected
&amp;lt;info&amp;gt; peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Encryption
&amp;lt;info&amp;gt; peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update, no change
&amp;lt;info&amp;gt; app: Fast adverstising.
&amp;lt;info&amp;gt; app: Disconnected
&amp;lt;info&amp;gt; peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update, no change
&amp;lt;info&amp;gt; app: Connected
&amp;lt;info&amp;gt; peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Encryption
&amp;lt;info&amp;gt; peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update, no change
&amp;lt;info&amp;gt; app: Fast adverstising.
&amp;lt;info&amp;gt; app: Disconnected
&amp;lt;info&amp;gt; peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update, no change
&amp;lt;info&amp;gt; app: Connected
&amp;lt;info&amp;gt; peer_manager_handler: Connection secured: role: Peripheral, conn_handle: 0, procedure: Encryption
&amp;lt;info&amp;gt; peer_manager_handler: Peer data updated in flash: peer_id: 0, data_id: Peer rank, action: Update, no change
&amp;lt;info&amp;gt; ble_bms: Control point write: Success
&amp;lt;info&amp;gt; app: Client requested that bond to current device deleted
&amp;lt;info&amp;gt; app: Fast adverstising.
&amp;lt;info&amp;gt; app: Disconnected
&amp;lt;error&amp;gt; peer_manager_handler: Peer deleted successfully: peer_id: 0
&amp;lt;info&amp;gt; app: Connected
&amp;lt;info&amp;gt; peer_manager_handler: Connection security failed: role: Peripheral, conn_handle: 0x0, procedure: Encryption, error: 4102
&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; 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: Central address resolution, action: Update
&amp;lt;info&amp;gt; app: Fast adverstising.
&amp;lt;info&amp;gt; app: Disconnected&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Currently I don&amp;#39;t fully understand the BMS service yet, but I guess it allows&amp;nbsp;us to delete an Android central from a peripheral&amp;nbsp; so that the&amp;nbsp;peripheral can bond with other Android central later. This is useful especially when the peripheral has no input buttons.&lt;/p&gt;
&lt;p&gt;Generally I am thinking to have my peripheral showing a random 4 digits passkey then ask the Android central app to enter it for bonding.&amp;nbsp;what are the proper params to achieve it with peer_manager?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;sec_param.bond           = 1;
sec_param.mitm           = 1;
sec_param.lesc           = 1;
sec_param.keypress       = 0;
sec_param.io_caps        = BLE_GAP_IO_CAPS_DISPLAY_ONLY;
sec_param.oob            = 0;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Yet another question is how many central peers can we have for a nRF peripheral?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Securing access to s112 based device</title><link>https://devzone.nordicsemi.com/thread/230835?ContentTypeID=1</link><pubDate>Fri, 24 Jan 2020 11:59:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d356aaec-0d4a-4ec0-bbba-47fab24b867e</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi, &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I would suggest you take a look at&amp;nbsp;&lt;/span&gt;&lt;a title="Software Development Kit" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/lib_peer_manager.html?resultof=%22%50%65%65%72%22%20%22%70%65%65%72%22%20%22%4d%61%6e%61%67%65%72%22%20%22%6d%61%6e%61%67%22%20%22%65%78%61%6d%70%6c%65%22%20%22%65%78%61%6d%70%6c%22%20"&gt;nRF5 SDK v16.0.0: Peer Manager&lt;/a&gt;&lt;span&gt;&amp;nbsp;and start from&amp;nbsp;&lt;/span&gt;&lt;a title="Heart Rate Application" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/ble_sdk_app_hrs.html?cp=7_1_4_2_2_13"&gt;Heart Rate Application&lt;/a&gt;&lt;span&gt;.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;HRS s112 example is under nRF5_SDK_16.0.0\examples\ble_peripheral\ble_app_hrs\pca10040\ser_s112_hci&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;-Amanda H.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>