<?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>Getting errors when pulling values from specific buffer position in a ble write characteristic callback</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/105186/getting-errors-when-pulling-values-from-specific-buffer-position-in-a-ble-write-characteristic-callback</link><description>I am trying to get information from a write characteristic ( BT_GATT_CHRC_WRITE_WITHOUT_RESP | BT_GATT_CHRC_WRITE) but am running into challenges, so I thought I would just ask the community as it seems like something simple. 
 The callback is running</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 30 Oct 2023 22:39:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/105186/getting-errors-when-pulling-values-from-specific-buffer-position-in-a-ble-write-characteristic-callback" /><item><title>RE: Getting errors when pulling values from specific buffer position in a ble write characteristic callback</title><link>https://devzone.nordicsemi.com/thread/453153?ContentTypeID=1</link><pubDate>Mon, 30 Oct 2023 22:39:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3341e800-0d8e-44bf-a7ef-5010e202ec05</guid><dc:creator>lcj</dc:creator><description>&lt;p&gt;Never mind. Copilot figured it out for me.&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;pre class="ui-code" data-mode="text"&gt;uint16_t total_len = 0;
memcpy(&amp;amp;total_len, &amp;amp;buffer[2], sizeof(uint16_t));
printf(&amp;quot;total length: %d\n&amp;quot;, total_len);&lt;/pre&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>