<?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>topic BLE finding correct handle ID  in MCUXpresso SDK</title>
    <link>https://community.nxp.com/t5/MCUXpresso-SDK/BLE-finding-correct-handle-ID/m-p/1081763#M2619</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using QN908x BLE SDK.&lt;/P&gt;&lt;P&gt;How can I find the &lt;STRONG&gt;handle_id&lt;/STRONG&gt; for given attribute the simplest way on the connected BLE device?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like &lt;STRONG&gt;get_handle id for: service_hex/attribute_hex&amp;nbsp;path&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Or can I hard code handle ID, is it same for a BLE profile across iphone/android?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The longest and only way I found was:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;gatt discover 0 -all&lt;/STRONG&gt;&amp;nbsp; &amp;nbsp;// uses&amp;nbsp;GattClient_DiscoverAllPrimaryServices&lt;BR /&gt;--&amp;gt; Discovered primary services: 3&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; --&amp;gt; Generic Attribute Start Handle: 1 End Handle: 5&lt;BR /&gt;&amp;nbsp; - Service Changed Value Handle: 3&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; --&amp;gt; Generic Access Start Handle: 20 End Handle: 28&lt;BR /&gt;&amp;nbsp; - Device Name Value Handle: 22&lt;BR /&gt;&amp;nbsp; - Appearance Value Handle: 24&lt;BR /&gt;&amp;nbsp; - Central Address Resolution Value Handle: 26&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; --&amp;gt; User Data Start Handle: 40 End Handle: 65535&lt;BR /&gt;&amp;nbsp; - Serial Number String Value Handle: 42&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt; &amp;lt;---- I'm looking for this number&amp;nbsp; &amp;nbsp;&lt;/STRONG&gt; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;gatt discover 0 -service service_hex&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt; Discovered primary services: 1&lt;/P&gt;&lt;P&gt;--&amp;gt; User Data Start Handle: 40 End Handle: 65535&amp;nbsp; &lt;STRONG&gt;&amp;nbsp;---&amp;gt; misses 42&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Can I use the absolute address of&amp;nbsp;&lt;/STRONG&gt;&lt;STRONG&gt;uuid to read out its value (with GattClient_ReadCharacteristicValue)? &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What's the point of the&amp;nbsp;uuid&lt;SPAN&gt;&amp;nbsp;if not?&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Jul 2020 16:21:37 GMT</pubDate>
    <dc:creator>arpad_toth</dc:creator>
    <dc:date>2020-07-09T16:21:37Z</dc:date>
    <item>
      <title>BLE finding correct handle ID</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/BLE-finding-correct-handle-ID/m-p/1081763#M2619</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using QN908x BLE SDK.&lt;/P&gt;&lt;P&gt;How can I find the &lt;STRONG&gt;handle_id&lt;/STRONG&gt; for given attribute the simplest way on the connected BLE device?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like &lt;STRONG&gt;get_handle id for: service_hex/attribute_hex&amp;nbsp;path&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Or can I hard code handle ID, is it same for a BLE profile across iphone/android?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The longest and only way I found was:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;gatt discover 0 -all&lt;/STRONG&gt;&amp;nbsp; &amp;nbsp;// uses&amp;nbsp;GattClient_DiscoverAllPrimaryServices&lt;BR /&gt;--&amp;gt; Discovered primary services: 3&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; --&amp;gt; Generic Attribute Start Handle: 1 End Handle: 5&lt;BR /&gt;&amp;nbsp; - Service Changed Value Handle: 3&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; --&amp;gt; Generic Access Start Handle: 20 End Handle: 28&lt;BR /&gt;&amp;nbsp; - Device Name Value Handle: 22&lt;BR /&gt;&amp;nbsp; - Appearance Value Handle: 24&lt;BR /&gt;&amp;nbsp; - Central Address Resolution Value Handle: 26&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; --&amp;gt; User Data Start Handle: 40 End Handle: 65535&lt;BR /&gt;&amp;nbsp; - Serial Number String Value Handle: 42&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;STRONG&gt; &amp;lt;---- I'm looking for this number&amp;nbsp; &amp;nbsp;&lt;/STRONG&gt; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;gatt discover 0 -service service_hex&amp;nbsp;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;--&amp;gt; Discovered primary services: 1&lt;/P&gt;&lt;P&gt;--&amp;gt; User Data Start Handle: 40 End Handle: 65535&amp;nbsp; &lt;STRONG&gt;&amp;nbsp;---&amp;gt; misses 42&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Can I use the absolute address of&amp;nbsp;&lt;/STRONG&gt;&lt;STRONG&gt;uuid to read out its value (with GattClient_ReadCharacteristicValue)? &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;What's the point of the&amp;nbsp;uuid&lt;SPAN&gt;&amp;nbsp;if not?&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Jul 2020 16:21:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/BLE-finding-correct-handle-ID/m-p/1081763#M2619</guid>
      <dc:creator>arpad_toth</dc:creator>
      <dc:date>2020-07-09T16:21:37Z</dc:date>
    </item>
    <item>
      <title>Re: BLE finding correct handle ID</title>
      <link>https://community.nxp.com/t5/MCUXpresso-SDK/BLE-finding-correct-handle-ID/m-p/1081764#M2620</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope you are doing great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Attribute Protocol allows devices to identify attribute types using UUIDs regardless of the local handle used to identify them in a read or write request.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The client must use &lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;GattClient_DiscoverAllPrimaryServices&lt;/SPAN&gt;&amp;nbsp;to obtain the handles of the attributes it is interested in.&lt;/P&gt;&lt;P&gt;The handle id could be assigned in a different order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A client may send Attribute protocol requests to a server, and the server shall&amp;nbsp;respond to all requests that it receives.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mario&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2020 23:52:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCUXpresso-SDK/BLE-finding-correct-handle-ID/m-p/1081764#M2620</guid>
      <dc:creator>mario_castaneda</dc:creator>
      <dc:date>2020-07-15T23:52:22Z</dc:date>
    </item>
  </channel>
</rss>

