<?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>Some custom characteristic cannot be found</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80146/some-custom-characteristic-cannot-be-found</link><description>I am trying to using nRF52833 and nRF52840 as a BLE central to connect customer&amp;#39;s BLE peripheral. 
 The attached screenshot is the service discovered by nRF connect Android App. 
 
 
 There are two characteristics in the service dc03900d-7c54-44fa-bca6</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 05 Oct 2021 11:04:06 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80146/some-custom-characteristic-cannot-be-found" /><item><title>RE: Some custom characteristic cannot be found</title><link>https://devzone.nordicsemi.com/thread/332582?ContentTypeID=1</link><pubDate>Tue, 05 Oct 2021 11:04:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:993dcbff-be25-4f0f-bfe1-545fbe4e84ba</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="jorenaku"]But since I’m not so familiar with BLE spec, I’m not sure if this modify may cause any other side effect.&lt;br /&gt;Could you help double confirm this solution for me?[/quote]
&lt;p&gt;I do not immediately see that it is a problem, but I also am not sure why you need to do this. I am wondering if the problem here is how you configure the discovery module rather than the discovery module itself. Can you share your code so that I see how you have done this? (please du not use images but rather share the code as text using either Insert -&amp;gt; Image/Video/File or by copy pasting into Insert -&amp;gt; Code, as that makes it easier to read and search.)&lt;/p&gt;
[quote user="jorenaku"]And according to the BLE spec, should the characteristic discovery should found the next attribute value or next characteristic value?&amp;nbsp;[/quote]
&lt;p&gt;I am not sure what you refer to by attribute value in this context? Everything are attributes, both services, characteristics and descriptors. But there is a hierarchy, so you will have services, and under each service you have one or more characteristics, which has zero or more descriptors. And that is the order you will discover them as well. See &lt;a href="https://www.bluetooth.com/blog/a-developers-guide-to-bluetooth/"&gt;A Developer’s Guide To Bluetooth&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Some custom characteristic cannot be found</title><link>https://devzone.nordicsemi.com/thread/332248?ContentTypeID=1</link><pubDate>Mon, 04 Oct 2021 07:46:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad581f6d-d06e-4c24-883e-ffcd3e81c701</guid><dc:creator>jorenaku</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ve recorded 2 sniffer log, one is using NRF52833, another one is using Android phone.&lt;/p&gt;
&lt;p&gt;In the 1&lt;sup&gt;st&lt;/sup&gt; log (NORF52833),&amp;nbsp;the fist found characteristic has Attribute handle 0x0028, Characteristic handle 0x002a.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/030503.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;And ble_db_discovery.c will received characteristic with handle_value 0x2A, and handle_decl 0x28&lt;/p&gt;
&lt;p&gt;And the next characteristic discovery will from handle_value +1, so it start with 2B,&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/7444.png" /&gt;&lt;/p&gt;
&lt;p&gt;and then got no attribute response.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/3704.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;In Android sniffer log, after android found the 1&lt;sup&gt;st&lt;/sup&gt; characteristic with Attribute handle 0x0028, Characteristic handle 0x002a. It start 2&lt;sup&gt;nd&lt;/sup&gt; characteristic discovery start from 0x0029 instead of 0x2B&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/android_5F00_1.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So it can find the 2&lt;/span&gt;&lt;sup&gt;nd&lt;/sup&gt;&lt;span&gt;&amp;nbsp;characteristic with attribute handle 0x0029, Characteristic 0x0029.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/Android_5F00_2.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Then I tried to change the ble_db_discovery.c, update the next discovery start to from handle_value +1 to handle_decl +1&lt;/p&gt;
&lt;p&gt;And then NRF52833 could found the 2&lt;sup&gt;nd&lt;/sup&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;characteristic now.&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/ble_5F00_db_5F00_disc_5F00_1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/ble_5F00_db_5F00_disc_5F00_2.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But since I&amp;rsquo;m not so familiar with BLE spec, I&amp;rsquo;m not sure if this modify may cause any other side effect.&lt;br /&gt;Could you help double confirm this solution for me? &lt;br /&gt;And according to the BLE spec, should the characteristic discovery should found the next attribute value or next characteristic value?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks a lot,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Some custom characteristic cannot be found</title><link>https://devzone.nordicsemi.com/thread/332074?ContentTypeID=1</link><pubDate>Fri, 01 Oct 2021 08:15:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:357d7fa6-64df-4df7-9db1-ce773b600606</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The log is interesting. Error 266 is BLE_GATT_STATUS_ATTERR_ATTRIBUTE_NOT_FOUND and that indicates that the error could be on the peripheral side.&amp;nbsp;Is that a Nordic product? Do you have access to the peripheral code, even though you did not develop it? Or do you know anything about it? It could be that a sniffer trace would be&amp;nbsp;interesting here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Some custom characteristic cannot be found</title><link>https://devzone.nordicsemi.com/thread/332039?ContentTypeID=1</link><pubDate>Fri, 01 Oct 2021 02:14:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c49f42fb-1698-462f-8a68-0a8bbc45742e</guid><dc:creator>jorenaku</dc:creator><description>&lt;p&gt;Is there any reason that may cause the 2nd characteristic cannot be correctly discovered by the nRF52840?&lt;/p&gt;
&lt;p&gt;The 1st descriptor of the 2nd characteristic has custom UUID, and I found the UUID is the same as the 1st characteristic.&lt;/p&gt;
&lt;p&gt;Since I&amp;#39;m not so familiar to BLE spec,&amp;nbsp;could custom descriptor and custom characteristic has the same UUID?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;But why Android App can discovery the 2nd characteristic.&lt;/p&gt;
&lt;p&gt;Because the &lt;span&gt;peripheral is provided by our customer, so if it&amp;#39;s a&amp;nbsp;restrictions from the spec. &lt;br /&gt;Could you help to provide where could I find the restrictions from the spec.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks a lot,&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Some custom characteristic cannot be found</title><link>https://devzone.nordicsemi.com/thread/332038?ContentTypeID=1</link><pubDate>Fri, 01 Oct 2021 01:59:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bc820e0f-c34f-4cf7-a069-8878baceb282</guid><dc:creator>jorenaku</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I think it&amp;#39;s not the issue of the ble_app_interactive example.&lt;/p&gt;
&lt;p&gt;Because later, I used a ble central example, and change the client UUID to the custom&amp;nbsp;service.&lt;br /&gt; This example using the ble_db_discovery to find the services and characteristics.&lt;br /&gt; The result is same, ble_db_discovery fond the service 900D with only one characteristic. The debug log as follow:&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;color:#0000ff;"&gt;&amp;lt;info&amp;gt; app: @@~ Central connected&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;color:#0000ff;"&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: Registering connection handle: 0x0000&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;color:#0000ff;"&gt;&amp;lt;debug&amp;gt; ble_db_disc: Starting discovery of service with UUID 0x900D on connection handle 0x0.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;color:#0000ff;"&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: Adding item to the request queue&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;color:#0000ff;"&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: GATTC Primary Services Discovery Request&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;color:#0000ff;"&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: SD is currently busy. The GATT request procedure will be attempted&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; again later.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;color:#0000ff;"&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: Processing the request queue...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;color:#0000ff;"&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: GATTC Primary Service Discovery Request&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;color:#0000ff;"&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: SD is currently busy. The GATT request procedure will be attempted&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; again later.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&amp;lt;info&amp;gt; ble_db_disc: on_characteristic_discovery_rsp: @@~ num_chars_curr_disc=1&lt;br /&gt;&lt;/span&gt;　　=&amp;gt;This log I added is to check when the 1&lt;sup&gt;st&lt;/sup&gt; characteristic was discovered, so we can see that ble_db_discovery has send second characteristic discovery request later&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: Adding item to the request queue&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;info&amp;gt; nrf_ble_gq: GATTC Characteristic Discovery Request&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: SD GATT procedure (3) succeeded on connection handle: 0.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: Processing the request queue...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;color:#ff0000;"&gt;&amp;lt;info&amp;gt; ble_db_disc: on_characteristic_discovery_rsp: @@~ no characteristic status=266&lt;br /&gt;&lt;/span&gt;　&amp;nbsp; &amp;nbsp; =&amp;gt;This log I added is to check the status code in the characteristic_discovery_rsp function, since it&amp;rsquo;s not success result, so ble_db_discovery find the&amp;nbsp;CCCD and then find the next service later.&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: Adding item to the &lt;span style="background-color:#ffffff;"&gt;request&lt;/span&gt; queue&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: GATTC Characteristic Descriptor Request&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: SD GATT procedure (4) succeeded on connection handle: 0.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;debug&amp;gt; nrf_ble_gq: Processing the request queue...&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#0000ff;"&gt;&amp;lt;debug&amp;gt; ble_db_disc: Discovery of service with UUID 0x900D completed with success on connection handle 0x0.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&amp;lt;info&amp;gt; app: uuid:900D&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&amp;lt;info&amp;gt; app: type:5&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&amp;lt;info&amp;gt; ble_cust_c: count:1&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&amp;lt;info&amp;gt; ble_cust _c: uuid:CFA5&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="color:#ff0000;"&gt;&amp;lt;info&amp;gt; ble_cust_c: type:3&lt;br /&gt;&lt;/span&gt;=&amp;gt; These&amp;nbsp;logs I added is when my db_disc_handler received the BLE_DB_DISCOVERY_COMPLETE. &lt;br /&gt; the service 900D only found 1 Characteristic (UUID = CFA5)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As the above log, it seems the 2nd characteristic request has been send after the 1st char response. &lt;br /&gt;But received the status 266. &lt;br /&gt;Attached the screenshot, where the log I added in &lt;span&gt;on_characteristic_discovery_rsp function of&amp;nbsp;ble_db_discovery.c :&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/2004x544/__key/communityserver-discussions-components-files/4/2146.screenshot.PNG" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Some custom characteristic cannot be found</title><link>https://devzone.nordicsemi.com/thread/331908?ContentTypeID=1</link><pubDate>Thu, 30 Sep 2021 11:43:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07ec733c-0d5b-48e8-9fd1-680726eb3abe</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;This looks related to issues in the&amp;nbsp;ble_app_interactive example described in &lt;a href="https://devzone.nordicsemi.com/support-private/support/236707"&gt;this thread&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>