<?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>NUS UART data handler issue</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16448/nus-uart-data-handler-issue</link><description>file.txt Hi, 
 In my application I am using UART service which receives the data sent from APP. I am using nrf connect APP. I am sending simply 1 and 2 from UART service. Sometimes the nus data handler is called and dedicated operation is being performed</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 28 Sep 2016 13:53:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16448/nus-uart-data-handler-issue" /><item><title>RE: NUS UART data handler issue</title><link>https://devzone.nordicsemi.com/thread/62964?ContentTypeID=1</link><pubDate>Wed, 28 Sep 2016 13:53:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7cf17fef-c4b2-49eb-8299-19c493b6e1e9</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi Ankush&lt;/p&gt;
&lt;p&gt;If you are getting every message in the ble_dispatch function, but not in the  UART handler in the application, then something in the ble_nus_on_ble_evt function is not forwarding the callback to the application. Just step through the code from where you break in ble_evt_dispatch to see why the UART handler in the application is not called.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS UART data handler issue</title><link>https://devzone.nordicsemi.com/thread/62963?ContentTypeID=1</link><pubDate>Tue, 27 Sep 2016 04:20:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7b78c71b-3c1e-4e2a-bc03-46eb1df707c7</guid><dc:creator>Ankush</dc:creator><description>&lt;p&gt;Hi ,&lt;/p&gt;
&lt;p&gt;Any updates over the issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS UART data handler issue</title><link>https://devzone.nordicsemi.com/thread/62962?ContentTypeID=1</link><pubDate>Sat, 24 Sep 2016 09:53:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3d5756a5-0922-484d-817a-fd72737f4cad</guid><dc:creator>Ankush</dc:creator><description>&lt;p&gt;Hi Stefan,&lt;/p&gt;
&lt;p&gt;I tried putting the breakpoints in ble_dispatch function. It is hitting all the times to breakpoints when I am sending data from APP. I am getting values as folloew:
1)uuid_type = 0x02
2)service handle = 15
3)value handle = 20
4)_evt_id  = 80
5)evt_len = 19&lt;/p&gt;
&lt;p&gt;It is happening only with UART. HRS and BAS service working fine.&lt;/p&gt;
&lt;p&gt;Can you suggest any steps to resolve the issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS UART data handler issue</title><link>https://devzone.nordicsemi.com/thread/62961?ContentTypeID=1</link><pubDate>Fri, 23 Sep 2016 13:00:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ccae7901-e6f0-43b2-979e-5c46549e513b</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Try to set a breakpoint in ble_evt_dispatch function in the main.c file. That should be hit when you send something over BLE. If you get nothing there, then you could get a sniffer trace to see what is happening on air. If the phone is not sending anything, then it is a phone/phone app problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS UART data handler issue</title><link>https://devzone.nordicsemi.com/thread/62960?ContentTypeID=1</link><pubDate>Fri, 23 Sep 2016 07:56:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:942941f9-f9e0-4fc3-9481-6ed749bfe602</guid><dc:creator>Ankush</dc:creator><description>&lt;p&gt;Hi Stefan,&lt;/p&gt;
&lt;p&gt;I tried what you suggested but facing the same issue. I tried putting a variable in onwrite function of nus.c and using the same variable in main function. Like if var = 0x01 then perform the task. But still facing the same issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS UART data handler issue</title><link>https://devzone.nordicsemi.com/thread/62958?ContentTypeID=1</link><pubDate>Mon, 19 Sep 2016 11:31:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e73002d-4dbc-4162-8881-46fe6c0035ff</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi Ankush&lt;/p&gt;
&lt;p&gt;Im trying this with nRF Connect on iphone, SD 132 3.0.0 and ble_app_uart from SDK 12.0.0. I observe that the app does not accept sending values 1 or 2, you need to type in 01 or 02, because the expression is in hex numbers, i.e. 0x01 and 0x02. Also if you write a high number, e.g. FF, you need to write that in capital letters, ff is not accepted.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS UART data handler issue</title><link>https://devzone.nordicsemi.com/thread/62959?ContentTypeID=1</link><pubDate>Sat, 17 Sep 2016 07:22:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:132da974-d054-46ca-8740-bed308b375a5</guid><dc:creator>Ankush</dc:creator><description>&lt;p&gt;Hi Stefan,&lt;/p&gt;
&lt;p&gt;Thanks for reply. Sorry for late reply. You are right. Sometimes when I am sending uint8 value from APP, NUS data handler is not getting called.This is not the problem with other BLE codes that I have implemented previously. I am not getting what is exactly the issue.&lt;/p&gt;
&lt;p&gt;I have set APP_TIMER_OP_QUEUE_SIZE = 16. Does it makes any difference?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NUS UART data handler issue</title><link>https://devzone.nordicsemi.com/thread/62957?ContentTypeID=1</link><pubDate>Fri, 16 Sep 2016 15:28:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad1a2fdd-5cba-4610-a8fe-8a258dae7575</guid><dc:creator>Stefan Birnir Sverrisson</dc:creator><description>&lt;p&gt;Hi Ankush&lt;/p&gt;
&lt;p&gt;I am not sure I understand the problem. Can you clarify?  Are you not always getting interrupt from the nus service when sending data from the app?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>