<?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>I am a beginner for BLE. I want my ble to communicate with my nrf android app.</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/42842/i-am-a-beginner-for-ble-i-want-my-ble-to-communicate-with-my-nrf-android-app</link><description>I am using Keil uvision. Working with example codes, with uart example I got the code to send a data to mobile app through ble. But I cannot find code for receiving a data by ble which is send from the mobile app. Please help me. I need a code, such that</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 25 Jan 2019 05:23:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/42842/i-am-a-beginner-for-ble-i-want-my-ble-to-communicate-with-my-nrf-android-app" /><item><title>RE: I am a beginner for BLE. I want my ble to communicate with my nrf android app.</title><link>https://devzone.nordicsemi.com/thread/167804?ContentTypeID=1</link><pubDate>Fri, 25 Jan 2019 05:23:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ba35ad13-c79c-4202-b597-3b4a8424431a</guid><dc:creator>Abhimanyu K K</dc:creator><description>&lt;p&gt;That&amp;#39;s OK man, I got that and now I&amp;#39;m looking for OTA &amp;amp; Bootloader. Can you please help me that???&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I am a beginner for BLE. I want my ble to communicate with my nrf android app.</title><link>https://devzone.nordicsemi.com/thread/167798?ContentTypeID=1</link><pubDate>Fri, 25 Jan 2019 05:00:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ad07262-b5f9-4e18-ac04-50a17b883512</guid><dc:creator>Ashish</dc:creator><description>&lt;p&gt;My bad, I didn&amp;#39;t see that you are using sdk v12. The newer sdk has this event.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I am a beginner for BLE. I want my ble to communicate with my nrf android app.</title><link>https://devzone.nordicsemi.com/thread/167614?ContentTypeID=1</link><pubDate>Thu, 24 Jan 2019 11:15:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f73d1e1-ac4c-4f41-9488-2020b9460ca4</guid><dc:creator>Abhimanyu K K</dc:creator><description>&lt;p&gt;I got the answer. I am now able to send data (string) from my mobile to BLE device.&lt;/p&gt;
&lt;p&gt;In the main loop I didn&amp;#39;t write any code. In main() function there are some function call statements as it is in the BLE UART example pgm.&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;while(1)
	 {
		 if(i==500)
		 {
		  i=0;
		 }
		power_manage();
	 }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But&amp;nbsp;I coded inside the&amp;nbsp;&lt;strong&gt;nus_data_handler()&amp;nbsp;&lt;/strong&gt;function.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;static void nus_data_handler(ble_nus_t * p_nus, uint8_t * p_data, uint16_t length)
{

	uint8_t k=0;
	if (strstr((char*)(p_data), &amp;quot;on&amp;quot;)) {
    nrf_gpio_pin_write(1,1);
		printf(&amp;quot;ON&amp;quot;);
  }
	
	else if (strstr((char*)(p_data), &amp;quot;off&amp;quot;)) {
    nrf_gpio_pin_write(1,0);
		printf(&amp;quot;OFF&amp;quot;);
  }
	
	else if(strstr((char*)(p_data), &amp;quot;toggle&amp;quot;)) {
		while(k&amp;lt;10){
		nrf_gpio_pin_toggle(1);
		printf(&amp;quot;TOGGLE&amp;quot;);
			Delay_ms(100);
			k++;
		}
  }
	
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When I send &amp;quot;on&amp;quot; from my mobile, then the GPIO pin 1 will become high.&lt;/p&gt;
&lt;p&gt;And when I send &amp;quot;off&amp;quot; , the GPIO pin 1 will set low.&lt;/p&gt;
&lt;p&gt;And at last, when I send &amp;quot;toggle&amp;quot;, the pin 1 will start toggle for 10 times, as I coded.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I am a beginner for BLE. I want my ble to communicate with my nrf android app.</title><link>https://devzone.nordicsemi.com/thread/167607?ContentTypeID=1</link><pubDate>Thu, 24 Jan 2019 10:58:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7426296-6493-46b2-b661-02e0a50c6fc1</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/abhimanyu-k-k"&gt;Abhimanyu K K&lt;/a&gt; Are you referring to UART &amp;amp; Blinky programs provided by ST-Link? Or the ones in the nRF5 SDK?&lt;/p&gt;
&lt;p&gt;There are multiple ways you can do this. As mentioned, you can modify the ble_uart program to blink a led when you write 0x0 or 0x1 from the mobile phone to the peripheral device. Otherwise, you could also take a look at the &lt;a href="https://www.nordicsemi.com/DocLib/Content/SDK_Doc/nRF5_SDK/v15-2-0/ble_sdk_app_blinky"&gt;ble_app_blinky example&lt;/a&gt; provided in the nRF5 SDK &amp;amp; create a new boards file that will work with your &lt;span&gt;MDBT40&lt;/span&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I am a beginner for BLE. I want my ble to communicate with my nrf android app.</title><link>https://devzone.nordicsemi.com/thread/167302?ContentTypeID=1</link><pubDate>Wed, 23 Jan 2019 09:38:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a348da64-28c1-4a67-ac3b-2057d33f32e7</guid><dc:creator>Abhimanyu K K</dc:creator><description>&lt;p&gt;static void nus_data_handler(ble_nus_t * p_nus, uint8_t * p_data, uint16_t length)&lt;br /&gt;{&lt;br /&gt; for (uint32_t i = 0; i &amp;lt; length; i++)&lt;br /&gt; {&lt;br /&gt; // getData(p_data, bleRecData, i);&lt;br /&gt; &lt;br /&gt; while (app_uart_put(p_data[i]) != NRF_SUCCESS);&lt;br /&gt; }&lt;br /&gt; while (app_uart_put(&amp;#39;\r&amp;#39;) != NRF_SUCCESS);&lt;br /&gt; while (app_uart_put(&amp;#39;\n&amp;#39;) != NRF_SUCCESS);&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;There is no&amp;nbsp;&lt;strong&gt;BLE_NUS_EVT_RX_DATA .&lt;/strong&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I am a beginner for BLE. I want my ble to communicate with my nrf android app.</title><link>https://devzone.nordicsemi.com/thread/167263?ContentTypeID=1</link><pubDate>Wed, 23 Jan 2019 06:45:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7290d6da-fb0d-4d48-a917-aaf6aaff7d4c</guid><dc:creator>Ashish</dc:creator><description>&lt;p&gt;Hey,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;With UART program, i am guessing you have tried the ble_uart program.&lt;/p&gt;
&lt;p&gt;In that case, you should have a &lt;strong&gt;nus_data_handler&lt;/strong&gt; function defined. Inside that function you can look for&amp;nbsp;&lt;strong&gt;BLE_NUS_EVT_RX_DATA&lt;/strong&gt; event. You will get your data sent from the mobile device which you can check and actuate accordingly.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I am a beginner for BLE. I want my ble to communicate with my nrf android app.</title><link>https://devzone.nordicsemi.com/thread/167260?ContentTypeID=1</link><pubDate>Wed, 23 Jan 2019 05:53:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d45599f-0a55-4a83-a314-6584b22de788</guid><dc:creator>Abhimanyu K K</dc:creator><description>&lt;p&gt;You are right but I flashed 2 example pgms, UART and Beacon. It is perfectly ok. It is sending a String continuously in the UART pgm. But I need to send a data back to BLE. so I need that code only.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;OK lets you give me a whole pgm: By sending a data &amp;#39;1&amp;#39; to BLE through nRF UART application from mobile, one of the GPIO led must ON, and when a &amp;#39;0&amp;#39; is send, that LED must OFF.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I am a beginner for BLE. I want my ble to communicate with my nrf android app.</title><link>https://devzone.nordicsemi.com/thread/167083?ContentTypeID=1</link><pubDate>Tue, 22 Jan 2019 12:42:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38ae533f-dfe8-4ad7-99e7-96e48415ff4f</guid><dc:creator>wlgrd</dc:creator><description>&lt;p&gt;Well, even though it sits an nRF51822 on this module, Nordic is not selling or supporting this module directly. You have to take our example and adapt it according to the layout of the module itself. I don&amp;#39;t know if the SDK examples should work out of the box for this board. There has been others&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/9911/programming-raytac-mdbt40-nrf51822-based-for-led-blinking"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/9911/programming-raytac-mdbt40-nrf51822-based-for-led-blinking&lt;/a&gt;&amp;nbsp;who apparently has had some success for this board, just using the SDK.&lt;/p&gt;
&lt;p&gt;No J-Link found means that the j-link driver hasn&amp;#39;t seen any chip connected to your debugger. You should also verify that to begin with. It may find the programmer, but not the actual nrf.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It seems to me, that the PCA10028 examples should work, at least for LED&amp;#39;s.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I am a beginner for BLE. I want my ble to communicate with my nrf android app.</title><link>https://devzone.nordicsemi.com/thread/167068?ContentTypeID=1</link><pubDate>Tue, 22 Jan 2019 11:59:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e9f58b5f-b440-4e3e-8a51-fd4d7ee69c37</guid><dc:creator>Abhimanyu K K</dc:creator><description>&lt;p&gt;MDBT40. I need the firmware to flash inside this. I&amp;#39;m doing it in keil uvision5&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I am a beginner for BLE. I want my ble to communicate with my nrf android app.</title><link>https://devzone.nordicsemi.com/thread/167059?ContentTypeID=1</link><pubDate>Tue, 22 Jan 2019 11:12:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d3dc1cf-745f-4886-af3a-23b0f9e199fd</guid><dc:creator>wlgrd</dc:creator><description>&lt;p&gt;The code for the mobile app, or the code running on the hardware? What hardware are you using here? What chip?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I am a beginner for BLE. I want my ble to communicate with my nrf android app.</title><link>https://devzone.nordicsemi.com/thread/167039?ContentTypeID=1</link><pubDate>Tue, 22 Jan 2019 10:00:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af86a831-d9f0-4fa0-ad19-c96bce86a2f1</guid><dc:creator>Abhimanyu K K</dc:creator><description>&lt;p&gt;I am using St link,&amp;nbsp; while flashing blinky pgm there come an error box showing no L-link found.&lt;/p&gt;
&lt;p&gt;So I need the codes for just receive and take the data send from the app.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: I am a beginner for BLE. I want my ble to communicate with my nrf android app.</title><link>https://devzone.nordicsemi.com/thread/167025?ContentTypeID=1</link><pubDate>Tue, 22 Jan 2019 08:57:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1f21693-d018-46c1-9fef-795ef958a00e</guid><dc:creator>wlgrd</dc:creator><description>&lt;p&gt;Download this app&amp;nbsp;&lt;a href="https://play.google.com/store/apps/details?id=no.nordicsemi.android.nrfblinky"&gt;https://play.google.com/store/apps/details?id=no.nordicsemi.android.nrfblinky&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Use the firmware found in&amp;nbsp;&amp;lt;SDK&amp;gt;\examples\ble_peripheral\ble_app_blinky&lt;/p&gt;
&lt;p&gt;Out of the box, this does exactly what you want.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Source code for the Android application:&amp;nbsp;&lt;span&gt;&lt;a href="https://github.com/NordicSemiconductor/Android-nRF-Blinky"&gt;github.com/.../Android-nRF-Blinky&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>