<?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>A value characteristic can only receive 2 bytes of payload?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/18567/a-value-characteristic-can-only-receive-2-bytes-of-payload</link><description>Hello, I&amp;#39;m sending a series of data up to 7 bytes from an android phone, but I can only receive the first 5. 
 I&amp;#39;m asking what are the list of thing to mind if I were trying to receive more? 
 I&amp;#39;m sending them over GATT, more specifically, gatts_evt</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 27 Dec 2016 09:25:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/18567/a-value-characteristic-can-only-receive-2-bytes-of-payload" /><item><title>RE: A value characteristic can only receive 2 bytes of payload?</title><link>https://devzone.nordicsemi.com/thread/71658?ContentTypeID=1</link><pubDate>Tue, 27 Dec 2016 09:25:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1bf587c2-7b3d-4415-bf0c-031283a8a617</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;So sometimes you get len 2 and sometimes you get len 5 on the same handle, 0x000E? Then I don&amp;#39;t think it&amp;#39;s something wrong with the firmware on the nRF. Maybe a sniffer trace would provide some more information. You can use the nRF Sniffer.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A value characteristic can only receive 2 bytes of payload?</title><link>https://devzone.nordicsemi.com/thread/71656?ContentTypeID=1</link><pubDate>Sun, 25 Dec 2016 09:10:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:141bda75-3987-45e0-8162-90b8c2c29bd5</guid><dc:creator>Mitch996</dc:creator><description>&lt;p&gt;Update: the android api is tailoring properly to the length of my packets. (at least according to the breakpoint I just did) It &amp;quot;worked&amp;quot; again, until, of course, it doesn&amp;#39;t. Damn I hate this game.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A value characteristic can only receive 2 bytes of payload?</title><link>https://devzone.nordicsemi.com/thread/71655?ContentTypeID=1</link><pubDate>Sun, 25 Dec 2016 09:03:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70fc4fec-a89c-45e9-9639-46b68993c56f</guid><dc:creator>Mitch996</dc:creator><description>&lt;p&gt;Well what do you know! the len is 0x0002. I&amp;#39;m not coming ON to ya but you got help me out here — what are the things that may affect this property? I send this from an android phone. I thought the length is automatically configured by android apis, no? Here&amp;#39;s a link to the breakpoint-pause image:
&lt;a href="http://i.imgur.com/SSnTnnT.png"&gt;link text&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: A value characteristic can only receive 2 bytes of payload?</title><link>https://devzone.nordicsemi.com/thread/71657?ContentTypeID=1</link><pubDate>Fri, 23 Dec 2016 13:06:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3429bcd2-140f-43f2-ae21-a7578a1e2dbe</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;You shois uld be able to write more than 5 as long as sizeof(mesh_gatt_evt_t) more than 5. Strange that you are getting different values. Are you sure that you the write events you get are to the same attribute? You can check the attribute handle. Maybe add something like this to ble_evt_dispatch():&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;if(p_ble_evt-&amp;gt;header.evt_id == BLE_GATTS_EVT_WRITE) 
{
    printf(&amp;quot;Write event with handle: %#04x\r\n&amp;quot;, p_ble_evt-&amp;gt;evt.gatts_evt.params.write.handle);
    printf(&amp;quot;Write event with length: %#04x\r\n&amp;quot;, p_ble_evt-&amp;gt;evt.gatts_evt.params.write.len);
    printf(&amp;quot;Write event with data:&amp;quot;);
    for(uint32_t i = 0; i &amp;lt; p_ble_evt-&amp;gt;evt.gatts_evt.params.write.len-1; i++)
    {
        printf(&amp;quot;%#02x, &amp;quot;, p_ble_evt-&amp;gt;evt.gatts_evt.params.write.data[i]);
    }
    printf(&amp;quot;%#02x\r\n&amp;quot;, p_ble_evt-&amp;gt;evt.gatts_evt.params.write.data[p_ble_evt-&amp;gt;evt.gatts_evt.params.write.len-1]);
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>