<?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>Which SDK example should I use to setup the NRF51822 to only receive data from a Central, in this case a smart phone.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/29915/which-sdk-example-should-i-use-to-setup-the-nrf51822-to-only-receive-data-from-a-central-in-this-case-a-smart-phone</link><description>Hello, 
 I would like to configure the NRF51822 as a Peripheral to receive data from a smart phone, and then call a routine when the receive process has been terminated. 
 I have this working with the RF Digital Simblee chip, but now I need to do this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 01 Feb 2018 17:45:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/29915/which-sdk-example-should-i-use-to-setup-the-nrf51822-to-only-receive-data-from-a-central-in-this-case-a-smart-phone" /><item><title>RE: Which SDK example should I use to setup the NRF51822 to only receive data from a Central, in this case a smart phone.</title><link>https://devzone.nordicsemi.com/thread/119413?ContentTypeID=1</link><pubDate>Thu, 01 Feb 2018 17:45:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a6b6a76-7892-4676-8af7-2392edb2c8f2</guid><dc:creator>brian fleming</dc:creator><description>&lt;p&gt;Hello, I have the IDE flashing the device and it is advertising now, but unfortunately I have some other work responsibilities which are going to delay development with this device.&amp;nbsp; I am at the point now where I can start creating code and testing, so I may have subsequent questions.&amp;nbsp; Thanks for your support.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Which SDK example should I use to setup the NRF51822 to only receive data from a Central, in this case a smart phone.</title><link>https://devzone.nordicsemi.com/thread/118980?ContentTypeID=1</link><pubDate>Tue, 30 Jan 2018 17:38:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:535e4857-2272-4c67-ab16-6ac234b96a42</guid><dc:creator>MANGO</dc:creator><description>&lt;p&gt;Hi, Brian.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;I can use a higher version if you think it will be better.&lt;/code&gt; Hmm, Nordic devteam says that &lt;code&gt;Do not judge the quality of SDK based on number of entries here&lt;/code&gt;. For instance, check this &lt;a href="https://devzone.nordicsemi.com/question/93241/what-are-sdk-12x0-known-issues/"&gt;page&lt;/a&gt; and hope this helps for choosing the SDK.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;Java code&lt;/code&gt;. I have no experience with Android app projects. How about checking Nordic&amp;#39;s &lt;a href="https://github.com/NordicPlayground/Android-nRF-UART"&gt;GitHub page&lt;/a&gt;? I think this will help you.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;the array p_data can be read at the routine on_ble_evt in the second case statement assuming that&lt;/code&gt; I haven&amp;#39;t understood your last question;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;are you trying to check the &lt;code&gt;p_data&lt;/code&gt; array before the program counter points &lt;code&gt;nus_data_handler&lt;/code&gt;?&lt;/p&gt;
