<?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>Pair Device with Legacy Connection OOB preshared key, using Android NRF connect</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/70383/pair-device-with-legacy-connection-oob-preshared-key-using-android-nrf-connect</link><description>Hi, 
 I am working on NRF52832-based board, with SDK 15.2. 
 My BLE device is protected with Legacy Connection OOB preshared key. 
 I would like to use Android NRF Connect app to pair with my device, filling my OOB key. 
 I can be in pairing mode and</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 24 Feb 2021 12:41:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/70383/pair-device-with-legacy-connection-oob-preshared-key-using-android-nrf-connect" /><item><title>RE: Pair Device with Legacy Connection OOB preshared key, using Android NRF connect</title><link>https://devzone.nordicsemi.com/thread/296017?ContentTypeID=1</link><pubDate>Wed, 24 Feb 2021 12:41:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9be62966-acc7-44a3-9ec9-b9623d68b46e</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Antoine&lt;/p&gt;
&lt;p&gt;No, not forgotten, but I assumed you were content with the replies from Thomas and David here.&lt;/p&gt;
&lt;p&gt;From our expert: &amp;quot;As far as I know the only OOB supported in Android is over NFC, for providing PIN/passcode, you&amp;#39;ll need to use a different pairing method. The nRFConnect app just prints events from the system, so if it receives state BONDED, that means the system finished bonding, but perhaps some lower security with OOB requirements fail. The PAIRING_VARIANT_CONSENT should mean that the user needs to accept the pairing process, so it seems like the Android device is waiting for that from the other side&amp;quot;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pair Device with Legacy Connection OOB preshared key, using Android NRF connect</title><link>https://devzone.nordicsemi.com/thread/295954?ContentTypeID=1</link><pubDate>Wed, 24 Feb 2021 08:26:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af4d7b4d-c12e-4c5a-bada-2e545d6f4fea</guid><dc:creator>Beldramma</dc:creator><description>&lt;p&gt;Hi Simon, have you forgotten me ? :P&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pair Device with Legacy Connection OOB preshared key, using Android NRF connect</title><link>https://devzone.nordicsemi.com/thread/294236?ContentTypeID=1</link><pubDate>Fri, 12 Feb 2021 17:02:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11958a77-d450-4fda-8fd2-ddbda8c2e25c</guid><dc:creator>daviddedwin</dc:creator><description>&lt;p&gt;I thought it would be possible to pair to the android phone using&amp;nbsp; NFC without involving the createBondOutOfBand( ) function, so the NFC and the Android OS should get paired without the intervention from the App. &lt;br /&gt;Directly calling createBondOutOfBand( ) from the app may not work. Has android 9 lost this capability as well ?? That would be odd.&lt;/p&gt;
&lt;p&gt;Tap NFC -&amp;gt; Get the Pairing dialog on Android -&amp;gt; Tap yes and that should trigger the pairing sequence with the device.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pair Device with Legacy Connection OOB preshared key, using Android NRF connect</title><link>https://devzone.nordicsemi.com/thread/294021?ContentTypeID=1</link><pubDate>Thu, 11 Feb 2021 15:22:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:43ca1bc0-b321-4680-b3c7-34300b839c40</guid><dc:creator>Tom_H</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;I came across the same problem and I think the issue is raleted to the Android API. The Android API function creatBondOutOfBand() has a private scope and private API functions cannot be called with reflections&amp;nbsp;since Android version 9 (see this &lt;a href="https://stackoverflow.com/questions/41603450/is-bluetooth-oob-pairing-really-supported-in-android"&gt;Link).&lt;/a&gt; It should work on older devices as aspected.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Thomas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pair Device with Legacy Connection OOB preshared key, using Android NRF connect</title><link>https://devzone.nordicsemi.com/thread/289765?ContentTypeID=1</link><pubDate>Mon, 18 Jan 2021 13:45:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e57eab7-290a-4ce5-a775-2ca21da536d8</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Antoine&lt;/p&gt;
&lt;p&gt;The Android expert has not come back to me as of yet, I have pinged them again. I&amp;#39;ll update you as soon as they get back to me. Very sorry about the delay.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thank you for confirming this issue is not only in the nRFConnect app. I will forward this info to our expert as well.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pair Device with Legacy Connection OOB preshared key, using Android NRF connect</title><link>https://devzone.nordicsemi.com/thread/289691?ContentTypeID=1</link><pubDate>Mon, 18 Jan 2021 11:15:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d26523b2-0086-41f4-b253-cb592b91049d</guid><dc:creator>Beldramma</dc:creator><description>&lt;p&gt;Btw Simonr, have you discussed with your Android Expert ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pair Device with Legacy Connection OOB preshared key, using Android NRF connect</title><link>https://devzone.nordicsemi.com/thread/289688?ContentTypeID=1</link><pubDate>Mon, 18 Jan 2021 11:13:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:930dbd86-131d-4ac2-b52d-4bcfa20f5ba6</guid><dc:creator>Beldramma</dc:creator><description>&lt;p&gt;Ok, so just for tests, i have added the discoverable flag and the appearance in my advertising frame. So i could connect with my device without NRF connect, but same problem. My phone asks me if i want to pair, i accept and that&amp;#39;s it, no notification to enter the oob key. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pair Device with Legacy Connection OOB preshared key, using Android NRF connect</title><link>https://devzone.nordicsemi.com/thread/289612?ContentTypeID=1</link><pubDate>Mon, 18 Jan 2021 07:01:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a3eeb1e-7b60-4bc5-8363-f43f25ea1a62</guid><dc:creator>Simonr</dc:creator><description>[quote user="Beldramma"]Maybe the reason is because I have not put any flags in my advertising frame[/quote]
&lt;p&gt;&amp;nbsp;That seems likely. The phone OS&amp;#39;es (Android and iOS) won&amp;#39;t &amp;quot;detect&amp;quot; devices that don&amp;#39;t add the &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s132.api.v7.2.0%2Fgroup___b_l_e___g_a_p___a_d_v___f_l_a_g_s.html&amp;amp;anchor=ga3b7d4251306cd6644d9125da1994a931"&gt;general discoverable flag&lt;/a&gt;&amp;nbsp;and/or include appearance in the advertising_init() function like below:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;span&gt;init&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;advdata&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;include_appearance&lt;/span&gt;&lt;span&gt;&amp;nbsp;=&amp;nbsp;&lt;/span&gt;&lt;span&gt;true&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pair Device with Legacy Connection OOB preshared key, using Android NRF connect</title><link>https://devzone.nordicsemi.com/thread/289371?ContentTypeID=1</link><pubDate>Fri, 15 Jan 2021 09:59:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a91c9480-c702-4692-a363-40d803f07c46</guid><dc:creator>Beldramma</dc:creator><description>[quote userid="84049" url="~/f/nordic-q-a/70383/pair-device-with-legacy-connection-oob-preshared-key-using-android-nrf-connect/289166#289166"]You can also try to get the development working with JUSTWORKS/PASSKEY and then focus on the OOB issue after that so that there are no other issues complicating the development.[/quote]
&lt;p&gt;For now, i deactivate the security part to test others parts. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pair Device with Legacy Connection OOB preshared key, using Android NRF connect</title><link>https://devzone.nordicsemi.com/thread/289368?ContentTypeID=1</link><pubDate>Fri, 15 Jan 2021 09:57:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ccaa4bd2-eb9c-4416-8696-0e2e8ee8458a</guid><dc:creator>Beldramma</dc:creator><description>&lt;p&gt;Hi Simonr,&lt;/p&gt;
[quote userid="75734" url="~/f/nordic-q-a/70383/pair-device-with-legacy-connection-oob-preshared-key-using-android-nrf-connect/289347#289347"]That depends on what kind of device is advertising. The Bluetooth settings will be able to find some advertising devices, like HID devices, headphones, heart rate measurers, etc. So it depends on what your device advertises as, while the nRFConnect app has no filter by default, and will show any device advertising over BLE.[/quote]
&lt;p&gt;I have changed the GAP appearance, but my device is not detected. Maybe the reason is because I have not put any flags in my advertising frame. I have removed them because in my case the data in Manufacturer data and the one from the Name&amp;nbsp; already reach 31 bytes, the maximum Advertising length. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pair Device with Legacy Connection OOB preshared key, using Android NRF connect</title><link>https://devzone.nordicsemi.com/thread/289347?ContentTypeID=1</link><pubDate>Fri, 15 Jan 2021 08:35:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7255f21-4c17-4d65-9f92-3bdf8a13aad1</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
[quote user="Beldramma"]is it normal that i can see my device with NRF COnnect but not with the Bluetooth Common Settings[/quote]
&lt;p&gt;That depends on what kind of device is advertising. The Bluetooth settings will be able to find some advertising devices, like HID devices, headphones, heart rate measurers, etc. So it depends on what your device advertises as, while the nRFConnect app has no filter by default, and will show any device advertising over BLE.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pair Device with Legacy Connection OOB preshared key, using Android NRF connect</title><link>https://devzone.nordicsemi.com/thread/289166?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2021 11:34:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:857837d9-357b-46cd-8eb0-747aa27bfa43</guid><dc:creator>daviddedwin</dc:creator><description>&lt;p&gt;nRF Connect Desktop on the PC&amp;nbsp; is Nordicsemi controlled software infrastructure so all the BLE capability should be available for development and test, however&amp;nbsp; BLE apps on Android will have to use the Android Bluetooth API and its restrictions.&lt;br /&gt;You can also try to get the development working with JUSTWORKS/PASSKEY and then focus on the OOB issue after that so that there are no other issues complicating the development.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pair Device with Legacy Connection OOB preshared key, using Android NRF connect</title><link>https://devzone.nordicsemi.com/thread/289157?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2021 11:21:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f4ebc72-fbc3-46dd-82aa-bac070975dd4</guid><dc:creator>Beldramma</dc:creator><description>&lt;p&gt;Hi Simonr, is it normal that i can see my device with NRF COnnect but not with the Bluetooth Common Settings ? Is there something missing in my code ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pair Device with Legacy Connection OOB preshared key, using Android NRF connect</title><link>https://devzone.nordicsemi.com/thread/289155?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2021 11:17:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0ef751ec-d9a7-4c55-8900-34a9156f924a</guid><dc:creator>Beldramma</dc:creator><description>&lt;p&gt;Hi daviddedwin,&lt;/p&gt;
[quote userid="84049" url="~/f/nordic-q-a/70383/pair-device-with-legacy-connection-oob-preshared-key-using-android-nrf-connect/289153#289153"]I thought that the Android OOB was accessible only over NFC.&amp;nbsp; I also suspect that the Android OOB API is a private API in Android which complicates things a bit (not 100% sure but this was what I remember).&lt;br /&gt;Adding NFC is a possible solution, will that work for you ?[/quote]
&lt;p&gt;Pairing mode with OOB without NFC works with NRF Connect Desktop, so&amp;nbsp; I am not sure that it is the problem. &lt;/p&gt;
&lt;p&gt;When i did the researches to choose the security process ( Just Works, OOB, Passkey), it seemed to me that we can implement OOB without NFC.&lt;/p&gt;
&lt;p&gt;By the way, the board is already made, we cannot add NFC inside.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pair Device with Legacy Connection OOB preshared key, using Android NRF connect</title><link>https://devzone.nordicsemi.com/thread/289153?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2021 11:10:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5cfa138d-287f-46c8-9ae0-59bb1283ddae</guid><dc:creator>daviddedwin</dc:creator><description>&lt;p&gt;I thought that the Android OOB was accessible only over NFC.&amp;nbsp; I also suspect that the Android OOB API is a private API in Android which complicates things a bit (not 100% sure but this was what I remember).&lt;br /&gt;Adding NFC is a possible solution, will that work for you ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pair Device with Legacy Connection OOB preshared key, using Android NRF connect</title><link>https://devzone.nordicsemi.com/thread/289142?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2021 10:52:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e0e1c7e8-41a0-4d47-aa68-42f94859da2e</guid><dc:creator>Beldramma</dc:creator><description>&lt;p&gt;Hi Simonr, &lt;/p&gt;
[quote userid="75734" url="~/f/nordic-q-a/70383/pair-device-with-legacy-connection-oob-preshared-key-using-android-nrf-connect/289126#289126"]Yes, try to connect to your device without using nRFConnect. If you go into the settings on the phone, you should have a &amp;quot;Bluetooth menu&amp;quot; where you can scan for, connect, and pair to Bluetooth devices.[/quote]
&lt;p&gt;With my phone, when i scan Bluetooth devices without NRF Connect, I don&amp;#39;t see my BLE device. &lt;/p&gt;
[quote userid="75734" url="~/f/nordic-q-a/70383/pair-device-with-legacy-connection-oob-preshared-key-using-android-nrf-connect/289126#289126"]The three dots&amp;nbsp;next to the DEBUG tab in the nRFConnect app for Android should have a &amp;quot;share&amp;quot; or &amp;quot;copy to clipboard&amp;quot; button function depending on the nRFConnect version.[/quote]
&lt;p&gt;Ok, here is the logs&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;nRF Connect, 2021-01-14
123456789ab (D7:6A:98:57:39:7F)
V 11:48:43.051 Connecting to D7:6A:98:57:39:7F...
D 11:48:43.051 gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferred PHY = LE 1M)
D 11:48:50.565 [Callback] Connection state changed with status: 0 and new state: CONNECTED (2)
I 11:48:50.565 Connected to D7:6A:98:57:39:7F
D 11:48:50.567 [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
V 11:48:50.651 Discovering services...
D 11:48:50.651 gatt.discoverServices()
D 11:48:50.689 [Broadcast] Action received: android.bluetooth.device.action.BOND_STATE_CHANGED, bond state changed to: BOND_BONDING (11)
D 11:48:50.722 [Broadcast] Action received: android.bluetooth.device.action.PAIRING_REQUEST, pairing variant: PAIRING_VARIANT_CONSENT (3)
I 11:48:51.188 Connection parameters updated (interval: 7.5ms, latency: 0, timeout: 5000ms)
D 11:48:52.498 [Callback] Services discovered with status: 0
I 11:48:52.498 Services discovered
V 11:48:52.659 Generic Access (0x1800)
... 
I 11:48:52.677 Connection parameters updated (interval: 45.0ms, latency: 0, timeout: 5000ms)
D 11:48:54.475 [Broadcast] Action received: android.bluetooth.device.action.PAIRING_REQUEST, pairing variant: PAIRING_VARIANT_CONSENT (3)
I 11:48:56.672 Connection parameters updated (interval: 75.0ms, latency: 0, timeout: 4000ms)
D 11:48:57.496 [Broadcast] Action received: android.bluetooth.device.action.BOND_STATE_CHANGED, bond state changed to: BOND_BONDED (12)
I 11:48:57.496 Device bonded
V 11:49:37.379 Reading characteristic 00002a29-0000-1000-8000-00805f9b34fb
D 11:49:37.379 gatt.readCharacteristic(00002a29-0000-1000-8000-00805f9b34fb)
E 11:49:38.395 Error 137 (0x89): GATT AUTH FAIL
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pair Device with Legacy Connection OOB preshared key, using Android NRF connect</title><link>https://devzone.nordicsemi.com/thread/289126?ContentTypeID=1</link><pubDate>Thu, 14 Jan 2021 10:20:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b4d7fbd-1194-4f1a-b1c4-f25153a2196d</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Antoine&lt;/p&gt;
&lt;p&gt;Yes, try to connect to your device without using nRFConnect. If you go into the settings on the phone, you should have a &amp;quot;Bluetooth menu&amp;quot; where you can scan for, connect, and pair to Bluetooth devices.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The three dots&amp;nbsp;next to the DEBUG tab in the nRFConnect app for Android should have a &amp;quot;share&amp;quot; or &amp;quot;copy to clipboard&amp;quot; button function depending on the nRFConnect version.&lt;/p&gt;
&lt;p&gt;If you have an extra nRF51 or nRF52 Development Kit/Dongle you can use the &lt;a href="https://infocenter.nordicsemi.com/topic/ug_sniffer_ble/UG/sniffer_ble/intro.html"&gt;nRF Sniffer for BLE&lt;/a&gt; to take a sniffer trace of the connection.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pair Device with Legacy Connection OOB preshared key, using Android NRF connect</title><link>https://devzone.nordicsemi.com/thread/288993?ContentTypeID=1</link><pubDate>Wed, 13 Jan 2021 15:58:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a48dfb47-0062-45bd-be29-bf912cdd40fd</guid><dc:creator>Beldramma</dc:creator><description>[quote userid="75734" url="~/f/nordic-q-a/70383/pair-device-with-legacy-connection-oob-preshared-key-using-android-nrf-connect/288940#288940"]In the meantime, can you try connecting and pairing in the standard Bluetooth settings on the phone in order to see if you get prompted with a passkey window that way? You can also try to set SEC_PARAM_BOND =1 in your security parameters to enable bonding and see if that makes a difference (this is somewhat of a shot in the dark though).[/quote]
&lt;p&gt;I am not sure to understand what you mean by &amp;quot;standard Bluetooth settings on the phone&amp;quot;... Do you mean trying to connect to my device without using NRF Connect ?&lt;/p&gt;
&lt;p&gt;Also, when i carried out these tests, the Bonding mode was enabled, so i had these parameters :&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;sec_param.bond = true;
sec_param.kdist_own.enc = 1;
sec_param.kdist_own.id = 1;
sec_param.kdist_peer.enc = 1;
sec_param.kdist_peer.id = 1;&lt;/pre&gt;&lt;/p&gt;
[quote userid="75734" url="~/f/nordic-q-a/70383/pair-device-with-legacy-connection-oob-preshared-key-using-android-nrf-connect/288940#288940"]It would also be great if you could export and upload the full log from Android, and if possible, take a sniffer trace so we can get a more detailed look at what exactly is going on in the connection.[/quote]
&lt;p&gt;Where can I finf the full log ? About the sniffer, for now i don&amp;#39;t have one. &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pair Device with Legacy Connection OOB preshared key, using Android NRF connect</title><link>https://devzone.nordicsemi.com/thread/288940?ContentTypeID=1</link><pubDate>Wed, 13 Jan 2021 13:36:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1a27cfc-a44d-40f0-8271-7645b7571c43</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;The Android app should provide a prompt for entering the passkey/OOB key after pressing the &amp;quot;Bond&amp;quot; button in the app, but for some reason that doesn&amp;#39;t seem to happen in this case. Our Android expert will be back in office next week so we might have to wait for them to get back to get to the bottom of this.&lt;/p&gt;
&lt;p&gt;In the meantime, can you try connecting and pairing in the standard Bluetooth settings on the phone in order to see if you get prompted with a passkey window that way? You can also try to set SEC_PARAM_BOND =1 in your security parameters to enable bonding and see if that makes a difference (this is somewhat of a shot in the dark though).&lt;/p&gt;
&lt;p&gt;It would also be great if you could export and upload the full log from Android, and if possible, take a sniffer trace so we can get a more detailed look at what exactly is going on in the connection.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pair Device with Legacy Connection OOB preshared key, using Android NRF connect</title><link>https://devzone.nordicsemi.com/thread/288881?ContentTypeID=1</link><pubDate>Wed, 13 Jan 2021 10:46:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a1b5967-7c3b-4d02-94e9-51f674af7004</guid><dc:creator>Beldramma</dc:creator><description>[quote userid="75734" url="~/f/nordic-q-a/70383/pair-device-with-legacy-connection-oob-preshared-key-using-android-nrf-connect/288811#288811"]Can you provide the log you see in the Android nRFConnect app when you try bonding to the peripheral? We should be able to see an error code of some kind I think. Also, what Android device are you using when seeing this issue?[/quote]
&lt;p&gt;Here are the logs :&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1610534618448v1.jpeg" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1610534627819v2.jpeg" /&gt;&lt;/p&gt;
&lt;p&gt;I have removed the logs about the services discovered.&lt;/p&gt;
&lt;p&gt;So it seems that the bonding succeeded, but the Android app haven&amp;#39;t asked me the Key, and after I have tried to read my characteristic and it failed, of course because&amp;nbsp; my characteristic is protected and no pairing key was asked.&lt;/p&gt;
&lt;p&gt;My Android phone is an Oppo A5 with Android 10 version (Android Q) and Oppo custom version ColorOS 7.1&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pair Device with Legacy Connection OOB preshared key, using Android NRF connect</title><link>https://devzone.nordicsemi.com/thread/288874?ContentTypeID=1</link><pubDate>Wed, 13 Jan 2021 10:24:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e05df77-7e63-4d77-9e1c-7040ef19e715</guid><dc:creator>Beldramma</dc:creator><description>&lt;p&gt;Hi Simonr,&lt;/p&gt;
[quote userid="75734" url="~/f/nordic-q-a/70383/pair-device-with-legacy-connection-oob-preshared-key-using-android-nrf-connect/288811#288811"]Please also provide some information of how the pairing is done in your application.[/quote]
&lt;p&gt;The pairing is done like that :&lt;/p&gt;
&lt;p&gt;So i have enabled these parameters in sdk_config file :&lt;/p&gt;
&lt;p&gt;PEER_MANAGER_ENABLED 1, FDS_ENABLED 1 and NRF_FSTORAGE_ENABLED 1.&lt;/p&gt;
&lt;p&gt;Here is the peer_manager_init and its handler :&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/**@brief Function for handling Peer Manager events.
 *
 * @param[in] p_evt  Peer Manager event.
 */
static void pm_evt_handler(pm_evt_t const * p_evt)
{
    pm_handler_on_pm_evt(p_evt);
    pm_handler_disconnect_on_sec_failure(p_evt);
    pm_handler_flash_clean(p_evt);

    switch (p_evt-&amp;gt;evt_id)
    {
        case PM_EVT_PEERS_DELETE_SUCCEEDED:
        {
            advertising_start();
        }
        break;

        default:
        {
            //Others events are handled by the peer manager
        }
        break;
    }
}

/**@brief Function for the Peer Manager initialization.
 */
static void peer_manager_init(void)
{
    ble_gap_sec_params_t sec_param;
    ret_code_t           err_code;

    err_code = pm_init();
    APP_ERROR_CHECK(err_code);

    memset(&amp;amp;sec_param, 0, sizeof(ble_gap_sec_params_t));

    // Security parameters to be used for all security procedures.
    sec_param.bond           = SEC_PARAM_BOND;
    sec_param.mitm           = SEC_PARAM_MITM;
    sec_param.lesc           = SEC_PARAM_LESC;
    sec_param.keypress       = SEC_PARAM_KEYPRESS;
    sec_param.io_caps        = SEC_PARAM_IO_CAPABILITIES;
    sec_param.oob            = SEC_PARAM_OOB;
    sec_param.min_key_size   = SEC_PARAM_MIN_KEY_SIZE;
    sec_param.max_key_size   = SEC_PARAM_MAX_KEY_SIZE;
    sec_param.kdist_own.enc  = 0; //no long term key
    sec_param.kdist_own.id   = 0; // no resolvable address irk
    sec_param.kdist_peer.enc = 0; //no long term key
    sec_param.kdist_peer.id  = 0; // no resolvable address irk

    err_code = pm_sec_params_set(&amp;amp;sec_param);
    APP_ERROR_CHECK(err_code);

    err_code = pm_register(pm_evt_handler);
    APP_ERROR_CHECK(err_code);
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Here are the Peer manager parameters :&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;/* ----Security parameters for Peer Manager--------- */
#define SEC_PARAM_BOND                  0                                       /**&amp;lt; No perform bonding. */
#define SEC_PARAM_MITM                  1                                       /**&amp;lt; Man In The Middle protection required for OOB to work */
#define SEC_PARAM_LESC                  0                                       /**&amp;lt; LE Secure Connections not enabled. */
#define SEC_PARAM_KEYPRESS              0                                       /**&amp;lt; Keypress notifications not enabled. */
#define SEC_PARAM_IO_CAPABILITIES       BLE_GAP_IO_CAPS_NONE                    /**&amp;lt; No I/O capabilities. */
#define SEC_PARAM_OOB                   1                                       /**&amp;lt; Out Of Band data available. */ //AKR
#define SEC_PARAM_MIN_KEY_SIZE          7                                       /**&amp;lt; Minimum encryption key size. */
#define SEC_PARAM_MAX_KEY_SIZE          16                                      /**&amp;lt; Maximum encryption key size. */&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;The key is shared when the BLE_GAP_EVT_AUTH_KEY_REQUEST event occurs :&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;        // Upon authentication key request, reply with the preshared key in the device.
        case BLE_GAP_EVT_AUTH_KEY_REQUEST:
        {

            NRF_LOG_INFO(&amp;quot;BLE_GAP_EVT_AUTH_KEY_REQUEST&amp;quot;);

            //Need to obtain the pre shared key sending a request to the host
            /*
            *
            *
            */

            err_code = sd_ble_gap_auth_key_reply(p_ble_evt-&amp;gt;evt.gatts_evt.conn_handle,
                                                 BLE_GAP_AUTH_KEY_TYPE_OOB,
                                                 key_auth);
            APP_ERROR_CHECK(err_code);
        }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;When i switch in bonding mode i change these parameters :&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;sec_param.bond = true;
sec_param.kdist_own.enc = 1;
sec_param.kdist_own.id = 1;
sec_param.kdist_peer.enc = 1;
sec_param.kdist_peer.id = 1;&lt;/pre&gt;&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pair Device with Legacy Connection OOB preshared key, using Android NRF connect</title><link>https://devzone.nordicsemi.com/thread/288811?ContentTypeID=1</link><pubDate>Wed, 13 Jan 2021 07:17:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0e99bf6f-5519-4be6-a1be-fa6647bfcfd4</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Can you provide the log you see in the Android nRFConnect app when you try bonding to the peripheral? We should be able to see an error code of some kind I think. Also, what Android device are you using when seeing this issue?&lt;/p&gt;
&lt;p&gt;Please also provide some information of how the pairing is done in your application.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>