<?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>Struggling to pair with SDK and peripherials.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71283/struggling-to-pair-with-sdk-and-peripherials</link><description>Hi! Recently I have been working with Nordic products, starting with NRF52DK. I want to pair/bond cycling equipment (BLE and ANT+) with NRF52DK. After no success with ANT+ SDK examples I decided to deep into BLE first (ble_app_hrs_c_pca10040_s332). I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 24 Mar 2021 23:21:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71283/struggling-to-pair-with-sdk-and-peripherials" /><item><title>RE: Struggling to pair with SDK and peripherials.</title><link>https://devzone.nordicsemi.com/thread/301784?ContentTypeID=1</link><pubDate>Wed, 24 Mar 2021 23:21:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a3b1e578-42a2-4eb9-8e0e-ab1918a991e8</guid><dc:creator>kronikary</dc:creator><description>&lt;p&gt;fter day of tests I come to conclusion that either I do something wrong while configuring SDK or these cheap Aliexpress sensors (Magene/Kyto) does not support pairing at all. Few posts earlier I said that cycling&amp;amp;cadence sensor pairs well with nRF which is not true. It turns out that it does not allow pairing too.&lt;br /&gt;I have edited RCSC_C SDK example to CSCS_C. Also had to increase PM_FLASH_BUFFERS to 32 and now I get these logs:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;lt;info&amp;gt; app: Starting scan.                                                                 
&amp;lt;info&amp;gt; app: Running Speed and Cadence Service discovered.                                  
&amp;lt;info&amp;gt; peer_manager_handler: Connection security failed: role: Central, conn_handle: 0x0, p
rocedure: Pairing, error: 133                                                              
&amp;lt;warning&amp;gt; peer_manager_handler: Disconnecting conn_handle 0.                               
Speed kmh: 21.5    RPM: 167  Revs: 71  Time: 25369                            
Return ID: FFFF                                                                
&amp;lt;info&amp;gt; app: Disconnected. conn_handle: 0x0, reaso 0x0, reason: 0x16  &lt;/pre&gt;&lt;br /&gt;So it is the same error as with HR belt. I get 0x16 since SDK shuts down connection after failed pairing. When I don&amp;#39;t do that, sensor stays connected and I can collect data.&lt;br /&gt;When I use Bluetooth LE Explorer or TrainerRoad both apps say that pairing was successful, but I can&amp;#39;t tell if it isn&amp;#39;t just connected. For now I don&amp;#39;t have any certified sensors, but maybe someone could test attached code with your own equipment? I would be pleased to see results.&amp;nbsp;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/Sensors_5F00_test.zip"&gt;devzone.nordicsemi.com/.../Sensors_5F00_test.zip&lt;/a&gt;&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ble_5F00_cscs_5F00_c.zip"&gt;devzone.nordicsemi.com/.../ble_5F00_cscs_5F00_c.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Struggling to pair with SDK and peripherials.</title><link>https://devzone.nordicsemi.com/thread/297045?ContentTypeID=1</link><pubDate>Tue, 02 Mar 2021 07:49:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0f6e77c3-d5fe-4c78-8f85-f0b5b894aa03</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;No worries. It&amp;#39;s a bit difficult to say what may be causing the HR belt to disconnect when pairing is enabled, but is it an option to simply disable pairing support (i.e. comment the pm_conn_secure() call again)?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Struggling to pair with SDK and peripherials.</title><link>https://devzone.nordicsemi.com/thread/296711?ContentTypeID=1</link><pubDate>Sun, 28 Feb 2021 19:41:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e47f7e1-f599-4462-8984-348dae417d01</guid><dc:creator>kronikary</dc:creator><description>&lt;p&gt;Sorry for my very late respond, I&amp;#39;ve been playing around with nRF.&lt;br /&gt;Unfortunately after tests I am still not able to sustain pairing with HR. Although I have noticed that sometimes I&amp;nbsp;receive one heart rate value before disconnection - if this somehow helps here.&lt;br /&gt;&lt;br /&gt;Anyway, for now I will develop without HR, and later get some Sniffers. Thank you for your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Struggling to pair with SDK and peripherials.</title><link>https://devzone.nordicsemi.com/thread/293553?ContentTypeID=1</link><pubDate>Tue, 09 Feb 2021 12:45:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a4c6bef-5c5a-4ee4-96f2-caf3652d4e3e</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;I don&amp;#39;t recall seeing any issues similar to this before. Could you try to disable the SEC_PARAM_LESC bit in your app and try to uncomment the&amp;nbsp;&lt;strong&gt;pm_conn_secure&lt;/strong&gt;() line again? Maybe the belt only accepts legacy pairing requests for some reason. You may also want to erase any existing bonds on the device before testing. You can to so be keeping button 3 pressed on boot.&lt;/p&gt;
&lt;p&gt;A couple of Sniffer traces showing the differences between the pairing request sent by the PC app and your central might also give us a clue as to why the pairing gets rejected in your case (&lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Tools/nRF-Sniffer-for-Bluetooth-LE/Download"&gt;nRF Sniffer for Bluetooth LE&lt;/a&gt;).&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Struggling to pair with SDK and peripherials.</title><link>https://devzone.nordicsemi.com/thread/293203?ContentTypeID=1</link><pubDate>Sat, 06 Feb 2021 14:39:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7f43a82-db12-4b5f-8d12-cceb28330041</guid><dc:creator>kronikary</dc:creator><description>&lt;p&gt;Thank you very much!&lt;br /&gt;Commenting&amp;nbsp;&lt;strong&gt;pm_conn_secure()&lt;/strong&gt;&amp;nbsp;in &lt;strong&gt;Heart Rate Collector Handler&lt;/strong&gt;&amp;nbsp;solved my problem, works perfectly. Any thoughts why is that so? Can it be that maybe my belt somehow doesn&amp;#39;t support encryption (pairing/bonding)?&amp;nbsp;My belt is BT4.0.&lt;br /&gt;&lt;br /&gt;EDIT: I have tried pairing my belt with my PC app and it pairs there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Struggling to pair with SDK and peripherials.</title><link>https://devzone.nordicsemi.com/thread/292923?ContentTypeID=1</link><pubDate>Thu, 04 Feb 2021 13:25:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0a511129-facc-4ebe-8b91-65e07d538015</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;1. It looks like the HR peripheral terminates the connection shortly after it has rejected the pairing request, but it&amp;#39;s not clear why it&amp;#39;s rejected and why it disconnects, unfortunately. As a test, could you&amp;nbsp; try to comment the call to&amp;nbsp; &lt;span&gt;&lt;a title="pm_conn_secure" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/group__peer__manager.html?cp=7_1_6_2_16_37#ga46dfaf46c0aa94fc15017d42b3a2e514"&gt;pm_conn_secure&lt;/a&gt;&lt;/span&gt;() in your app to see if the same happens if the central doesn&amp;#39;t initiate pairing? It would also be nice to know if the disconnect occurs if you connect with the nRF connect app on Android or iOS.&lt;/p&gt;
&lt;p&gt;2. It&amp;#39;s possible to set the &lt;span&gt;&lt;a title="Scanning Module" href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_ble_scan.html?cp=7_1_3_2_12"&gt;Scanning Module&lt;/a&gt;&lt;/span&gt; with multiple filters and configure it to only raise the NRF_BLE_SCAN_EVT_FILTER_MATCH event when all filters match. You can also check which filters matched in the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/structnrf__ble__scan__filter__match.html"&gt;nrf_ble_scan_filter_match&lt;/a&gt; event structure passed to NRF_BLE_SCAN_EVT_FILTER_MATCH event.&lt;/p&gt;
&lt;p&gt;3. You can run BLE scanning and ANT rx concurrently. The Softdevice will handle scheduling of radio time for each protocol.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>