<?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>error when writing more bytes than the &amp;quot;long char&amp;quot; buffer length</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/21176/error-when-writing-more-bytes-than-the-long-char-buffer-length</link><description>Hi all, 
 I have implemented a service with various &amp;quot;long char&amp;quot; characteristics. The buffer that I use to receive the data wrote to the &amp;quot;long char&amp;quot; characteristics is this: 
 #define CHAR_LENGTH_MAX 160
#define BUFF_SIZE CEIL_DIV(CHAR_LENGTH_MAX,18</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 07 Apr 2017 09:10:09 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/21176/error-when-writing-more-bytes-than-the-long-char-buffer-length" /><item><title>RE: error when writing more bytes than the "long char" buffer length</title><link>https://devzone.nordicsemi.com/thread/82872?ContentTypeID=1</link><pubDate>Fri, 07 Apr 2017 09:10:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a081954c-b108-4c9c-8bf0-edc9b9f35a88</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;The reset can be avoided if treating some errors from sd_ble_gatts_rw_authorize_reply() different than others. If an error is caught by APP_ERROR_CHECK(), there will be a reset.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: error when writing more bytes than the "long char" buffer length</title><link>https://devzone.nordicsemi.com/thread/82871?ContentTypeID=1</link><pubDate>Thu, 06 Apr 2017 14:18:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:435325c8-2d0e-4c2b-a9a6-1b499f97e085</guid><dc:creator>abosch</dc:creator><description>&lt;p&gt;Hi Kristin,&lt;/p&gt;
&lt;p&gt;The code is taked of example of SDK 12.2 &amp;quot;experimental_ble_app_eddystone&amp;quot;.
Also I&amp;#39;ve tried with this example, and writing to &amp;quot;Read/Write ADV Slot&amp;quot; char (0x750A) an array of 160 bytes the micro resets (the buffer in this case is 64 bytes lenght).
There&amp;#39;s any way to avoid this reset?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: error when writing more bytes than the "long char" buffer length</title><link>https://devzone.nordicsemi.com/thread/82870?ContentTypeID=1</link><pubDate>Thu, 06 Apr 2017 13:35:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8202694-6aa0-423a-a3f6-c29509ac6f28</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;Could you share more of your code, like for example where sd_ble_gatts_rw_authorize_reply() is being called?&lt;/p&gt;
&lt;p&gt;Do you see the same problem if you test the example experimental_ble_app_queued_writes() in the SDK?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>