<?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>How to send nRF8001 notifications</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/11866/how-to-send-nrf8001-notifications</link><description>Hi, I have peripheral device using the nRF8001. I&amp;#39;m using the Android BLE SDK on the MCU to talk to it. I am having a problem where I am using lib_aci_set_local_data() SDK function and not receiving command responses for it once in a while. I think it</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 16 Feb 2016 16:41:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/11866/how-to-send-nrf8001-notifications" /><item><title>RE: How to send nRF8001 notifications</title><link>https://devzone.nordicsemi.com/thread/44958?ContentTypeID=1</link><pubDate>Tue, 16 Feb 2016 16:41:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:891110b3-658e-4e9b-a344-877ddb6f4916</guid><dc:creator>Fred Roeber</dc:creator><description>&lt;p&gt;Hey David, That&amp;#39;s what I wanted to hear. I am thinking there could always be some other HW/SW issue other than your excellent radio product. But it&amp;#39;s always easier to &amp;quot;blame the other side of the interface&amp;quot; for problems ;-). I guess I will plan to try to get an SPI analyzer on the interface to hunt down the details when I get a bit of free time. For now I have added timeout recovery logic. Thanks for the answers!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send nRF8001 notifications</title><link>https://devzone.nordicsemi.com/thread/44957?ContentTypeID=1</link><pubDate>Tue, 16 Feb 2016 16:08:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:037a5fc0-0339-4e80-839a-8f20c6192b43</guid><dc:creator>David Edwin</dc:creator><description>&lt;p&gt;Just for the record, I have not seen any dropped command i.e. a command that does not send a response at all. I would suggest you wait until the command response comes and it if does not we need to take a closer look.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send nRF8001 notifications</title><link>https://devzone.nordicsemi.com/thread/44954?ContentTypeID=1</link><pubDate>Tue, 16 Feb 2016 16:01:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a2f25dd-cdb9-4056-9154-78054f308ea3</guid><dc:creator>Fred Roeber</dc:creator><description>&lt;p&gt;Hi Runar, Thanks for response. I was using set local data on the SET pipe and send data on the TX pipe for the same characteristic. I now understand that is redundant. And I will update my code to do one or the other (ie just write to the TX pipe when it&amp;#39;s open and I have available credits to write with, use the SET pipe otherwise to just update the local server value). That will avoid 2 back-to-back operations so maybe will reduce chances of losing the command response for the local data. I am still just wondering if anyone has ever talked about radio problems (rev D) dropping responses in rare cases? Of course I know it could be problems with MCU SW or SPI comms issues or...&lt;/p&gt;
&lt;p&gt;I hope things will be better with timeout recovery I have added and not doing two transfers. Thank you. Fred&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send nRF8001 notifications</title><link>https://devzone.nordicsemi.com/thread/44956?ContentTypeID=1</link><pubDate>Tue, 16 Feb 2016 14:29:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28a4228a-5487-4cb6-85fe-4f062abc7abe</guid><dc:creator>Fred Roeber</dc:creator><description>&lt;p&gt;David, Great answer as always. Thanks. Now I get it about how to handle notifications right. But I still have the problem that I sometimes seem to lose the command response for the local data I send. I guess I&amp;#39;ll just add a timeout handler and retry sending the local data if I don&amp;#39;t get a response.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send nRF8001 notifications</title><link>https://devzone.nordicsemi.com/thread/44953?ContentTypeID=1</link><pubDate>Tue, 16 Feb 2016 13:31:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4de59d74-a187-40ad-a41d-a3355db1ce7d</guid><dc:creator>run_ar</dc:creator><description>&lt;p&gt;As you point out you should use the pipe corresponding to the function you are calling. That is tx pipe for send data and set pipe for set data. Note that send data will update the value in the gattserver and notify the peer. So you don&amp;#39;t need to call set local data as well. I assume you where updating the same characteristic value with both set data and send data? or did you perform these operations on different characteristics?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send nRF8001 notifications</title><link>https://devzone.nordicsemi.com/thread/44955?ContentTypeID=1</link><pubDate>Tue, 16 Feb 2016 09:43:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f46405a-4269-430a-8275-9f1c4d254112</guid><dc:creator>David Edwin</dc:creator><description>&lt;p&gt;The &amp;quot;Set&amp;quot; Pipe is intended for peers that are polling the Characteristic by Reading. (i.e. Read Property)
The &amp;quot;TX&amp;quot; Pipe is intended to update the Characteristic and send the Notifications. (Notify Property)
If you are sending Notifications the &amp;quot;Set&amp;quot; operation is redundant, as the &amp;quot;TX&amp;quot; pipe will repeat the &amp;quot;Set&amp;quot; operation before sending the Notification.&lt;/p&gt;
&lt;p&gt;If a Characteristic has Read(Set Pipe) and Subscribed on the Notify (i.e TX Pipe Available), sending data on the TX pipe will suffice.
If a Characteristic has Read and not Subscribed on Notify, setting the local data on the Set pipe will suffice.&lt;/p&gt;
&lt;p&gt;The Credit is for over the air transactions and not on the local ACI, so the operations on the local Characteristic will not consume any Credit.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send nRF8001 notifications</title><link>https://devzone.nordicsemi.com/thread/44952?ContentTypeID=1</link><pubDate>Sat, 13 Feb 2016 12:33:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8e27097a-5e6b-41de-8034-e4ea40bd9002</guid><dc:creator>Fred Roeber</dc:creator><description>&lt;p&gt;I have checked examples and found that the ble_heart_rate_template_with_battery_service example shows handling a notification characteristic in the battery.cpp file. It shows what I do. Meaning always using lib_aci_set_local_data() with the SET pipe and using lib_aci_send_data with the TX pipe if that pipe is available and there are credits available. The examples ignore return codes however and none of my code does. My code would throw an assertion if any lib_aci call fails or a pipe status event indicating errors is received.&lt;/p&gt;
&lt;p&gt;I also have the lib_aci debugging outputs enabled so I can see that the set_local_data and send commands get sent to the radio. It&amp;#39;s just that the set_local_data command never gets the Command Response in the rare cases where lots of radio traffic is happening at the same time.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>