<?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>Start advertising when NFC field is sensed</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/44108/start-advertising-when-nfc-field-is-sensed</link><description>Hi, 
 
 We implement oob pairing using NFC. 
 According to my knowledge NFC is used as &amp;quot;private&amp;quot; advertising channel (this is what OOB means) i.e. peripheral address, encryption initial keys etc. are transmitted via NFC instead of broadcasting them via</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 15 Mar 2019 12:06:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/44108/start-advertising-when-nfc-field-is-sensed" /><item><title>RE: Start advertising when NFC field is sensed</title><link>https://devzone.nordicsemi.com/thread/176381?ContentTypeID=1</link><pubDate>Fri, 15 Mar 2019 12:06:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86e93cf9-cf7a-4cf3-b286-133b24f01ea4</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Sorry for the confusion. The NFC peripheral can only act as a tag, not a NFC reader (cannot generate a field) so a 2-way data exchange is not supported as you stated above. But still I am not sure if a 2-two ways OOB would mean that the devices will paired without advertising, to my knowledge there is no way to connect two BLE devices without advertising. &lt;/p&gt;
[quote user="yes"]During our experiments we prevent the central from sending connection request and succeed to establish connection by another central which observed the peripheral from the advertising which was initiated by NFC field on event.[/quote]
&lt;p&gt;Is this a concern? Regardless of the connection request by another central, the peripheral won&amp;#39;t be able to pair and raise the security level to 4 with this new client (when using LESC OOB pairing).&lt;/p&gt;
[quote user="yes"]1) The advertising as part of NFC field on event is&amp;nbsp;&lt;span&gt;redundant because the advertising data is&amp;nbsp;transmitted to central&amp;nbsp;via NFC i.e the server should move to advertising state without broadcasting.&lt;/span&gt;[/quote]
&lt;p&gt;NFC only simplifies the discovery process by providing the Bluetooth address and other optional parameters related to the specific device. In order to establish a BLE connection between two devices a peripheral device needs to start a connectable advertising, see the connection establishment message sequence chart &lt;a href="https://www.nordicsemi.com/DocLib/Content/SoftDevice_API_Doc/S140/v6-1-0/group_ble_gap_conn_msc"&gt;here&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user="yes"]2) If advertising is mandatory at least it shall omit encryption data so any other observers could not connect.[/quote]
&lt;p&gt;Not sure what you mean here. There is no need of any &amp;quot;encryption data&amp;quot; for two devices to connect to each other. But connections do not offer any form for security. When you wish to do something that requires security, lets say access a data value (a characteristic) that requires authenticated access, then you will need to first pair the devices in order to do so.&lt;/p&gt;
&lt;p&gt;There are 2 data types relevant for LESC OOB pairing that are encoded in the NFC tag using the advertising data format: BLE_GAP_AD_TYPE_LESC_CONFIRMATION_VALUE and BLE_GAP_AD_TYPE_LESC_RANDOM_VALUE. These values are not keys but are relevant for pairing process and are used to authenticate the connected peer during pairing procedure.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Again it may help if you can explain a bit more about how your devices are going to interact with each other and I may be able to point you better in the right direction. I can see two use cases here but I am not sure about what you are aiming for.&lt;/p&gt;
&lt;p&gt;1) You can use LESC OOB pairing with the central the user wants to use, then use whitelist so other centrals are unable to send connection request to the peripheral. Only the authenticated central will have access to read and write the secure characteristics of the peripheral. &lt;/p&gt;
&lt;p&gt;2) If your goal is to develop a device that is pre-bonded, you could also use a pre-programmed static passkey. Try searching for &amp;quot;static key bonding&amp;quot; in this forum and you will find some cases that examplifies this method.&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Start advertising when NFC field is sensed</title><link>https://devzone.nordicsemi.com/thread/176292?ContentTypeID=1</link><pubDate>Thu, 14 Mar 2019 17:19:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1bdaa7d2-83e0-4307-97cb-6655e22c5bd0</guid><dc:creator>yes</dc:creator><description>[quote userid="73427" url="~/f/nordic-q-a/44108/start-advertising-when-nfc-field-is-sensed/176240"]MITM protection is only enforced during pairing. If you are worried about other 3rd party central device being able to connect to your BLE peripheral you should use whitelisting to restrict connections from non-paired devices[/quote]
&lt;p&gt;According to BT specification as I quoted above &amp;#39;2 ways&amp;#39; NFC data exchange should replace the BLE pairing process. Nevertheless we use&amp;nbsp;NFC &amp;#39;one way&amp;#39; i.e. only peripheral device (tag) passes its address and encryption data via NFC to central and not vice versa.&lt;/p&gt;
&lt;p&gt;Therefore, we can&amp;#39;t use whitelist because the NFC central device address is not recognized by the peripheral. The address and encryption data is used by the central&amp;nbsp;for sending connection request.&lt;/p&gt;
&lt;p&gt;This is also the reason we can&amp;#39;t use direct advertising.&lt;/p&gt;
&lt;p&gt;During our experiments we prevent the central from sending connection request and succeed to establish connection by another central which observed the peripheral from the advertising which was initiated by NFC field on event.&lt;/p&gt;
&lt;p&gt;The NFC was configured to&amp;nbsp;&lt;span&gt;NFC_PAIRING_MODE_LESC_OOB mode.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;I expected that using NFC as OOB channel shall prevent this scenario.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;1) The advertising as part of NFC field on event is&amp;nbsp;&lt;span&gt;redundant because the advertising data is&amp;nbsp;transmitted to central&amp;nbsp;via NFC i.e the server should move to advertising state without broadcasting.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;2) If advertising is mandatory at least it shall omit encryption data so any other observers could not connect.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If I shall force omitting encryption data from broadcasted advertising data as part of start advertising call , can it prevent other connections?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks in advance&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Start advertising when NFC field is sensed</title><link>https://devzone.nordicsemi.com/thread/176240?ContentTypeID=1</link><pubDate>Thu, 14 Mar 2019 14:42:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:639c77c7-24e7-4d6e-969e-bd6f1d3660bf</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi yerry,&lt;/p&gt;
&lt;p&gt;I am not sure I understand your problem here yet, maybe you should explain a bit more about which security threats you are facing or worried about?&lt;/p&gt;
&lt;p&gt;You said you are able to connect with a different client to the BLE NFC peripheral when it starts advertising when the NFC field is sensed, but this is not what MITM protection is about.&lt;/p&gt;
&lt;p&gt;MITM protection is only enforced during pairing. If you are worried about other 3rd party central device being able to connect to your BLE peripheral you should use whitelisting to restrict connections from non-paired devices.&lt;/p&gt;
&lt;p&gt;And unfortunately there is no way to connect two BLE devices without advertising. This document from the NFC forum &lt;a href="https://nfc-forum.org/our-work/specifications-and-application-documents/application-documents/"&gt;&amp;quot;Bluetooth Secure Simple Pairing Using NFC&amp;quot;&lt;/a&gt; describes how NFC is use to simplify the discovery process by providing the Bluetooth address, which removes the need for the user to select the appropiate device from a long list of advertising devices, but advertising is still used in the connection and pairing process. But I don&amp;#39;t see why this should be a problem.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Start advertising when NFC field is sensed</title><link>https://devzone.nordicsemi.com/thread/175322?ContentTypeID=1</link><pubDate>Mon, 11 Mar 2019 12:53:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33b6c3a7-fd3d-4e17-ac7f-365b6f5bc684</guid><dc:creator>yes</dc:creator><description>&lt;p&gt;Following&amp;nbsp;above discussion thread, it seems that Nordic&amp;#39;s&amp;nbsp;implementation doesn&amp;#39;t follows BT specification &lt;em&gt;&amp;quot;The Out of Band channel should be resistant to MITM&amp;nbsp;attacks.&amp;quot;&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;First of all according to below quote from BT specification there should be a way to pair via NFC only (2 way authentication).&lt;/p&gt;
&lt;p&gt;Moreover, seems that public key and confirmation value which are transferred by the server (one way authentication) doesn&amp;#39;t used&amp;nbsp;for pairing or transmitted again during consecutive advertising/pairing.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We did a few experiments and succeed to establish connection during advertising (which was initiated by NFC &amp;quot;field on&amp;quot; event)&amp;nbsp; &amp;nbsp;by different client device (MITM) despite NFC pairing mode was set to&amp;nbsp;&amp;nbsp; &amp;nbsp; NFC_PAIRING_MODE_LESC_OOB,&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /**&amp;lt; LESC pairing with OOB authentication data. */&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Start advertising when NFC field is sensed</title><link>https://devzone.nordicsemi.com/thread/174271?ContentTypeID=1</link><pubDate>Tue, 05 Mar 2019 13:34:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:abc57861-e90e-474e-b520-f3fbf1885452</guid><dc:creator>yes</dc:creator><description>[quote userid="73427" url="~/f/nordic-q-a/44108/start-advertising-when-nfc-field-is-sensed/173922"]You have to establish a connection before pairing and the bluetooth specification says that you only can send a connection request inside a given interval after an advertising packet is sent.[/quote]
&lt;p&gt;&lt;span&gt;Below is the description of Out of Band from&amp;nbsp;&lt;/span&gt;&lt;a href="https://www.bluetooth.org/DocMan/handlers/DownloadDoc.ashx?doc_id=421043&amp;amp;_ga=2.14425908.281371504.1515464182-1363720179.1495777331"&gt;BLUETOOTH SPECIFICATION Version 5.0&lt;/a&gt;&lt;span&gt;&amp;nbsp;| Vol 1, Part A, 5.2.4.3&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Out of Band&lt;br /&gt;The Out of Band (OOB) association model is primarily designed for scenarios&lt;br /&gt;&lt;span&gt;&lt;strong&gt;where an Out of Band mechanism is used to both discover the devices as well&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;span&gt;&lt;strong&gt;as to exchange or transfer cryptographic numbers used in the pairing process.&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;In order to be effective from a security point of view, the Out of Band channel&lt;br /&gt;should provide different properties in terms of security compared to the&lt;br /&gt;Bluetooth radio channel. The Out of Band channel should be resistant to MITM&lt;br /&gt;attacks. If it is not, security may be compromised during authentication.&lt;br /&gt;The user&amp;#39;s experience differs a bit depending on the Out of Band mechanism.&lt;br /&gt;&lt;strong&gt;As an example, with a Near Field Communication (NFC) solution, the user(s)&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;will initially touch the two devices together, and is given the option to pair the&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;first device with the other device.&lt;/strong&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;If &amp;quot;yes&amp;quot; is entered, the pairing is successful.&lt;br /&gt;This is a single touch experience where the exchanged information is used in&lt;br /&gt;both devices. The information exchanged includes discovery information (such&lt;br /&gt;as the Bluetooth Device Address) as well as cryptographic information. One of&lt;br /&gt;the devices will use a Bluetooth Device Address to establish a connection with&lt;br /&gt;the other device. The rest of the exchanged information is used during&lt;br /&gt;authentication.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Start advertising when NFC field is sensed</title><link>https://devzone.nordicsemi.com/thread/173922?ContentTypeID=1</link><pubDate>Mon, 04 Mar 2019 10:23:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:225c1f1d-7794-48e4-a00e-3f9969fde88e</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;No I don&amp;#39;t think there is a way to pair without advertising. You have to establish a connection before pairing and the bluetooth specification says that you only can send a connection request inside a given interval after an advertising packet is sent. When pairing through NFC encryption data is exchange using OOB which provides MITM protection, but the device still needs to advertise to start a connection.&lt;/p&gt;
&lt;p&gt;You can consider using whitelist, but it will not prevent other devices from seing the advertisement packets, just prevents unknown devices from establishing a connection to your device.&lt;/p&gt;
&lt;p&gt;You can also try implementing direct advertisement using a specific peer address, but the packets will still be visible using a BLE sniffer. The packets are only filtered out on the BLE stack of other devices when they see that the packet is not addressed to them.&lt;/p&gt;
&lt;p&gt;Best Regards.&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Start advertising when NFC field is sensed</title><link>https://devzone.nordicsemi.com/thread/173543?ContentTypeID=1</link><pubDate>Thu, 28 Feb 2019 16:08:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f613c53-082c-400b-b046-781e2b1dc4f3</guid><dc:creator>yes</dc:creator><description>&lt;p&gt;Thanks for the clarification.&lt;/p&gt;
&lt;p&gt;Let me focus my question as general question which is not relate to NFC example reference implementation:&lt;/p&gt;
&lt;p&gt;With the use of NFC is there a way to pair the devices&amp;nbsp;without starting advertising i.e. after NFC data is read by the central, it shall send connection request based on read NFC data but&amp;nbsp;the peripheral shall not broadcast its advertising data over the RF (address and security are already transferred to central via NFC tag).&lt;/p&gt;
&lt;p&gt;Due to security we concern of broadcasting advertising data which might be observed and used by 3rd device (MITM).&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks in advance&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Start advertising when NFC field is sensed</title><link>https://devzone.nordicsemi.com/thread/173531?ContentTypeID=1</link><pubDate>Thu, 28 Feb 2019 15:20:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4d6ce27-9093-4ed0-ba2b-80e9dde1ff5e</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;From the nRF SDK documentation library about the BLE Pairing using NFC peripheral reference example, &lt;a href="https://www.nordicsemi.com/DocLib/Content/SDK_Doc/nRF5_SDK/v15-2-0/ble_sdk_nfc_pairing_reference"&gt;here&lt;/a&gt;:&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;The application does not start advertising immediately, but only when the NFC tag is read by an NFC polling device, for example a smartphone or a tablet with NFC support. The message that the tag sends to the NFC device contains data required to initiate pairing. To start the NFC data transfer, the NFC device must touch the NFC antenna that is connected to the nRF52 Development Kit.&lt;/em&gt;&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;&lt;em&gt;After reading the tag, the device can pair with the nRF52 device which is advertising. Connection state of the device is signalled by LEDs. When the connection is lost due to timeout, the library automatically triggers direct advertising.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>