<?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 communication function</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/35701/ble-communication-function</link><description>hi, im using ble_app_uart and im trying to do a simple communication and data transfer over bluetooth with my iOS.i want to send from the Bluefruit app a byte (0x55 for example) , reiceve it with the nRF , toggle a pin , and transmit a byte (0xAA for</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 28 Jun 2018 08:16:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/35701/ble-communication-function" /><item><title>RE: BLE communication function</title><link>https://devzone.nordicsemi.com/thread/138022?ContentTypeID=1</link><pubDate>Thu, 28 Jun 2018 08:16:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:96b80240-8f60-4474-a7ea-5c939bd240bc</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Yk9,&lt;/p&gt;
&lt;p&gt;&lt;span style="text-decoration:underline;"&gt;&amp;nbsp;Please utilize &lt;a href="http://infocenter.nordicsemi.com/index.jsp"&gt;infocenter&lt;/a&gt;&amp;nbsp;to search up the functions and the documentation.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;The function &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fgroup__app__uart.html&amp;amp;anchor=gacddb5b7b711ef104f9eb181a13bc4503" target="_blank" rel="noopener noreferrer"&gt;app_uart_get&lt;/a&gt;() is a function for getting a byte from the &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Fuart.html&amp;amp;cp=2_1_0_49&amp;amp;anchor=concept_dm5_drw_sr" target="_blank" rel="noopener noreferrer"&gt;UART&lt;/a&gt;&amp;nbsp;&lt;em&gt;(the UART module)&lt;/em&gt;, and it is not a part of the &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fgroup__ble__nus.html&amp;amp;cp=4_0_0_6_3_23" target="_blank" rel="noopener noreferrer"&gt;Nordic UART Service&lt;/a&gt;&amp;nbsp;which is a BLE service.&lt;em&gt;(Do not confuse hardware UART with NUS.)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;You can for example use&amp;nbsp;&amp;#39;strcmp&amp;#39; to compare the string sent over NUS.&amp;nbsp;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;If you are looking for an example that uses &amp;quot;true/false&amp;quot; you can look at the &amp;quot;&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fble_sdk_app_blinky.html&amp;amp;cp=4_0_0_4_1_2_3" target="_blank" rel="noopener noreferrer"&gt;ble_app_blinky&lt;/a&gt;&amp;quot; example which uses the &amp;quot;&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fgroup__ble__lbs.html" target="_blank" rel="noopener noreferrer"&gt;Led Button Service&amp;quot;&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Please read through the theory about &lt;a href="https://devzone.nordicsemi.com/tutorials/b/bluetooth-low-energy" target="_blank" rel="noopener noreferrer"&gt;BLE in the tutorials&lt;/a&gt;&amp;nbsp;to understand how communication over BLE works.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE communication function</title><link>https://devzone.nordicsemi.com/thread/138016?ContentTypeID=1</link><pubDate>Thu, 28 Jun 2018 07:30:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c8b743b3-c1dd-4623-8dde-43b353241eb7</guid><dc:creator>yuval</dc:creator><description>&lt;p&gt;Martin hi,&lt;/p&gt;
&lt;p&gt;im using IAR studio. i found the function to transmit -&amp;nbsp;ble_nus_string_send(&amp;amp;m_nus, mydata, dataLength).&lt;/p&gt;
&lt;p&gt;i also found the function that receives&amp;nbsp;(app_uart_get(&amp;amp;data_array[index]). i can see the data in p_data but cant find a way to extract it and use the data as a condition for TRUE/FALSE testing. perhaps it is because of the way a BLE message is built. is there a function that searches value within a BLE message ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE communication function</title><link>https://devzone.nordicsemi.com/thread/137943?ContentTypeID=1</link><pubDate>Wed, 27 Jun 2018 14:33:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7dd3eeda-3541-4d11-a7c8-9de538732f5a</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Yk9,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Check out this &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/10729/my-device-is-freezing-and-restarting" target="_blank" rel="noopener noreferrer"&gt;debug thread&lt;/a&gt;&amp;nbsp;and also this &lt;a href="https://www.youtube.com/watch?v=uP8RYgYGRvI&amp;amp;list=PLx_tBuQ_KSqGHmzdEL2GWEOeix-S5rgTV&amp;amp;index=7" target="_blank" rel="noopener noreferrer"&gt;youtube tutorial&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please use some time to study the&amp;nbsp;&amp;quot;&lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fble_sdk_app_nus_eval.html&amp;amp;cp=4_0_0_4_1_2_24" target="_blank" rel="noopener noreferrer"&gt;ble_app_uart&lt;/a&gt;&amp;quot; example and use the &amp;quot;&lt;a href="https://www.nordicsemi.com/eng/Products/Nordic-mobile-Apps/nRF-Connect-for-Mobile" target="_blank" rel="noopener noreferrer"&gt;nRF Connect&lt;/a&gt;&amp;quot; app so you can send back and forth data.&lt;/p&gt;
&lt;p&gt;Also check out the &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fgroup__ble__nus.html&amp;amp;cp=4_0_0_6_3_23" target="_blank" rel="noopener noreferrer"&gt;NUS API&lt;/a&gt;&amp;nbsp;and how this is used in the example.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;- you can for example use &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.0.0%2Fgroup__ble__nus.html&amp;amp;anchor=ga4189d97e88b018e48847c3ea26c4b05d" target="_blank" rel="noopener noreferrer"&gt;ble_nus_string_send&lt;/a&gt;() to send over BLE.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;(&lt;em&gt;Some &lt;a href="https://github.com/bjornspockeli/nordic_workshop" target="_blank" rel="noopener noreferrer"&gt;tutorials which can be helpful&lt;/a&gt;&lt;/em&gt;)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE communication function</title><link>https://devzone.nordicsemi.com/thread/137609?ContentTypeID=1</link><pubDate>Tue, 26 Jun 2018 08:18:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62f2e15d-5f1d-4bab-9d99-f40bf0ac1957</guid><dc:creator>yuval</dc:creator><description>&lt;p&gt;thanks,&lt;/p&gt;
&lt;p style="direction:ltr;"&gt;my question is much simpler, i want 2 functions, transmit and receive. i want to communicate, via bluetooth, between my chip (on feather) and an app on my iPhone (Bluefruit for example). &lt;br /&gt;I want my main() to&amp;nbsp; wait to receive 1 byte from the app and transmit 1 byte (acknowledge) back to the app .&lt;br /&gt;can you help me find the easiest way to do that?&lt;/p&gt;
&lt;p style="direction:ltr;"&gt;also , how can i debug (breakpoint?) it ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: BLE communication function</title><link>https://devzone.nordicsemi.com/thread/137463?ContentTypeID=1</link><pubDate>Mon, 25 Jun 2018 13:54:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:474c6cf6-5b64-4f44-a72e-a6e9e00fb77a</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi yk9,&lt;/p&gt;
&lt;p&gt;&amp;nbsp; The easiest solution for you would be to just turn on logging through RTT.&lt;/p&gt;
&lt;p&gt;in &lt;em&gt;sdk_config.h:&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;//==========================================================
// &amp;lt;e&amp;gt; NRF_LOG_BACKEND_RTT_ENABLED - nrf_log_backend_rtt - Log RTT backend
//==========================================================
#ifndef NRF_LOG_BACKEND_RTT_ENABLED
#define NRF_LOG_BACKEND_RTT_ENABLED 1
#endif&lt;/pre&gt;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;And switch &lt;em&gt;default severity level&lt;/em&gt; to &lt;strong&gt;4&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// &amp;lt;o&amp;gt; NRF_LOG_DEFAULT_LEVEL  - Default Severity level
 
// &amp;lt;0=&amp;gt; Off 
// &amp;lt;1=&amp;gt; Error 
// &amp;lt;2=&amp;gt; Warning 
// &amp;lt;3=&amp;gt; Info 
// &amp;lt;4=&amp;gt; Debug 

#ifndef NRF_LOG_DEFAULT_LEVEL
#define NRF_LOG_DEFAULT_LEVEL 4
#endif
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Use J-link RTT viewer with these settings:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-2f34dd986e29422bb9180aa0e677e54b/pastedimage1529934820754v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;and you should be able to see what gets sent back and forth.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-2f34dd986e29422bb9180aa0e677e54b/pastedimage1529934855973v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>