<?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>sd_ble_gap_disconnect returns 0x08, BLE_GAP_EVT_DISCONNECTED never arrives, further attempts to disconnect fail, unable to reconnect - advertising stops.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/67031/sd_ble_gap_disconnect-returns-0x08-ble_gap_evt_disconnected-never-arrives-further-attempts-to-disconnect-fail-unable-to-reconnect---advertising-stops</link><description>Hey 
 I am working on nRF51822 SDK12, S130 
 I have encountered a problem when connecting and disconnecting from the device at a fast rate, occasionally comes an event in which the sd_ble_gap_disconnect() command fails (the error received is 0x08.), the</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 21 Oct 2020 06:49:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/67031/sd_ble_gap_disconnect-returns-0x08-ble_gap_evt_disconnected-never-arrives-further-attempts-to-disconnect-fail-unable-to-reconnect---advertising-stops" /><item><title>RE: sd_ble_gap_disconnect returns 0x08, BLE_GAP_EVT_DISCONNECTED never arrives, further attempts to disconnect fail, unable to reconnect - advertising stops.</title><link>https://devzone.nordicsemi.com/thread/276072?ContentTypeID=1</link><pubDate>Wed, 21 Oct 2020 06:49:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5263daea-32fb-4692-9083-e0ef3eb974a1</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;I can&amp;#39;t any issue that may cause the disconnect event does occur, the only thing is that the&amp;nbsp;&lt;span&gt;BLE_GAP_EVT_DISCONNECTED event may be very delayed, e.g. until supervisor timeout occurs on the link. But it should still occur, so if you want us to look into this in more detail I am afraid we need an on-air sniffer log of the situation and/or a way to recreate it here (e.g. you provide firmware for this kits we may run).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;br /&gt;Kenneth&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_gap_disconnect returns 0x08, BLE_GAP_EVT_DISCONNECTED never arrives, further attempts to disconnect fail, unable to reconnect - advertising stops.</title><link>https://devzone.nordicsemi.com/thread/276037?ContentTypeID=1</link><pubDate>Tue, 20 Oct 2020 21:37:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a4a19501-d0b8-4379-a7d5-362692a5b0b5</guid><dc:creator>Ron</dc:creator><description>&lt;p&gt;I am working with S130 V2.0.1&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_gap_disconnect returns 0x08, BLE_GAP_EVT_DISCONNECTED never arrives, further attempts to disconnect fail, unable to reconnect - advertising stops.</title><link>https://devzone.nordicsemi.com/thread/275551?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2020 09:51:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:95be4115-88e6-41a5-8867-bf790313e2b7</guid><dc:creator>Kenneth</dc:creator><description>[quote user="EranR"]Did you check if it possible that there is some issue with the S130 that explains why the disconnection fails, because I don&amp;#39;t want to be coerced to reset the softevice, that is not the greatest solution.[/quote]
&lt;p&gt;I don&amp;#39;t think I received information about which S130 release you are using? Is it v1.0.0, v2.0.0 or v2.0.1?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_gap_disconnect returns 0x08, BLE_GAP_EVT_DISCONNECTED never arrives, further attempts to disconnect fail, unable to reconnect - advertising stops.</title><link>https://devzone.nordicsemi.com/thread/275550?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2020 09:41:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4782b554-deb3-4378-b15b-5b04c4e3ca0e</guid><dc:creator>Ron</dc:creator><description>&lt;p&gt;Hey&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I use channel&amp;nbsp;the RTC1 channel to the ADC via PPI so:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;    uint32_t timer_compare_event_addr = (uint32_t)&amp;amp;NRF_RTC1-&amp;gt;EVENTS_COMPARE[2];
    uint32_t adc_sample_event_addr = nrf_drv_adc_start_task_get();
    err_code = nrf_drv_ppi_channel_alloc(&amp;amp;m_ppi_channel);
    APP_ERROR_CHECK(err_code);
    err_code = nrf_drv_ppi_channel_assign(m_ppi_channel, timer_compare_event_addr, adc_sample_event_addr);  //NRF_ADC-&amp;gt;TASKS_START);
    APP_ERROR_CHECK(err_code);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But as I said&amp;nbsp;it seems the this issue was solved by properly reinitializing the Softdevice BLE configuration after the disabling.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Did you check if it possible that there is some issue with the S130 that explains why the disconnection fails, because I don&amp;#39;t want to be coerced to reset the softevice, that is not the greatest solution.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_gap_disconnect returns 0x08, BLE_GAP_EVT_DISCONNECTED never arrives, further attempts to disconnect fail, unable to reconnect - advertising stops.</title><link>https://devzone.nordicsemi.com/thread/275526?ContentTypeID=1</link><pubDate>Mon, 19 Oct 2020 09:04:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:431fdbee-8ec4-46b8-ad78-41dd262b50cd</guid><dc:creator>Kenneth</dc:creator><description>[quote user="EranR"]I have seen that the reset to the chip does not occur if I do not initialize my ADC-PPI,[/quote]
