<?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>Discovery timeout in BLE Central Example Code</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/27233/discovery-timeout-in-ble-central-example-code</link><description>Hi,
I have taken the BLE Central Example code (ble_app_uart_c)in one nRF51822 hardware and in the other nRF51822 hardware, I have taken the BLE Peripheral Example(ble_app_uart) code. I made changes in the central code such that whenever a button is pressed</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Nov 2017 18:30:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/27233/discovery-timeout-in-ble-central-example-code" /><item><title>RE: Discovery timeout in BLE Central Example Code</title><link>https://devzone.nordicsemi.com/thread/107455?ContentTypeID=1</link><pubDate>Tue, 21 Nov 2017 18:30:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:deb5ef72-ce1c-41f1-958d-c3f162242f4d</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;You can check p_ble_evt-&amp;gt;evt.gap_evt.params.disconnected.reason when you get BLE_GAP_EVT_DISCONNECTED.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discovery timeout in BLE Central Example Code</title><link>https://devzone.nordicsemi.com/thread/107454?ContentTypeID=1</link><pubDate>Tue, 21 Nov 2017 02:29:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68fad821-9a8c-4bdc-865e-33164acaf119</guid><dc:creator>nordicdev</dc:creator><description>&lt;p&gt;Hi Petter Myhre, thanks for the reply. I didnt know what caused the disconnected event - do you recommend any way to check that? Before the short press of the button the nrf51 runs in peripheral mode. After the short button press, the nRF51 reboots into central mode and scans and connects to peripheral if uuid matches. I run the example code of ble_central and ble_peripheral_uart. In the central code, I disabled all the places where start_scan is called, except for the first time. So, the central code basically scans only once upon boot up.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Discovery timeout in BLE Central Example Code</title><link>https://devzone.nordicsemi.com/thread/107456?ContentTypeID=1</link><pubDate>Mon, 13 Nov 2017 12:58:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b709ee7e-40da-4897-bac0-7973c03228aa</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;You get a BLE_GAP_EVT_DISCONNECTED event in the central application? Have you checked the reason the struct? So what does short presses of the button do? What code do you run? Is it okay to run this code if you are already scanning?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>