<?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>Long write error, GATT INVALID ATTR LEN</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29216/long-write-error-gatt-invalid-attr-len</link><description>Good evening, 
 I am trying to implement queued write (long write) into ble_app_uart example. I am using s110_v7.1, nrf51822(pca10028), can not find version of sdk it is one of the older ones, probably sdk6. 
 This is how BLE events ar handled: 
 case</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 09 Jan 2018 14:57:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29216/long-write-error-gatt-invalid-attr-len" /><item><title>RE: Long write error, GATT INVALID ATTR LEN</title><link>https://devzone.nordicsemi.com/thread/116197?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 14:57:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9f5a8d1-e4dd-4215-aac1-0d2b37a4b038</guid><dc:creator>Chocol8</dc:creator><description>&lt;p&gt;Thank you, now I see the possibile options.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Long write error, GATT INVALID ATTR LEN</title><link>https://devzone.nordicsemi.com/thread/116196?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 14:55:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de4dfa9e-bb5c-4cee-a64f-d9f0fda617d2</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;ol start="2"&gt;
&lt;li&gt;Not really, in SDK 12.3 you are still using S130 v2, which doesn&amp;#39;t support configurable ATT MTU, you must switch to the nRF52 to be able to use S132 v3 or later.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Long write error, GATT INVALID ATTR LEN</title><link>https://devzone.nordicsemi.com/thread/116195?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 14:32:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3dc2e684-ed48-4ded-a5c2-caf5d07a4788</guid><dc:creator>Chocol8</dc:creator><description>&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;There is just a requirement set for the device that it must able to transmit &amp;gt;20bytes at the time. It can be split while being sent but receiving device has to see it as a one piece of information.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Could SDK 12.3 be helpful for me while sending larger packets or disassembling, assembling them?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I saw both statements in s130 v2 specification aswell and I was confused.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Long write error, GATT INVALID ATTR LEN</title><link>https://devzone.nordicsemi.com/thread/116190?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 14:06:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7711ebb5-7bcf-4656-8d72-f443c02fa9bb</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Do you need to send &lt;strong&gt;one&lt;/strong&gt; notification? Would it be possible for you to split them up? Changes in what regard? The release notes should include the changes.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Exactly, I can&amp;#39;t decide if a migration is worth it or not. That is why I&amp;#39;m asking about why you need to send one big notification.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I double checked the information I gave you about S130 v2 supporting configurable ATT MTU, it seems this was incorrect, and an error in the documentation. Sorry. Configurable ATT MTU is not possible on the nRF51 series, this was first available on S132 v3, so the nRF52 series.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Long write error, GATT INVALID ATTR LEN</title><link>https://devzone.nordicsemi.com/thread/116192?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 10:29:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da077204-030d-4749-9f07-8f5daf5383eb</guid><dc:creator>Chocol8</dc:creator><description>&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;My goal is to collect data from sensors and send it via BLE NUS to a master device. In addtition to this, master will be sending commands to the slave device via same NUS. Apart from different size and little change on power consumption what will be different if I will use s130 v2? I think that the easiest way would be to use s130.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Well I would like to move to a newer one but there is a lot of code written so this would take a lot of time.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Is it enough to increase MAX MTU size in code to be able to send longer notification?&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Long write error, GATT INVALID ATTR LEN</title><link>https://devzone.nordicsemi.com/thread/116189?ContentTypeID=1</link><pubDate>Tue, 09 Jan 2018 10:10:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c757cf80-174a-4ed1-b453-240847ca27b8</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Well. What is it that you actually want to achieve? S130 v2 is capable of increasing the ATT MTU and thus sending larger notifications. If you want to move to a new SDK I recommend using SDK 12.3.0, this is the latest SDK supporting nRF51.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Long write error, GATT INVALID ATTR LEN</title><link>https://devzone.nordicsemi.com/thread/116200?ContentTypeID=1</link><pubDate>Mon, 08 Jan 2018 11:20:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e7a1c49-8345-4347-ba5f-a180b28f8113</guid><dc:creator>Chocol8</dc:creator><description>&lt;p&gt;I am using s110_v7.1. , sdk 6. Should I use a newer SDK? I have not made any modifiactions to handle long write in nus_data_handler. Would s130 be able to send notifications longer than 20 bytes? if not which softdevice would be able?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Long write error, GATT INVALID ATTR LEN</title><link>https://devzone.nordicsemi.com/thread/116199?ContentTypeID=1</link><pubDate>Mon, 08 Jan 2018 10:12:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2fd7f441-6697-4bc4-ab36-d290ea298d79</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;You should know which SoftDevice and SDK version you are using, please try to find out.&lt;/p&gt;
&lt;p&gt;Ok. So if I understand you correctly. The first problem you need to solve is how nus_data_handler() will handle the long write, it was not written to handle long writes so you have to modify it. Have you done any modifications?&lt;/p&gt;
&lt;p&gt;In S110 it is not possible to send notifications longer than 20 bytes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Long write error, GATT INVALID ATTR LEN</title><link>https://devzone.nordicsemi.com/thread/116198?ContentTypeID=1</link><pubDate>Mon, 08 Jan 2018 10:09:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df53eeb1-2f81-4bd6-818a-d828d83ff40c</guid><dc:creator>Chocol8</dc:creator><description>&lt;p&gt;Maybe it would easier to implement receiving and sending &amp;gt;20 B by spliting into 20bytes buffers? But then how should I receive data &amp;gt;20 in pca10028?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Long write error, GATT INVALID ATTR LEN</title><link>https://devzone.nordicsemi.com/thread/116194?ContentTypeID=1</link><pubDate>Mon, 08 Jan 2018 08:14:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:57337c77-742d-4b00-9aeb-f2b7cc65bc00</guid><dc:creator>Chocol8</dc:creator><description>&lt;ol start="4"&gt;
&lt;li&gt;In addition to this, I see that just using &lt;code&gt;ble_nus_send_string(&amp;amp;m_nus,debug_string6,30);&lt;/code&gt; will not send string at all. Can I send &amp;gt;20 using &lt;code&gt;ble_nus_send_string&lt;/code&gt;? How could I perform queued write from pca10028 side?&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Long write error, GATT INVALID ATTR LEN</title><link>https://devzone.nordicsemi.com/thread/116193?ContentTypeID=1</link><pubDate>Mon, 08 Jan 2018 08:00:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de4a1842-cd6d-4c6e-a1e7-2cc05160f678</guid><dc:creator>Chocol8</dc:creator><description>&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Hi, thank you for responsing. My bad for not explaining in a more detailed way. I see in debbuger that I receive &amp;lt;20B and &amp;gt;20B correctly with pca10028 board. But I do not receive the same data in android sent from pca10028. Actualy, I receive only one message in andoid it is &lt;code&gt;&amp;quot;(0x)C0-07-00-00-D1-06-00-00-D1-06-00-00-D1-00-00-00-B1-06-00-00-00-00-00-00&amp;quot;&lt;/code&gt; whatever I am sending from board. Despite, it is longer or shorter than 20 B.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;I would like to pass characteristics which are &amp;lt;20B and &amp;gt;20B size to nus data handler. There I could process received data. How could I pass &lt;code&gt;queued_write_buffer&lt;/code&gt; and buffer that is already being passed to  &lt;code&gt;nus_data_handler&lt;/code&gt; if one of those two was received?&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Yes, every time I receive something from android I send notification back. But now I see that is it not happening because &amp;gt;20B characteristics are not being passed to &lt;code&gt;nus_data_handler&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Long write error, GATT INVALID ATTR LEN</title><link>https://devzone.nordicsemi.com/thread/116191?ContentTypeID=1</link><pubDate>Fri, 05 Jan 2018 14:35:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a7e0c598-3532-4c5a-b9e1-0acc02a3e48e</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Your sniff looks okay. Can&amp;#39;t you just check if you received the data you write?&lt;/p&gt;
&lt;p&gt;&amp;quot;In addition to this, in nus service I have made that every received characteristic will be replied with some kind of response.&amp;quot; Could you elaborate on this? What kind of a response? Are you sending a notification every time something is written?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>