<?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>about uart interrupt callback and mobile phone receive data in nRF52810</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37243/about-uart-interrupt-callback-and-mobile-phone-receive-data-in-nrf52810</link><description>Sorry Nordic engineers , I&amp;#39;m asking urgently , goods need to come out quickly 
 chip：nRF52810 
 SDK：nRF5_SDK_15.0.0_a53641a 
 examples：ble_peripheral \ ble_app_uart 
 
 external chip (UART Tx) ---&amp;gt; (UART Rx) nRF52810 (BLE) ---&amp;gt; mobile phone 
 
 【1】This</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 08 Aug 2018 17:31:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37243/about-uart-interrupt-callback-and-mobile-phone-receive-data-in-nrf52810" /><item><title>RE: about uart interrupt callback and mobile phone receive data in nRF52810</title><link>https://devzone.nordicsemi.com/thread/143438?ContentTypeID=1</link><pubDate>Wed, 08 Aug 2018 17:31:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fd1c81de-c1d0-402d-9931-19e634ead9f3</guid><dc:creator>howard n2wx</dc:creator><description>&lt;p&gt;You&amp;#39;re welcome. I&amp;#39;m happy it helped you.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about uart interrupt callback and mobile phone receive data in nRF52810</title><link>https://devzone.nordicsemi.com/thread/143433?ContentTypeID=1</link><pubDate>Wed, 08 Aug 2018 16:45:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:560832be-d13d-4340-8584-9a110ecf5212</guid><dc:creator>tony55723</dc:creator><description>&lt;p&gt;Thank you so mush , i&amp;#39;ve been stuck with this problem for two days.&lt;/p&gt;
