<?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>send data by ble uart</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/62180/send-data-by-ble-uart</link><description>Hi 
 I use SES and nRF52832 dongle . I want to send data on &amp;quot;ble uart&amp;quot; and get that data on &amp;quot;nRF UART v2.0&amp;quot; app. mean i want send a string in program while every 5 second and get it on mobile app. I did different ways. But it didn&amp;#39;t work. 
 I use this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 13 Jun 2020 20:35:23 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/62180/send-data-by-ble-uart" /><item><title>RE: send data by ble uart</title><link>https://devzone.nordicsemi.com/thread/254839?ContentTypeID=1</link><pubDate>Sat, 13 Jun 2020 20:35:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe0a0759-1817-4161-9835-8e7a40c30cf0</guid><dc:creator>awneil</dc:creator><description>[quote userid="87537" url="~/f/nordic-q-a/62180/send-data-by-ble-uart/254824"]The problem solved[/quote]
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/5102._5F00_Verify_2D00_answer_2D00_nordic_5F00_2.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data by ble uart</title><link>https://devzone.nordicsemi.com/thread/254824?ContentTypeID=1</link><pubDate>Sat, 13 Jun 2020 07:56:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9bee0c56-8614-4b74-8bbb-81635642007e</guid><dc:creator>Bizadi</dc:creator><description>&lt;p&gt;The problem was that I didn&amp;#39;t use &amp;quot;Sizeof&amp;quot; for Length and gave it a wrong value. The problem solved.&lt;/p&gt;
&lt;p&gt;Thanks to Nordic and&amp;nbsp;special thanks to&amp;nbsp;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data by ble uart</title><link>https://devzone.nordicsemi.com/thread/254723?ContentTypeID=1</link><pubDate>Fri, 12 Jun 2020 12:27:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed0880e1-547e-4c64-89f4-e067727a7ca7</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="Bizadi"]thanks for your quick reply .[/quote]
&lt;p&gt;No problem at all, I am happy to help!&lt;/p&gt;
&lt;p&gt;[quote user="Bizadi"][/quote]&lt;/p&gt;
&lt;p&gt;My problem is modify or setting&amp;nbsp; for send a string.&lt;/p&gt;
&lt;p&gt;I use this command :&amp;quot;ble_nus_data_send(p_nus,&amp;quot;My String&amp;quot;,p_length,conn_handle);&amp;quot; in &amp;quot;ble_app_uart&amp;quot; example.&lt;/p&gt;
&lt;p&gt;is this command correct?&lt;/p&gt;
&lt;p&gt;Do I need to make any special modify or settings to use this command?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;No. Please see the function declaration:&lt;br /&gt;&lt;br /&gt;uint32_t ble_nus_data_send(ble_nus_t * p_nus, &lt;strong&gt;uint8_t * p_data&lt;/strong&gt;, uint16_t * p_length, uint16_t conn_handle)&lt;br /&gt;&lt;br /&gt;The p_data argument needs to be a pointer to a uint8_t array. In the UART example, this uint8_t array is a c string(char array). It will not work inputting the entire string as the argument.&lt;br /&gt;Instead, you&amp;nbsp;should do something like this:&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define STR_LENGTH 12

char my_c_string[STR_LENGTH] = {&amp;quot;My C String&amp;quot;};
uint16_t length = sizeof(my_c_string);

