<?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>BLE could not receive data when i use BLE_EVT_TX_COMPLETE to send data</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/14434/ble-could-not-receive-data-when-i-use-ble_evt_tx_complete-to-send-data</link><description>Hello:
I am use nrf51822 to transfor data (BLE &amp;lt;-&amp;gt;UART),i need a faster rate in ble , and i found a way in the zone,that to use BLE_EVT_TX_COMPLETE to send data, the send data rate raised but if i du that i can not receive data from ble anymore,the device</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 15 Jun 2016 03:07:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/14434/ble-could-not-receive-data-when-i-use-ble_evt_tx_complete-to-send-data" /><item><title>RE: BLE could not receive data when i use BLE_EVT_TX_COMPLETE to send data</title><link>https://devzone.nordicsemi.com/thread/55148?ContentTypeID=1</link><pubDate>Wed, 15 Jun 2016 03:07:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2395784c-8419-4df6-9d97-18c95199ed6c</guid><dc:creator>tornadoyun</dc:creator><description>&lt;p&gt;thank you very much,like you say &amp;#39;&amp;#39;the RX BLE software interrupts will be in the queue behind BLE_EVT_TX_COMPLETE&amp;#39;&amp;#39;,i guess that is the problem i have met,but not very sure.you say that and i believe it is the problem,thanks a lot.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE could not receive data when i use BLE_EVT_TX_COMPLETE to send data</title><link>https://devzone.nordicsemi.com/thread/55147?ContentTypeID=1</link><pubDate>Tue, 14 Jun 2016 12:09:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a794ccf2-97e8-4eb2-8a64-7daa749294a1</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;I have updated my answer, please take a look at it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE could not receive data when i use BLE_EVT_TX_COMPLETE to send data</title><link>https://devzone.nordicsemi.com/thread/55146?ContentTypeID=1</link><pubDate>Tue, 14 Jun 2016 01:43:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88e82993-0e61-4199-88d9-7c98d375ddf1</guid><dc:creator>tornadoyun</dc:creator><description>&lt;p&gt;thanks for your answer,i know that how to enable notification,and the phone has already write the CCCD characteristic.my problem is when power up ,i (the device )can received data from phone,but when the device send data to the phone through  BLE_EVT_TX_COMPLETE event,the device could not receive data anymore.my uart priority is APP_IRQ_PRIORITY_HIGH, and in BLE_EVT_TX_COMPLETE i have a while(1),so that i can transfer data faster,i thought if the while(1) do not return in BLE_EVT_TX_COMPLETE event,that block the Rx from BLE.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE could not receive data when i use BLE_EVT_TX_COMPLETE to send data</title><link>https://devzone.nordicsemi.com/thread/55145?ContentTypeID=1</link><pubDate>Mon, 13 Jun 2016 12:04:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a998eaa6-8505-4886-95c1-a480adbb0af7</guid><dc:creator>FormerMember</dc:creator><description>&lt;p&gt;The method that is used to transfer data from a peripheral (server) to a central (client) is notifications, and they are transferred using the function  &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s130.api.v2.0.0%2Fgroup___b_l_e___g_a_t_t_s___f_u_n_c_t_i_o_n_s.html&amp;amp;cp=3_6_2_1_0_2_4_2_3&amp;amp;anchor=ga313fe43c2e93267da668572e885945db"&gt;sd_ble_gatts_hvx(..)&lt;/a&gt;. When the data that was added to that function has been transmitted, the event BLE_EVT_TX_COMPLETE will occur.&lt;/p&gt;
&lt;p&gt;Note that in order for the peripheral (server) to be able to use notifications, the central will have to enabled it. The central enables notification by writing to the CCCD for the characteristic in the peripheral that wants to use notifications.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update 14.06.16:&lt;/strong&gt; What do you mean by transferring data through BLE_EVT_TX_COMPLETE, do you mean that you call sd_ble_gatt_hvx(..) from there? Could you please show a code snippet?&lt;/p&gt;
&lt;p&gt;When the UART priority is set to APP_IRQ_PRIORITY_HIGH, it will have higher priority than the software BLE events, but lower priority than radio BLE events, see the &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.s130.sds%2Fdita%2Fsoftdevices%2Fs130%2Fprocessor_avail_interrupt_latency%2Fexception_mgmt_sd.html&amp;amp;cp=3_6_2_0_15_1"&gt;Interrupt priority level&lt;/a&gt; section in the Softdevice specification.&lt;/p&gt;
&lt;p&gt;If your device is always running in the BLE_EVT_TX_COMPLETE event, you will not see any of the received data from the phone, because the BLE software generated events have the same interrupt level as BLE_EVT_TX_COMPLETE. Since they have the same interrupt priority, the RX BLE software interrupts will be in the queue behind BLE_EVT_TX_COMPLETE..&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>