<?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>Help with reading write attribute value in BLE</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/68748/help-with-reading-write-attribute-value-in-ble</link><description>Hello, 
 I have been working with BLE on the nRF52840 with softdevice 140 and the latest in terms of SDK. 
 The problem I have run into is with reading the value that has been written to by the client. 
 I&amp;#39;m using the peripheral heart rate example as</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 25 Nov 2020 06:04:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/68748/help-with-reading-write-attribute-value-in-ble" /><item><title>RE: Help with reading write attribute value in BLE</title><link>https://devzone.nordicsemi.com/thread/281696?ContentTypeID=1</link><pubDate>Wed, 25 Nov 2020 06:04:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2e1d3648-682d-4aff-80d6-74b11bd3a0c2</guid><dc:creator>sethu</dc:creator><description>&lt;p&gt;Nevermind, I got it. Just had to change the call back to this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;static ssize_t write_on(struct bt_conn *conn, const struct bt_gatt_attr *attr, const void *buf,
			 uint16_t len, uint16_t offset, uint8_t flags)
{
	uint8_t val;
	printk(&amp;quot;[MY] Value -- %x \n&amp;quot;, *(uint8_t *)(buf)); 
	return 1;
}&lt;/pre&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>