ble_nus_data_send(p_nus, my_c_string, &amp;amp;length, m_conn_handle);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
[quote user="Bizadi"]What are the values of the variables? (like &amp;quot;&lt;span&gt;p_nus&amp;quot; pointer&lt;/span&gt;)[/quote]
&lt;p&gt;Are you using Segger embedded stuidos? Then you may right click any variable and click &amp;quot;Go to definition&amp;quot; to see where it is defined.&lt;br /&gt;As you then will see, the p_nus is the instance of the NUS service.&lt;/p&gt;
[quote user="Bizadi"]what is value for define &amp;quot;SER_APP_CTS_PIN&amp;quot; and &amp;quot;SER_APP_RTS_PIN&amp;quot; ?[/quote]
&lt;p&gt;I do not understand what you are asking me here. The defines you have listed is just to point to the pin number for the respective functionality - its a very good practice to replace magic numbers with properly named macros, which I highly recommend for increased readability.&lt;/p&gt;
[quote user="Bizadi"]When we don&amp;#39;t use those pins, should they be connected in the circuit? (PULL-UP or PULL-DOWN)[/quote]
&lt;p&gt;If they are not used, you may just leave them to the default unused GPIO configuration - disconnected inputs. If you do not use UART at all then you may disable the entire UART module and all its configurations.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data by ble uart</title><link>https://devzone.nordicsemi.com/thread/254526?ContentTypeID=1</link><pubDate>Thu, 11 Jun 2020 14:07:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5ab8e466-66a1-4aaf-9c16-b704441ee4e9</guid><dc:creator>Bizadi</dc:creator><description>&lt;p&gt;thanks for your quick reply .&lt;/p&gt;
&lt;p&gt;1-&lt;/p&gt;
&lt;p&gt;My problem is modify or setting&amp;nbsp; for send a string.&lt;/p&gt;
&lt;p&gt;I use this command :&amp;quot;ble_nus_data_send(p_nus,&amp;quot;My String&amp;quot;,p_length,conn_handle);&amp;quot; in &amp;quot;ble_app_uart&amp;quot; example.&lt;/p&gt;
&lt;p&gt;is this command correct?&lt;/p&gt;
&lt;p&gt;Do I need to make any special modify or settings to use this command?&lt;/p&gt;
&lt;p&gt;What are the values of the variables? (like &amp;quot;&lt;span&gt;p_nus&amp;quot; pointer&lt;/span&gt;)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2-&lt;/p&gt;
&lt;p&gt;I do not use&amp;nbsp;&lt;span&gt;RX and TX pins . what is value for define &amp;quot;SER_APP_CTS_PIN&amp;quot; and &amp;quot;SER_APP_RTS_PIN&amp;quot; ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;#define SER_APP_RX_PIN&amp;nbsp; &amp;nbsp; &amp;nbsp; 23 // UART RX pin number.&lt;br /&gt;#define SER_APP_TX_PIN&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;24 // UART TX pin number.&lt;br /&gt;#define SER_APP_CTS_PIN&amp;nbsp; &amp;nbsp; &amp;nbsp;2 // UART Clear To Send pin number.&lt;br /&gt;#define SER_APP_RTS_PIN&amp;nbsp; &amp;nbsp; 25 // UART Request To Send pin number.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;When we don&amp;#39;t use those pins, should they be connected in the circuit? (PULL-UP or PULL-DOWN)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data by ble uart</title><link>https://devzone.nordicsemi.com/thread/254474?ContentTypeID=1</link><pubDate>Thu, 11 Jun 2020 12:07:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f91ea438-1dea-4bce-9e6d-d553ebdc094e</guid><dc:creator>Karl Ylvisaker</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user="Bizadi"]What is your solution to this work? What should I do?[/quote]
&lt;p&gt;To have a task executed at a certain interval, I would suggest setting up a timer for the specific period, and then have it call the send function after that time.&lt;br /&gt;Many examples already demonstrate this in some capacity, but I would recommend that you take a look at the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v16.0.0/nrf_dev_timer_example.html"&gt;Timer Example&lt;/a&gt;&amp;nbsp;from the SDK to see the simplest form.&lt;br /&gt;&lt;br /&gt;When it comes to implement it into the Nordic UART example it depends on how you would like this to function. The unmodified example is set to transmit whatever it receives through UART to its peer over the BLE link.&lt;br /&gt;Are you intending for the device to hold the connection in between the timeout, or do you intend for the device to go to sleep and then wakeup to send every 5 seconds, or something else?&lt;br /&gt;Its capacity to receive UART input will depend on these choices.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Karl&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data by ble uart</title><link>https://devzone.nordicsemi.com/thread/254325?ContentTypeID=1</link><pubDate>Wed, 10 Jun 2020 18:17:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee21a397-8409-47e4-b91d-15965bd041bb</guid><dc:creator>Bizadi</dc:creator><description>&lt;p&gt;I use a nRF52832 chip(SoC) on a PCB according to Nordic reference circuitry schematic. The circuit and chip are working properly. i can advertising and &lt;span class="tlid-translation translation" lang="en"&gt;&lt;span class="" title=""&gt;successful &lt;/span&gt;&lt;/span&gt; connection to smart phone with &amp;quot;nRF UART v2.0&amp;quot; app.&lt;/p&gt;
&lt;p&gt;I want every 5 second, send a string from the chip program and get it for real time on &amp;quot;nRF UART v2.0&amp;quot; app .&lt;/p&gt;
&lt;p&gt;What is your solution to this work? What should I do?&lt;/p&gt;
&lt;p&gt;How do I modify this example ? &amp;quot;\nRF5SDK160098a08e2\examples\ble_peripheral\ble_app_uart\pca10040\s132\ses&amp;quot;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: send data by ble uart</title><link>https://devzone.nordicsemi.com/thread/253375?ContentTypeID=1</link><pubDate>Thu, 04 Jun 2020 17:48:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1e1c7c1-75a5-41d6-9398-f941073fbc23</guid><dc:creator>awneil</dc:creator><description>[quote userid="87537" url="~/f/nordic-q-a/62180/send-data-by-ble-uart"]it didn&amp;#39;t work[/quote]
&lt;p&gt;So what, exactly, did you do?&lt;/p&gt;
&lt;p&gt;And what investigation / testing / debugging have &lt;em&gt;&lt;strong&gt;you&lt;/strong&gt; &lt;/em&gt;done to find where it&amp;#39;s going wrong ?&lt;/p&gt;
&lt;p&gt;Did the &lt;strong&gt;unmodified&lt;/strong&gt; example work ?&lt;/p&gt;
[quote userid="87537" url="~/f/nordic-q-a/62180/send-data-by-ble-uart"]nRF52832 dongle[/quote]
&lt;p&gt;Nordic don&amp;#39;t make such a thing - so please give details.&lt;/p&gt;
&lt;p&gt;Or did you mean an nRF52832&amp;nbsp;&lt;strong&gt;DK&lt;/strong&gt; (&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;D&lt;/strong&gt;&lt;/span&gt;evelopment &lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;K&lt;/strong&gt;&lt;/span&gt;it):&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1591292768306v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52-DK"&gt;https://www.nordicsemi.com/Software-and-Tools/Development-Kits/nRF52-DK&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Or an nRF528&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;40&lt;/strong&gt;&lt;/span&gt; Dongle:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1591292860124v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.nordicsemi.com/Software-and-tools/Development-Kits/nRF52840-Dongle"&gt;https://www.nordicsemi.com/Software-and-tools/Development-Kits/nRF52840-Dongle&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>