<?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>Attribute Caching</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/125426/attribute-caching</link><description>I am trying to implement Attribute caching as described in Vol 3, part G, section 2.5.2 of the Bluetooth Core Spec . 
 
 Reading the GATT Database Hash seems to work:
 
 The bt_gatt_read returns zero 
 The callback function returns a zero “err” parameter</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 05 Nov 2025 21:25:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/125426/attribute-caching" /><item><title>RE: Attribute Caching</title><link>https://devzone.nordicsemi.com/thread/553495?ContentTypeID=1</link><pubDate>Wed, 05 Nov 2025 21:25:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e6845a12-5233-40d3-abe0-f991a8ae8768</guid><dc:creator>Tom Colburn</dc:creator><description>&lt;p&gt;Excellent! Step 1 achieved.&amp;nbsp; The key was the uuid itself - using BT_UUID_GATT_DB_HASH solved my immediate problem.&amp;nbsp; I&amp;#39;ll work with my FW expert on code cleanup - implementing your other suggestions - now that we&amp;#39;ve got read by uuid working.&amp;nbsp; I&amp;#39;m sure we&amp;#39;ll have more questions as we continue to implement Attribute caching.&lt;/p&gt;
&lt;p&gt;Thanks for your prompt and accurate response!&lt;/p&gt;
&lt;p&gt;Tom&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Attribute Caching</title><link>https://devzone.nordicsemi.com/thread/553432?ContentTypeID=1</link><pubDate>Wed, 05 Nov 2025 12:42:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4caa254f-ee17-4e77-886a-2daade259185</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Interesting.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;First memset the read_prams_ptr before use as a good practice.&lt;/p&gt;
&lt;p&gt;Are you sure that you are setting the uuid correct here?&lt;br /&gt;(*read_params_ptr).by_uuid.uuid = BT_UUID_GATT_DB_HASH_VAL;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Shouldn&amp;#39;t this be set to&amp;nbsp;BT_UUID_GATT_DB_HASH?&lt;/p&gt;
&lt;p&gt;Also guard your callback when data == NULL when you return&amp;nbsp;BT_GATT_ITER_STOP else you keep on looping on the GATT iterations even though you see no data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>