&lt;p&gt;I always thought I wanted to correspond to the number (Pin 2 = &amp;nbsp;p0.00 ..........)&lt;/p&gt;
&lt;p&gt;Your answer is very fast, really, thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about uart interrupt callback and mobile phone receive data in nRF52810</title><link>https://devzone.nordicsemi.com/thread/143430?ContentTypeID=1</link><pubDate>Wed, 08 Aug 2018 16:10:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:978ec0e4-b350-4116-8132-5d0464c9b995</guid><dc:creator>howard n2wx</dc:creator><description>&lt;p&gt;Try it with RX_PIN_NUMBER&amp;nbsp; 9 .&amp;nbsp;&amp;nbsp; The pin assignments follow the GPIO numbering convention rather than the package pins (see &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/9837/problems-with-spi-on-nrf52-no-signal"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/9837/problems-with-spi-on-nrf52-no-signal)&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;gt;After power on, the system continues to execute the printf in the code.&lt;/p&gt;
&lt;p&gt;An RX pin assignment change may help. The event might be a framing error or something unexpected.&lt;/p&gt;
&lt;p&gt;&amp;gt; The entry condition for function uart_event_handle&amp;nbsp;should be external data.&lt;/p&gt;
&lt;p&gt;For receive data that&amp;#39;s correct&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about uart interrupt callback and mobile phone receive data in nRF52810</title><link>https://devzone.nordicsemi.com/thread/143426?ContentTypeID=1</link><pubDate>Wed, 08 Aug 2018 15:33:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:65ca5b9e-46a3-4960-a7be-dea6f222db9d</guid><dc:creator>tony55723</dc:creator><description>&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/444.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;This is my circuit diagram&lt;/p&gt;
&lt;p&gt;The other question, I don&amp;#39;t think it should be.&lt;/p&gt;
&lt;p&gt;The previous code picture, case APP_UART_DATA:&lt;/p&gt;
&lt;p&gt;After power on, the system continues to execute the printf in the code.&lt;/p&gt;
&lt;p&gt;The entry condition for function uart_event_handle&amp;nbsp;should be external data.&lt;/p&gt;
&lt;p&gt;Is my idea right?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about uart interrupt callback and mobile phone receive data in nRF52810</title><link>https://devzone.nordicsemi.com/thread/143394?ContentTypeID=1</link><pubDate>Wed, 08 Aug 2018 13:56:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b5fc113-d40f-46c7-bd63-c7b3b88915c0</guid><dc:creator>howard n2wx</dc:creator><description>&lt;p&gt;Do the pin assignments in uart_init() match your configuration? If you are using for ex one of the nice Fanstel modules you may need to change off the default pins.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about uart interrupt callback and mobile phone receive data in nRF52810</title><link>https://devzone.nordicsemi.com/thread/143375?ContentTypeID=1</link><pubDate>Wed, 08 Aug 2018 12:51:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f382c552-d13d-46e1-a2b5-4c09206b5b22</guid><dc:creator>tony55723</dc:creator><description>&lt;p&gt;&lt;span&gt;Thank you for answer ,&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;UART debug tool all the printed messages are APP_UART_TX_EMPTY&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But I want to print a message from the UART debug tool&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;In the end I&amp;#39;ll send the data to mobile phone&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/1513.333.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Mobile app is my design, I&amp;#39;ve done it before&lt;/p&gt;
&lt;p&gt;&lt;span&gt;probably know that must to turn on notify ,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;then to receive data from nRF52810.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about uart interrupt callback and mobile phone receive data in nRF52810</title><link>https://devzone.nordicsemi.com/thread/143358?ContentTypeID=1</link><pubDate>Wed, 08 Aug 2018 12:12:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d53b5df-96af-4cd5-b152-09384cbd165e</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;&lt;span style="font-weight:400;"&gt;What mobile app are you using to connect to the nRF52 chip? I assume you are using the nRF Connect app&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;[1] How do you know that it doesn&amp;rsquo;t enter uart_event_handle(..)? Have you tried to debug, and setting a breakpoint inside the function? Toggling a LED would also work.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Does the value of &amp;ldquo;TX Characteristics &amp;rarr;Value&amp;rdquo; inside the nRF Connect app change after sending a message over the terminal (assuming you have enabled notifications by clicking the 3 arrows marked with green in the image below)?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;[2] The terminal (UART Debug tool) should print the data sent from the phone, you can test it out by enter in a message by clicking the arrow up in the nRF Connect app beside RX Characteristic (marked with red in image below).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&amp;ldquo;if enter uart_event_handle() , this function ble_nus_data_send() is send data to mobile phone ?&amp;rdquo;: Yes, you are right. When entering uart_event_handle(), the data received over UART will be sent over BLE to the phone through the&amp;nbsp;&lt;span&gt;ble_nus_data_send() function.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;[3] No, you only need to enable notifications (in addition to connecting to the device). Then you should be able to send messages from the nRF52 chip to the phone&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/7433.nrfconnect.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="font-weight:400;"&gt;Cheers, Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about uart interrupt callback and mobile phone receive data in nRF52810</title><link>https://devzone.nordicsemi.com/thread/143276?ContentTypeID=1</link><pubDate>Wed, 08 Aug 2018 01:01:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3b90e793-cac0-4cd4-b98a-27ac9cbfac48</guid><dc:creator>tony55723</dc:creator><description>&lt;p&gt;Thank you for answer , but I have some questions.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/6648.123.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;【1】Board power on , &amp;nbsp;UART Debug tool can print 【UART Started】 , but send data , inability to enter &lt;span&gt;uart_event_handle()&amp;nbsp;&lt;/span&gt;(callback) ,&amp;nbsp;is enable need to open, or other settings?&lt;/p&gt;
&lt;p&gt;【2】&lt;span&gt;UART Debug&amp;nbsp;tool&amp;nbsp;can print the data from the phone , &amp;nbsp;if enter uart_event_handle() , this function&amp;nbsp;ble_nus_data_send() is send data to mobile phone ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;【3】Want to receive data from nRF52810 , mobile phone&amp;nbsp;only needs to open the notify , &amp;nbsp;other things should not be done?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: about uart interrupt callback and mobile phone receive data in nRF52810</title><link>https://devzone.nordicsemi.com/thread/143273?ContentTypeID=1</link><pubDate>Tue, 07 Aug 2018 21:18:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c224c27-c8ce-4ddc-af9f-368ab2015bb2</guid><dc:creator>howard n2wx</dc:creator><description>&lt;p&gt;Hi Tony,&lt;/p&gt;
&lt;p&gt;[1] See uart_event_handle() in that example&amp;#39;s main.c for the UART receiver. It&amp;#39;s called with an APP_UAR_DATA_READY event when the UART receives data.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;[2] nus_data_handler handles data going in the opposite direction, from the mobile phone ----&amp;gt; BLE ---&amp;gt; nRF52810&lt;/p&gt;
&lt;p&gt;[3] How to do this depends on the app.&amp;nbsp; The nRF Connect Android app allows you to connect and turn notifications on. Your own Android app will need to do something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="java"&gt;       // If nordic nus device
        if (UUID_NRF_UART_SERVICE.equals(characteristic.getUuid())) {
            BluetoothGattDescriptor descriptor = characteristic.getDescriptor(
                    UUID.fromString(CLIENT_CHARACTERISTIC_CONFIG));
            descriptor.setValue(BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE);
            mBluetoothGatt.writeDescriptor(descriptor);
        }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;in BluetoothLeService.java&amp;#39;s setChaacteristicNotification function&lt;/p&gt;
&lt;p&gt;Best Regards, Howard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>