<?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>How to read local attribute value in BLE peripheral</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96189/how-to-read-local-attribute-value-in-ble-peripheral</link><description>Hi, 
 I am making an application on nRF52840 (SDK 2.2.0) as a BLE peripheral. 
 When something happens at this peripheral, the application will notify a value to the connected manager. 
 Below mycode.c: 
 
 
 
 
 
 
 
 
 
 
 
 Everything works fine. </description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 09 Feb 2023 02:50:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96189/how-to-read-local-attribute-value-in-ble-peripheral" /><item><title>RE: How to read local attribute value in BLE peripheral</title><link>https://devzone.nordicsemi.com/thread/409025?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2023 02:50:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a141e650-10dd-4ab2-947d-f3adfc03cd93</guid><dc:creator>quan1328</dc:creator><description>&lt;p&gt;Thanks for your answer.&lt;/p&gt;
&lt;p&gt;Yes, I did think about your solution, but hesitate because if I could read a local attribute of a characteristic using the API, it would save me a global variable of taking the returned value from `bt_gatt_notify_cb()`.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to read local attribute value in BLE peripheral</title><link>https://devzone.nordicsemi.com/thread/407573?ContentTypeID=1</link><pubDate>Wed, 01 Feb 2023 14:08:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6d2fc92-b609-403a-8e3a-211a7a166ffe</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You should be able to use&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/connectivity/bluetooth/api/gatt.html#c.bt_gatt_attr_read_ccc"&gt;&amp;nbsp;&lt;/a&gt;&lt;span&gt;&lt;span dir="ltr"&gt;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/connectivity/bluetooth/api/gatt.html#c.bt_gatt_attr_read_ccc"&gt;bt_gatt_attr_read_ccc&lt;/a&gt;() to read the current CCCD configuration from the local database. But would it not be easier to just read the&amp;nbsp;return code from&amp;nbsp;bt_gatt_notify_cb() to determine if the notification got sent or not?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Best regards,&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;Vidar&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>