<?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>error 7 after ble_db_discovery_start</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/53856/error-7-after-ble_db_discovery_start</link><description>Hi, 
 I am using SDK15.3 and nrf52832. I am using multilink central example to connect to my peripheral device. I have one peripheral and one central device. 
 As soon as I connect to the peripheral device I call ble_db_discovery_start(). This returns</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 04 Nov 2019 12:27:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/53856/error-7-after-ble_db_discovery_start" /><item><title>RE: error 7 after ble_db_discovery_start</title><link>https://devzone.nordicsemi.com/thread/218198?ContentTypeID=1</link><pubDate>Mon, 04 Nov 2019 12:27:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:29524077-c7ee-4525-8a45-be1d19caf4dc</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Ashish,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Glad that you found the issue. Besides the UART example you can also have a look at the ble_app_blinky_c and the ble_app_hrs_c example.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: error 7 after ble_db_discovery_start</title><link>https://devzone.nordicsemi.com/thread/218014?ContentTypeID=1</link><pubDate>Fri, 01 Nov 2019 17:03:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5117492-ed12-4dcf-904d-d1cd01d0f428</guid><dc:creator>ashish13</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I think I found out why it was giving me error. I had forgotten to include battery services on the central side.&lt;/p&gt;
&lt;p&gt;Once I included it, the code works fine. Thank you for your help.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Also can you point me to example code other than UART for sending data from central to peripheral and vice versa.&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;Ashish&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: error 7 after ble_db_discovery_start</title><link>https://devzone.nordicsemi.com/thread/217965?ContentTypeID=1</link><pubDate>Fri, 01 Nov 2019 13:02:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a65236ab-3cd6-4814-b1d4-c59bab304f49</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Ashish,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Andreas has left Nordic, I&amp;#39;m taking over his case.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You are right, most likely the error 7 returned by&amp;nbsp;sd_ble_gattc_primary_services_discover() . We need to update&amp;nbsp;ble_db_discovery_start() description.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;We need to have a look at the parameters you provided to&amp;nbsp;&lt;span&gt;sd_ble_gattc_primary_services_discover(). Could you add a breakpoint and check the value ?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: error 7 after ble_db_discovery_start</title><link>https://devzone.nordicsemi.com/thread/217792?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2019 14:06:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ec6193fe-97dc-40d3-a2dc-cbb111c75414</guid><dc:creator>ashish13</dc:creator><description>&lt;p&gt;Thank you for the prompt response.&lt;/p&gt;
&lt;p&gt;Yes that&amp;#39;s the error code I get. I print out the error code after a call to ble_db_discovery_start&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;case BLE_GAP_EVT_CONNECTED:
        {
            NRF_LOG_INFO(&amp;quot;Connection 0x%x established, starting DB discovery.&amp;quot;,
                         p_gap_evt-&amp;gt;conn_handle);

            APP_ERROR_CHECK_BOOL(p_gap_evt-&amp;gt;conn_handle &amp;lt; NRF_SDH_BLE_CENTRAL_LINK_COUNT);

            err_code = ble_trs_c_handles_assign(&amp;amp;m_trs_c[p_gap_evt-&amp;gt;conn_handle],
                                               p_gap_evt-&amp;gt;conn_handle,NULL);
            APP_ERROR_CHECK(err_code);
			
			memcpy(p_addr.addr, p_ble_evt-&amp;gt;evt.gap_evt.params.connected.peer_addr.addr, 6);
			//generate_key(p_addr.addr);

			//memset(&amp;amp;m_db_disc, 0x00, sizeof(m_db_disc));
			memset(&amp;amp;m_db_disc[p_gap_evt-&amp;gt;conn_handle], 0x00, sizeof(ble_db_discovery_t));
			
            err_code = ble_db_discovery_start(&amp;amp;m_db_disc[p_gap_evt-&amp;gt;conn_handle],
                                              p_gap_evt-&amp;gt;conn_handle);
											  
			NRF_LOG_INFO(&amp;quot; Error %x&amp;quot;, err_code);
            if (err_code != NRF_ERROR_BUSY)
            {
                APP_ERROR_CHECK(err_code);
            }
			
            // Update LEDs status and check whether it is needed to look for more
            // peripherals to connect to.
            //bsp_board_led_on(CENTRAL_CONNECTED_LED);
            if (ble_conn_state_central_conn_count() == NRF_SDH_BLE_CENTRAL_LINK_COUNT)
            {
                //bsp_board_led_off(CENTRAL_SCANNING_LED);
            }
            else
            {
                // Resume scanning.
                //bsp_board_led_on(CENTRAL_SCANNING_LED);
                //scan_start();
            }
			//scan_start();
			
			#ifdef CBLE_Add_Debug_Device
					uint8_t Conn_count = 0;
					Conn_count = ble_conn_state_central_conn_count();
					SEGGER_RTT_printf(0, &amp;quot;Connected %d to %02x%02x%02x%02x%02x%02x&amp;quot; RTT_CTRL_RESET&amp;quot;\n&amp;quot;, Conn_count, p_addr.addr[5],
												p_addr.addr[4], p_addr.addr[3], p_addr.addr[2], p_addr.addr[1],p_addr.addr[0]);
			#endif
        } break; // BLE_GAP_EVT_CONNECTED&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I further investigated the issues and it seems the error happens after a call to&amp;nbsp;sd_ble_gattc_primary_services_discover.&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;Ashish&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: error 7 after ble_db_discovery_start</title><link>https://devzone.nordicsemi.com/thread/217678?ContentTypeID=1</link><pubDate>Thu, 31 Oct 2019 07:52:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1d65c5b-6584-4dde-827f-5fc6ea6e8cff</guid><dc:creator>AndreasF</dc:creator><description>&lt;p&gt;Hi.&lt;/p&gt;
&lt;p&gt;Are you absolutely sure that it returns error 7? It should not be able to return error 7, only error 14, 8, 17, and 0.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/598x245/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-6c996ed8d7ea4eabac8dc4034a7e189c/pastedimage1572508340571v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;Could you please confirm this?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Andreas&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>