<?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>nRF52 ble to ble transfer continuous data for</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/64807/nrf52-ble-to-ble-transfer-continuous-data-for</link><description>Hello!! 
 We are carrying out a project using nRF52832 , in which we must send a data to a phone every 1 second for 10 hours. The data sent is a sequence of numbers from 1 to 36000 (counting every second that passes). 
 The sending of data must be through</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 30 Oct 2020 05:09:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/64807/nrf52-ble-to-ble-transfer-continuous-data-for" /><item><title>RE: nRF52 ble to ble transfer continuous data for</title><link>https://devzone.nordicsemi.com/thread/277710?ContentTypeID=1</link><pubDate>Fri, 30 Oct 2020 05:09:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:df678623-1a81-4b14-9b8a-d1e247f44081</guid><dc:creator>joshu2991</dc:creator><description>&lt;p&gt;Hi, I would like to update this ticket and provide the information I used to resolve my question, so that if anyone else requires it they can help with my response.&lt;br /&gt;&lt;br /&gt;I ended up using characteristics to be able to send and receive information with a cell phone and used the nRF52832 as a peripheral. For the number sequence I simply created a counter and send the data via a characteristic with the function:&lt;br /&gt;&lt;br /&gt;static void on_write(ble_os_t * p_our_service, ble_evt_t const * p_ble_evt)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I hope this serves someone else, the characteristics method is a very effective and continuous method. Have a very good day!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ble to ble transfer continuous data for</title><link>https://devzone.nordicsemi.com/thread/264659?ContentTypeID=1</link><pubDate>Fri, 14 Aug 2020 15:12:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1c54c01-fcb9-4b38-9d2d-68a03b13ba5d</guid><dc:creator>joshu2991</dc:creator><description>&lt;p&gt;Thank you Simon!&amp;nbsp;I must read and try with all this information that you have kindly given me, I thank you for all the attention.&lt;/p&gt;
&lt;p&gt;Have a very good day!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52 ble to ble transfer continuous data for</title><link>https://devzone.nordicsemi.com/thread/264657?ContentTypeID=1</link><pubDate>Fri, 14 Aug 2020 15:06:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:42d5bd93-8808-4e10-8515-a081f5b4779a</guid><dc:creator>Simon</dc:creator><description>&lt;div&gt;&lt;span style="font-size:14px;"&gt;&lt;strong&gt;Q1&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size:14px;"&gt; If the nRF52832 is the GATT server and the phone is the GATT client (read about the roles&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/71/what-is-a-client-and-server-in-ble"&gt;here&lt;/a&gt;) the way to send data to the phone, is through notifications, and that is done through the call&amp;nbsp;&lt;em&gt;sd_ble_gatts_hvx().&amp;nbsp;&lt;/em&gt;The function&amp;nbsp;&lt;em&gt;ble_nus_data_send()&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;/em&gt;(nRF5_SDK_17.0.0_9d13099\components\ble\ble_services\ble_nus\ble_nus.c) is an abstraction layer on top of that, which will&amp;nbsp;notify&lt;span&gt;&amp;nbsp;&lt;/span&gt;to the TX characteristic of the NUS Service. So&lt;span&gt;&amp;nbsp;&lt;/span&gt;&lt;em&gt;ble_nus_data_send()&lt;/em&gt;&lt;span&gt;&amp;nbsp;&lt;/span&gt;should be the best option for you, if: You want to use the NUS service (which seems like a good choice regarding your end goal) and if nRF52832 is a server.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size:14px;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size:14px;"&gt;This function can not be used for receiving data, only notifying data to the client&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size:14px;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size:14px;"&gt;&lt;strong&gt;Q2&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size:14px;"&gt;You should not use&amp;nbsp;&lt;em&gt;ble_nus_data_send()&lt;/em&gt; in &lt;em&gt;on_ble_evt(..)&lt;/em&gt;. To reach your end goal of sending a value every 10 seconds, you should&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/software-development-kit/posts/application-timer-tutorial"&gt;make some kind of timer&lt;/a&gt;&amp;nbsp;and run it every 10 seconds instead.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size:14px;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size:14px;"&gt;&lt;strong&gt;Q3&lt;/strong&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size:14px;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size:14px;"&gt;Yes, this should be possible. You should not worry about adding any delay, as the SofDevice will handle the scheduling.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size:14px;"&gt;&lt;br /&gt;&lt;strong&gt;Q4&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size:14px;"&gt; If the nRF52832 is the server and the phone is the client, the WRITE operation needs to be used. To receive the WRITEs on the server (nrf52832), you need to set up an observer function with&amp;nbsp;NRF_SDH_BLE_OBSERVER() and look for the&amp;nbsp;BLE_GATTS_EVT_WRITE events.&amp;nbsp; However, in the ble_app_uart example, this is done and you will receive the writes in the function&amp;nbsp;nRF5_SDK_17.0.0_9d13099\examples\ble_peripheral\ble_app_uart\main.c--&amp;gt;nus_data_handler() &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size:14px;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size:14px;"&gt;I would recommend you to check out the sample &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v14.0.0%2Fble_sdk_app_nus_eval.html"&gt;nRF5_SDK_17.0.0_9d13099\examples\ble_peripheral\ble_app_uart&lt;/a&gt;&amp;nbsp;and go through the steps under &lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v14.0.0%2Fble_sdk_app_nus_eval.html&amp;amp;cp=7_5_6_4_1_2_24_2&amp;amp;anchor=project_uart_nus_eval_test"&gt;Testing&lt;/a&gt;, which demonstrates how you can send data forth and back between a phone (using &lt;a href="https://infocenter.nordicsemi.com/topic/struct_nrftools/struct/nrftools_nrfconnect.html"&gt;nRF Connect&lt;/a&gt;) and an nRF52832.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;hr /&gt;&lt;span style="font-size:14px;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size:14px;"&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span style="font-size:14px;"&gt;These tutorials may also be useful:&lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style="font-size:14px;"&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/ble-advertising-a-beginners-tutorial"&gt;https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/ble-advertising-a-beginners-tutorial&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:14px;"&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/ble-characteristics-a-beginners-tutorial"&gt;https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/ble-characteristics-a-beginners-tutorial&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style="font-size:14px;"&gt;&lt;a href="https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/ble-services-a-beginners-tutorial"&gt;https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/ble-services-a-beginners-tutorial&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;span style="font-size:14px;"&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-size:14px;"&gt;Simon&lt;/span&gt;&lt;/p&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>