&lt;p&gt;-Regards, MANGO&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Which SDK example should I use to setup the NRF51822 to only receive data from a Central, in this case a smart phone.</title><link>https://devzone.nordicsemi.com/thread/118979?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2018 05:54:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a134a65-390d-4356-9847-29c2d38450bc</guid><dc:creator>brian fleming</dc:creator><description>&lt;p&gt;We will always have a fixed known length of data sent via BLE from the phone.  Am I correct in assuming that in the routine nus_data_handler , the array p_data can be read at the routine on_ble_evt in the second case statement assuming that it is called when the packet of BLE data has been received in it&amp;#39;s entirety?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Which SDK example should I use to setup the NRF51822 to only receive data from a Central, in this case a smart phone.</title><link>https://devzone.nordicsemi.com/thread/118978?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2018 02:18:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33a7cf26-9aa7-46b0-a8d6-1c20d2a360a6</guid><dc:creator>brian fleming</dc:creator><description>&lt;p&gt;Sorry, the above looks really ugly.  Anyway, there is nothing specifically Nordic about the above, the important stuff is standard code from the Bluetooth Application Accelerator.  The above works perfectly with the Simblee chip which uses the ARM Cortex M0 processor.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Which SDK example should I use to setup the NRF51822 to only receive data from a Central, in this case a smart phone.</title><link>https://devzone.nordicsemi.com/thread/118977?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2018 02:13:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1224c1e4-0194-423d-8805-64993a3ad1c9</guid><dc:creator>brian fleming</dc:creator><description>&lt;p&gt;Thanks, at this point I am using nRF5_SDK_11.0.0  but I can use a higher version if you think it will be better.&lt;/p&gt;
&lt;p&gt;The Java code in my Android app is taken from the Bluetooth Application Accelerator.&lt;/p&gt;
&lt;p&gt;After all the preliminaries are done, the code is sent by the following:&lt;/p&gt;
&lt;p&gt;BluetoothGattCharacteristic mCharacteristic                                                                 ;
mCharacteristic = gatt.getService(UUID_SIMBLEE_SERVICE).getCharacteristic(UUID_SIMBLEE_CHARACTERISTIC_2)    ; // eleven bytes sent for newValue
// &amp;quot;00 0001&amp;quot;  includes &amp;#39;00&amp;#39; for a start byte, and &amp;#39;0001&amp;#39; for the mode control for the Z8 time setter interrupt.
// &amp;#39;0001&amp;#39; is for time setter mode
// The first &amp;quot;00&amp;quot; is disregarded by the Simblee
newValue =  &amp;quot;00 0001&amp;quot;                   +
h_nibble_h  + h_nibble_l    +
m_nibble_h  + m_nibble_l    +
s_nibble_h  + s_nibble_l    +
ap_nibble_h + ap_nibble_l   +
byte_5_h    + byte_5_l      +
byte_6_h    + byte_6_l      +
byte_7_h    + byte_7_l      +
byte_8_h    + byte_8_l      +
byte_9_h    + byte_9_l      +
byte_10_h   + byte_10_l     +
byte_11_h   + byte_11_l     ;
byte[] dataToWrite = parseHexStringToBytes(newValue)                                                        ;
mBleWrapper.writeDataToCharacteristic(mCharacteristic, dataToWrite )                                        ;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Which SDK example should I use to setup the NRF51822 to only receive data from a Central, in this case a smart phone.</title><link>https://devzone.nordicsemi.com/thread/118976?ContentTypeID=1</link><pubDate>Fri, 26 Jan 2018 01:08:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:115db3e0-ccdd-407e-ab56-2232387d9aa4</guid><dc:creator>MANGO</dc:creator><description>&lt;p&gt;Hello, Brian.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;gt; Which SDK?&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/attachment/3c9f3e064e120a33588253449db914b9" alt="ICVersion" /&gt;&lt;/p&gt;
&lt;p&gt;I hope I&amp;#39;m looking at the correct MDBT40&amp;#39;s datasheet. &lt;strong&gt;This says that the &lt;code&gt;IC version 3&lt;/code&gt; is used.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Looking at the &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf51%2Fdita%2Fnrf51%2Fcompatibility_matrix%2FnRF51422_nRF51822_ic_rev_sdk_sd_comp_matrix.html"&gt;Nordic&amp;#39;s Compatibility matrix&lt;/a&gt;, choose SDK 8 ~ 12. You can download the SDK from &lt;a href="https://developer.nordicsemi.com/nRF5_SDK/"&gt;this webpage&lt;/a&gt;. Note that SDK 13 or above runs on nRF52 devices, not nRF51 devices.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Contact Raytac to check whether the MDBT40 uses the IC version 3 nRF51 series, please.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;gt; All I want is for the NRF51822 to receive a string of data from the phone and put it into an array&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&amp;gt; I am thinking that the UART example would do it&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;As you mentioned, I agree that &lt;code&gt;E:\NordicSDK\nRF5_SDK_xxxx\examples\ble_peripheral\ble_app_uart&lt;/code&gt; example will the suitable for you.&lt;/p&gt;
&lt;p&gt;As mentioned in the &lt;a href="http://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v12.3.0%2Fble_sdk_app_nus_eval.html&amp;amp;cp=4_0_5_4_2_2_19"&gt;Nordic Infocenter page (SDK 12 based)&lt;/a&gt;, if your smartphone (central) app sends a string via NUS (Nordic UART Service), &lt;code&gt;nus_data_handler&lt;/code&gt; is called. This function handles the received data.&lt;/p&gt;
&lt;p&gt;-Regards, MANGO&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>