&lt;p&gt;Hmmm...&amp;nbsp; what PPI channels did you use here? Is it possible that you are somehow blocking interrupts here and/or possible touching PPI channels used by the softdevice?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_gap_disconnect returns 0x08, BLE_GAP_EVT_DISCONNECTED never arrives, further attempts to disconnect fail, unable to reconnect - advertising stops.</title><link>https://devzone.nordicsemi.com/thread/275452?ContentTypeID=1</link><pubDate>Sat, 17 Oct 2020 12:41:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b653b9a5-259c-4592-a4c7-95fa8f7cf988</guid><dc:creator>Ron</dc:creator><description>&lt;p&gt;Hey Kenneth&lt;/p&gt;
&lt;p&gt;An Update regarding the softdevice reset issue, I found out what was missing in my Reinitialization, Now I Reinitialize the softdevice properly and it seems to work, so&amp;nbsp;I just reset the softdevice whenever the disconnect command fails, still, this is not optimal and I would like to know why it fails to begin with (and prevent it ofcourse)&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_gap_disconnect returns 0x08, BLE_GAP_EVT_DISCONNECTED never arrives, further attempts to disconnect fail, unable to reconnect - advertising stops.</title><link>https://devzone.nordicsemi.com/thread/275313?ContentTypeID=1</link><pubDate>Fri, 16 Oct 2020 10:42:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f33dc754-b6ec-4487-b39f-68e195c7a78a</guid><dc:creator>Ron</dc:creator><description>&lt;p&gt;Hi Kenneth&lt;/p&gt;
&lt;p&gt;As I said, I have tried to restart the BLE which seems to cause a chip reset, I have seen that the reset to the chip does not occur if I do not initialize my ADC-PPI,&lt;/p&gt;
&lt;p&gt;I have seen in a different&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/21717/restart-ble-stack-causes-chip-reset"&gt;Thread&lt;/a&gt; a similar issue being raised and the solution was lowering the priority of the ADC interrupt, in my case it is the lowest, so note that does not seem to solve my problem&lt;/p&gt;
&lt;p&gt;Thanks again&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_gap_disconnect returns 0x08, BLE_GAP_EVT_DISCONNECTED never arrives, further attempts to disconnect fail, unable to reconnect - advertising stops.</title><link>https://devzone.nordicsemi.com/thread/275208?ContentTypeID=1</link><pubDate>Thu, 15 Oct 2020 20:10:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99d19627-5c55-4dae-944a-92e76b6a7851</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Which softdevice version is this of the S130? I can check for known issues.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_gap_disconnect returns 0x08, BLE_GAP_EVT_DISCONNECTED never arrives, further attempts to disconnect fail, unable to reconnect - advertising stops.</title><link>https://devzone.nordicsemi.com/thread/275173?ContentTypeID=1</link><pubDate>Thu, 15 Oct 2020 16:09:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6fbb13d7-52a6-4c6b-b15f-cdb3a4919206</guid><dc:creator>Ron</dc:creator><description>&lt;p&gt;Hey Kenneth,&lt;/p&gt;
&lt;p&gt;Unfortunately I don&amp;#39;t receive the disconnect event,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I suspect that I attempt to disconnect manually while the central has turned off (I just turn it off, not disconnecting) in parallel and that causes some kind of problem with the softdevice because I definitely do check for the events before I disconnect on peripheral side.&lt;/p&gt;
&lt;p&gt;The only action that seems to get the peripheral out of this state in which it regards itself as connected while infact isn&amp;#39;t and not advertising is to reset , I would like to reset the softdevice alone, to reset the BLE, is there a way to do this?&lt;/p&gt;
&lt;p&gt;I have tried to&amp;nbsp;call sd_softdevice_disable() and than&amp;nbsp;ble_stack_init() but for some reason after a few seconds I get an error (&amp;quot;softdevice_Fault_handler is called)&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_gap_disconnect returns 0x08, BLE_GAP_EVT_DISCONNECTED never arrives, further attempts to disconnect fail, unable to reconnect - advertising stops.</title><link>https://devzone.nordicsemi.com/thread/274834?ContentTypeID=1</link><pubDate>Wed, 14 Oct 2020 09:18:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:59ee3621-2084-4fce-826d-1c94fc00cb69</guid><dc:creator>Kenneth</dc:creator><description>[quote user="EranR"]The central definitely might disconnects before I have disconnected actively, can it be that the soft-device considered the link to be Disconnected&amp;nbsp;before issuing the event?[/quote]
&lt;p&gt;That may happen yes, you should however receive the disconnect event at some time.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_gap_disconnect returns 0x08, BLE_GAP_EVT_DISCONNECTED never arrives, further attempts to disconnect fail, unable to reconnect - advertising stops.</title><link>https://devzone.nordicsemi.com/thread/274741?ContentTypeID=1</link><pubDate>Tue, 13 Oct 2020 20:40:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cbc9210-fd78-4274-82db-2e88adb99f05</guid><dc:creator>Ron</dc:creator><description>&lt;p&gt;Hey, I also want to note that the conn_handle is 0 when this error occurs.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_gap_disconnect returns 0x08, BLE_GAP_EVT_DISCONNECTED never arrives, further attempts to disconnect fail, unable to reconnect - advertising stops.</title><link>https://devzone.nordicsemi.com/thread/274668?ContentTypeID=1</link><pubDate>Tue, 13 Oct 2020 13:13:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d5dc9594-9ef9-4187-b6db-4374db7c22a6</guid><dc:creator>Ron</dc:creator><description>&lt;p&gt;Hi Kenneth,&lt;/p&gt;
&lt;p&gt;Thanks for your help,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t &lt;span&gt;call&amp;nbsp;&lt;/span&gt;&lt;span&gt;sd_ble_gap_disconnect()&amp;nbsp;after the event BLE_GAP_EVT_DISCONNECTED&amp;nbsp;and I only call&amp;nbsp;sd_ble_gap_disconnect()&amp;nbsp;after&amp;nbsp;BLE_GAP_EVT_CONNECTED, I use a simple &amp;#39;connected&amp;#39; flag which I set at I set at&amp;nbsp;BLE_GAP_EVT_CONNECTED event and reset at&amp;nbsp;BLE_GAP_EVT_DISCONNECTED&amp;nbsp;event,&amp;nbsp;The flag being set is a condition to call&amp;nbsp;sd_ble_gap_disconnect()&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The central definitely might disconnects before I have disconnected actively, can it be that the soft-device considered the link to be Disconnected&amp;nbsp;before issuing the event?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: sd_ble_gap_disconnect returns 0x08, BLE_GAP_EVT_DISCONNECTED never arrives, further attempts to disconnect fail, unable to reconnect - advertising stops.</title><link>https://devzone.nordicsemi.com/thread/274594?ContentTypeID=1</link><pubDate>Tue, 13 Oct 2020 11:41:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21e4fe5a-67a0-45cb-b753-df6a7ec8ce59</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Can you add debugging to ensure that if&amp;nbsp;&lt;span&gt;BLE_GAP_EVT_DISCONNECTED&amp;nbsp;event occurs for instance before&amp;nbsp;sd_ble_gap_disconnect() is called, then it is handled already. Error code 8 means:&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;table&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td colspan="1" rowspan="1"&gt;
&lt;p&gt;Disconnection in progress or link has not been established.&lt;/p&gt;
&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;So either you have already disconnected (&lt;span&gt;BLE_GAP_EVT_DISCONNECTED already occurred), or that you are calling&amp;nbsp;sd_ble_gap_disconnect() before&amp;nbsp;BLE_GAP_EVT_CONNECTED event has occurred. I can&amp;#39;t really think of any other suggestion as long as the conn_handle is valid.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;br /&gt;Kenneth&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>