<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>MCUXpresso SDKのトピックRe: Characteristic cannot be found by GattDb_FindCharValue</title>
    <link>https://community.nxp.com/t5/MCUXpresso-SDK/Characteristic-cannot-be-found-by-GattDb-FindCharValue/m-p/765230#M703</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Petr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some comments about your service declaration:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco, monospace; font-size: 13px;"&gt;PRIMARY_SERVICE_UUID128(service_r, &lt;STRONG&gt;uuid_service&lt;/STRONG&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace; font-size: 13px;"&gt; &amp;nbsp; &amp;nbsp;CHARACTERISTIC_UUID128(char_device_name, &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;uuid_service&lt;/STRONG&gt;,&lt;/SPAN&gt; (gGattCharPropRead_c) )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace; font-size: 13px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VALUE_UUID128(value_device_name, &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;uuid_service_ring&lt;/STRONG&gt;&lt;/SPAN&gt;, (gPermissionFlagReadable_c), 6, "cust0")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace; font-size: 13px;"&gt; &amp;nbsp; &amp;nbsp;CHARACTERISTIC_UUID128(char_data, uuid_datachar, (gGattCharPropRead_c | gGattCharPropNotify_c))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco, monospace; font-size: 13px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VALUE_UUID128(value_data, uuid_datachar, (gPermissionFlagReadable_c),20, 0x00)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your first characteristic has the same UUID as the service and it must have it's own UUID128 as the second characteristic and the&amp;nbsp;uuid_service_ring is missing from &lt;STRONG style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: bold;"&gt;gatt_uuid128.h&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About your code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;&lt;SPAN style="font-family: terminal, monaco, monospace; font-size: 13px;"&gt;result = GattDb_FindCharValueHandleInService(serviceConfig-&amp;gt;serviceHandle, gBleUuidType128_c, &amp;amp;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;uuidsService&lt;/STRONG&gt;&lt;/SPAN&gt;, &amp;amp;handle);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;&lt;SPAN style="font-family: terminal, monaco, monospace; font-size: 13px;"&gt;result |= GattDb_FindCharValueHandleInService(serviceConfig-&amp;gt;serviceHandle, gBleUuidType128_c, &amp;amp;&lt;STRONG&gt;uuidDataChar&lt;/STRONG&gt;, &amp;amp;handle);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;What is the purpose of the first function? The function is for finding Characteristic handles and you are looking for a service UUID.&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;In the second function, the UUID is in reverse order compared to the one declared in&amp;nbsp;&lt;STRONG style="background-color: #ffffff; border: 0px; font-weight: bold;"&gt;gatt_uuid128.h&lt;/STRONG&gt;, so this might be the reason that the&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;"Characterstic not found" result is being returned.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;For more information on creating a custom GATT database, refer to the chapter&amp;nbsp;&lt;STRONG&gt;7.1 Creating static GATT database&lt;/STRONG&gt; from the&amp;nbsp;"&lt;EM&gt;..\SDK_2.2_MKW41Z512xxx4\docs\wireless\Bluetooth\&lt;STRONG&gt;BLE Application Developer's Guide.pdf&lt;/STRONG&gt;&lt;/EM&gt;" document.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Let me know your findings or if you have any question.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Gerardo&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jun 2018 20:58:08 GMT</pubDate>
    <dc:creator>gerardo_rodriguez</dc:creator>
    <dc:date>2018-06-18T20:58:08Z</dc:date>
    <item>
      <title>Characteristic cannot be found by GattDb_FindCharValue</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Characteristic-cannot-be-found-by-GattDb-FindCharValue/m-p/765229#M702</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I create a BLE application with specific UUID128 for a service &amp;amp; charactersistics.&lt;/P&gt;&lt;P&gt;My &lt;STRONG&gt;gatt_uuid128.h&lt;/STRONG&gt; file looks like this&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;UUID128(uuid_service, 0x19, 0xB1, 0x00, 0x00, 0xE8, 0xF2, 0x53, 0x7E, 0x4F, 0x6C, 0xD1, 0x04, 0x76, 0x8A, 0x12, 0x14)&lt;/P&gt;&lt;P&gt;UUID128(uuid_datachar,0x14, 0x12, 0x8a, 0x76, 0x04, 0xd1, 0x6c, 0x4f, 0x7e, 0x53, 0xf2, 0xe8, 0x05, 0x00, 0xb1, 0x1)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;My &lt;STRONG&gt;gatt_db.h&lt;/STRONG&gt; file looks like this&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;PRIMARY_SERVICE_UUID128(service_r, uuid_service)&lt;BR /&gt; CHARACTERISTIC_UUID128(char_device_name, uuid_service, (gGattCharPropRead_c) )&lt;BR /&gt; VALUE_UUID128(value_device_name, uuid_service_ring, (gPermissionFlagReadable_c), 6, "cust0")&lt;BR /&gt; CHARACTERISTIC_UUID128(char_data, uuid_datachar, (gGattCharPropRead_c | gGattCharPropNotify_c))&lt;BR /&gt; VALUE_UUID128(value_data, uuid_datachar, (gPermissionFlagReadable_c),20, 0x00)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Then, in the function of a service start in custom_service.c file in a "bluetooth-&amp;gt;profiles" directory I have such code.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;uint8_t uuid_s_Array[] = {0x19, 0xB1, 0x00, 0x00, 0xE8, 0xF2, 0x53, 0x7E, 0x4F, 0x6C, 0xD1, 0x04, 0x76, 0x8A, 0x12, 0x14};&lt;BR /&gt;uint8_t uuid_data_Array[] = { 0x1, 0xb1, 0x00, 0x05, 0xe8, 0xf2, 0x53, 0x7e, 0x4f, 0x6c, 0xd1, 0x04, 0x76, 0x8a, 0x12, 0x14};&lt;/P&gt;&lt;P&gt;bleUuid_t uuidsService;&lt;BR /&gt; memcpy(uuidsService.uuid128,uuid_s_Array, 16);&lt;BR /&gt; bleUuid_t uuidDataChar;&lt;BR /&gt; memcpy(uuidDataChar.uuid128, uuid_data_Array, 16);&lt;/P&gt;&lt;P&gt;result = GattDb_FindCharValueHandleInService(serviceConfig-&amp;gt;serviceHandle, gBleUuidType128_c, &amp;amp;uuidsService, &amp;amp;handle);&lt;/P&gt;&lt;P&gt;result |= GattDb_FindCharValueHandleInService(serviceConfig-&amp;gt;serviceHandle, gBleUuidType128_c, &amp;amp;uuidDataChar, &amp;amp;handle);&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;For the first result, I have 0x00 a.k.a success return value, but the second one gives me 0x902 which goes for "Characterstic not found". How can I sort it out? I am running KSDK 2.0 on a KW41Z board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Petr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Jun 2018 14:01:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Characteristic-cannot-be-found-by-GattDb-FindCharValue/m-p/765229#M702</guid>
      <dc:creator>ppz</dc:creator>
      <dc:date>2018-06-08T14:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: Characteristic cannot be found by GattDb_FindCharValue</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Characteristic-cannot-be-found-by-GattDb-FindCharValue/m-p/765230#M703</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Petr,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some comments about your service declaration:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco, monospace; font-size: 13px;"&gt;PRIMARY_SERVICE_UUID128(service_r, &lt;STRONG&gt;uuid_service&lt;/STRONG&gt;)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace; font-size: 13px;"&gt; &amp;nbsp; &amp;nbsp;CHARACTERISTIC_UUID128(char_device_name, &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;uuid_service&lt;/STRONG&gt;,&lt;/SPAN&gt; (gGattCharPropRead_c) )&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace; font-size: 13px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VALUE_UUID128(value_device_name, &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;uuid_service_ring&lt;/STRONG&gt;&lt;/SPAN&gt;, (gPermissionFlagReadable_c), 6, "cust0")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: terminal, monaco, monospace; font-size: 13px;"&gt; &amp;nbsp; &amp;nbsp;CHARACTERISTIC_UUID128(char_data, uuid_datachar, (gGattCharPropRead_c | gGattCharPropNotify_c))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: terminal, monaco, monospace; font-size: 13px;"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; VALUE_UUID128(value_data, uuid_datachar, (gPermissionFlagReadable_c),20, 0x00)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your first characteristic has the same UUID as the service and it must have it's own UUID128 as the second characteristic and the&amp;nbsp;uuid_service_ring is missing from &lt;STRONG style="color: #51626f; background-color: #ffffff; border: 0px; font-weight: bold;"&gt;gatt_uuid128.h&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;About your code:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;&lt;SPAN style="font-family: terminal, monaco, monospace; font-size: 13px;"&gt;result = GattDb_FindCharValueHandleInService(serviceConfig-&amp;gt;serviceHandle, gBleUuidType128_c, &amp;amp;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;uuidsService&lt;/STRONG&gt;&lt;/SPAN&gt;, &amp;amp;handle);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;&lt;SPAN style="font-family: terminal, monaco, monospace; font-size: 13px;"&gt;result |= GattDb_FindCharValueHandleInService(serviceConfig-&amp;gt;serviceHandle, gBleUuidType128_c, &amp;amp;&lt;STRONG&gt;uuidDataChar&lt;/STRONG&gt;, &amp;amp;handle);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;What is the purpose of the first function? The function is for finding Characteristic handles and you are looking for a service UUID.&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;In the second function, the UUID is in reverse order compared to the one declared in&amp;nbsp;&lt;STRONG style="background-color: #ffffff; border: 0px; font-weight: bold;"&gt;gatt_uuid128.h&lt;/STRONG&gt;, so this might be the reason that the&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;"Characterstic not found" result is being returned.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;For more information on creating a custom GATT database, refer to the chapter&amp;nbsp;&lt;STRONG&gt;7.1 Creating static GATT database&lt;/STRONG&gt; from the&amp;nbsp;"&lt;EM&gt;..\SDK_2.2_MKW41Z512xxx4\docs\wireless\Bluetooth\&lt;STRONG&gt;BLE Application Developer's Guide.pdf&lt;/STRONG&gt;&lt;/EM&gt;" document.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Let me know your findings or if you have any question.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Gerardo&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2018 20:58:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Characteristic-cannot-be-found-by-GattDb-FindCharValue/m-p/765230#M703</guid>
      <dc:creator>gerardo_rodriguez</dc:creator>
      <dc:date>2018-06-18T20:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Characteristic cannot be found by GattDb_FindCharValue</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/Characteristic-cannot-be-found-by-GattDb-FindCharValue/m-p/765231#M704</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;It is looked like you were right about both of the things, both of them were fixed and the code worked. Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 30 Jun 2018 12:21:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/Characteristic-cannot-be-found-by-GattDb-FindCharValue/m-p/765231#M704</guid>
      <dc:creator>ppz</dc:creator>
      <dc:date>2018-06-30T12:21:00Z</dc:date>
    </item>
  </channel>
</rss>

