<?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>Windows 8.1 repeated key event</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/863/windows-8-1-repeated-key-event</link><description>I have an issue with my keyboard working with the windows suface (on windows 8.1). Occasionally, the last character sent is repeated several times instead of one. I do not have the same isue with the ipad (iOS 7.0.3). Therefore, I was thinking if may</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 15 Nov 2013 11:55:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/863/windows-8-1-repeated-key-event" /><item><title>RE: Windows 8.1 repeated key event</title><link>https://devzone.nordicsemi.com/thread/4222?ContentTypeID=1</link><pubDate>Fri, 15 Nov 2013 11:55:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eff842d7-777e-4bc6-963c-8adb3ae08a30</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;The softdevice does have an internal buffer of 7 packets, so that seems correct.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Windows 8.1 repeated key event</title><link>https://devzone.nordicsemi.com/thread/4220?ContentTypeID=1</link><pubDate>Fri, 15 Nov 2013 11:55:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77492785-720b-46c6-8af8-fc98fd888fa6</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;The buffers in the softdevice is managed on packets, not data size. This means that you can queue a number of packets, no matter how big they are (but obviously limited by the MTU size of the link). Each time you call sd_ble_gatts_hvx() you therefore consume one buffer space. The BLE_EVT_TX_COMPLETE will be delivered for each connection event, i.e. each connection interval.&lt;/p&gt;
&lt;p&gt;There is some comments explaining the buffer behavior in ble_gatts.h, which may be useful. In addition, the document I linked to in my first answer should be useful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Windows 8.1 repeated key event</title><link>https://devzone.nordicsemi.com/thread/4221?ContentTypeID=1</link><pubDate>Wed, 13 Nov 2013 17:38:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33f07295-87a7-4f01-8856-b3c7e96d276b</guid><dc:creator>Ignacio Lopez</dc:creator><description>&lt;p&gt;I am calling this function as it stands:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;	err_code = sd_ble_tx_buffer_count_get (&amp;amp;s_packet_buffer.sd_buffers_available);

	ASSERT(err_code == NRF_SUCCESS);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The total number of buffers returned is 7. Is that right? Where can I find more info about the softdevice buffers?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Windows 8.1 repeated key event</title><link>https://devzone.nordicsemi.com/thread/4219?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2013 15:20:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d95879d-9351-44ce-96fd-ab4743617562</guid><dc:creator>Ignacio Lopez</dc:creator><description>&lt;p&gt;Thanks Ole.&lt;/p&gt;
&lt;p&gt;As you suggested I will try to keep track of the total packets sent. I have a couple of questions first. I am planning a variable that will keep track of the buffers availability. I will initialize this variable to the value return from sd_ble_tx_buffer_count_get function.&lt;/p&gt;
&lt;p&gt;Every  time I sent a key, I put through 16 bytes (press+release). 1st question: what is the size of a buffer? Buffer size will help me to know how many buffers I am using every time I sent a key event and then decrease the precise number from total buffers available.&lt;/p&gt;
&lt;p&gt;Also, I will use the BLE_EVT_TX_COMPLETE event to increase the buffer once the packets have been sent. 2nd question: I would like to know when this event is called if it is every time a byte is sent or when a buffer is cleared.&lt;/p&gt;
&lt;p&gt;Basically I need to know how the softdevice buffers are managed.;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Windows 8.1 repeated key event</title><link>https://devzone.nordicsemi.com/thread/4218?ContentTypeID=1</link><pubDate>Tue, 12 Nov 2013 12:45:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e7e891f-59a5-4f7c-b016-a448291afb02</guid><dc:creator>Ole Morten</dc:creator><description>&lt;p&gt;The softdevice have a limited number of buffers available, and if you try to send a packet when these buffers are full, ble_gatts_hvx() will return the BLE_ERROR_NO_TX_BUFFERS_AVAILABLE error.&lt;/p&gt;
&lt;p&gt;Could it be that in your case, there is only room for the key press packet in the buffer, but the release is never queued, so that the release is only sent after then next press or release? If so, I&amp;#39;d suggest that you keep track of the numbers of buffers available. A strategy for this is proposed in &lt;a href="https://devzone.nordicsemi.com/documentation/nrf51/4.4.1/Introduction_to_the_S110_SoftDevice_v1.0.pdf"&gt;this document&lt;/a&gt;. By doing this, you can know before trying to send the press whether there will also be room for the release, and if not, you can wait with sending the press.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>