<?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>BLE UART simple authentication after connection made and disconnect if not passed, not pairing</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/38463/ble-uart-simple-authentication-after-connection-made-and-disconnect-if-not-passed-not-pairing</link><description>Hi All, I am working on a problem for last 2 days and cannot find a solution, I tried everything and read many posts from others however nothing worked so far, either it seems that this specific problem have not been discussed enough or some samples that</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 18 Sep 2018 10:19:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/38463/ble-uart-simple-authentication-after-connection-made-and-disconnect-if-not-passed-not-pairing" /><item><title>RE: BLE UART simple authentication after connection made and disconnect if not passed, not pairing</title><link>https://devzone.nordicsemi.com/thread/149191?ContentTypeID=1</link><pubDate>Tue, 18 Sep 2018 10:19:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:90bca438-5853-4027-850e-cf4d12f5174d</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;I see. It shouldn&amp;#39;t be too difficult setting up a timer. Just remember to change from TIMER0 to one of the other timers if you copy from one of the example\peripheral\ examples, since the softdevice uses TIMER0.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE UART simple authentication after connection made and disconnect if not passed, not pairing</title><link>https://devzone.nordicsemi.com/thread/149082?ContentTypeID=1</link><pubDate>Mon, 17 Sep 2018 14:36:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2daee7c-7c4b-4f41-aba6-b040fb57ff4e</guid><dc:creator>Alex</dc:creator><description>&lt;p&gt;Thank you for helping out, what I ended up doing&amp;nbsp;is actually incrementing counter variable&amp;nbsp;in each time program hits it and measuring how many times CPU hits it in 1 seconds or so, since precise timing is not that important at this moment but rather just have general delay. That worked for now,&amp;nbsp;I am going to revisit using timers attempt in couple days.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE UART simple authentication after connection made and disconnect if not passed, not pairing</title><link>https://devzone.nordicsemi.com/thread/148604?ContentTypeID=1</link><pubDate>Thu, 13 Sep 2018 11:53:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:efc12fb0-307d-4436-ba8a-43d8012eaa41</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Can you please describe what happens when you try to add the timer? Do you get an error somewhere? Does it start advertising? Does the timer start, and do you get a timeout, or none of the above?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;A typical scenario is that the peripheral examples uses the TIMER0 instance. That works well on it&amp;#39;s own, but when you blend the SoftDevice into it to enable BLE, the TIMER0 is reserved for the softdevice, and it will cause an error.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Check your APP_ERROR_CHECK(err_code) calls. If any of them receive an err_code != 0, then the application will restart. I see that you use nRF51. What SDK do you use? SDK12.3.0?&lt;/p&gt;
&lt;p&gt;Try to define DEBUG in your preprocessor defines, and set a breakpoint in the app_error_handler in app_error.c. If the application stops there, then you can get a pointer to which APP_ERROR_HANDLER that received the err_code != 0.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;This being said, what you are trying to implement sounds pretty much like what pairing is already doing. It is ok to do what you describe, and if protecting your data is not important, you should be fine. But if a user does not write the passcode if the peripheral requires it, it will automatically disconnect, and start advertising again.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Even if a device is bonded, it is still possible to disable the whitelist during advertising, so that any device can connect to it. This is typically used in Bluetooth devices. The first time you connect to a device, you press a button with the bluetooth logo, and then you will find it. The next time, you can usually connect to it without pressing the button, because they are already paired.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>