<?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>Losing Indication Confirmation from Central Device</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63769/losing-indication-confirmation-from-central-device</link><description>Hi, 
 We have encountered an issue where we are transferring data using our custom service back and forth from the nrf52811 to a remote test device and the radio becomes unresponsive. The test involves the remote device sending data to our service as</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 16 Jul 2020 16:53:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63769/losing-indication-confirmation-from-central-device" /><item><title>RE: Losing Indication Confirmation from Central Device</title><link>https://devzone.nordicsemi.com/thread/260438?ContentTypeID=1</link><pubDate>Thu, 16 Jul 2020 16:53:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0c7b4b07-a162-454e-85ba-085fa26bb066</guid><dc:creator>Daniel Veilleux</dc:creator><description>&lt;p&gt;This trace exhibits the same behavior as the original one: the peripheral sees the write request and ACKs it at the packet level and then the central stops talking. It appears as the though central is crashing/resetting, leading the peripheral to restart the advertiser four seconds later.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Losing Indication Confirmation from Central Device</title><link>https://devzone.nordicsemi.com/thread/260436?ContentTypeID=1</link><pubDate>Thu, 16 Jul 2020 16:05:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9dd92257-6b73-4c98-8ecd-58b79ffb0205</guid><dc:creator>amarchand</dc:creator><description>&lt;p&gt;Attached&amp;nbsp;is a set of&amp;nbsp;logs and traces from our updated devices. At the end of the logs/traces, it can be seen that the central device sends a ATT_WRITE_REQ to the nRF. The nRF app is able to process the incoming data, but it never responds to the ATT_WRITE_REQ with the corresponding ATT_WRITE_RESP, which causes the central device to time out and disconnect.&lt;/p&gt;
&lt;p&gt;It is not clear why the nRF is unable to respond to the ATT_WRITE_REQ.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/missing_5F00_write_5F00_response.zip"&gt;devzone.nordicsemi.com/.../missing_5F00_write_5F00_response.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Losing Indication Confirmation from Central Device</title><link>https://devzone.nordicsemi.com/thread/260374?ContentTypeID=1</link><pubDate>Thu, 16 Jul 2020 13:04:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:50f13bc8-054c-452d-93ae-deccb9e2cba6</guid><dc:creator>amarchand</dc:creator><description>&lt;p&gt;The point at which the nRF does not respond to packet 15059 the where it appears to have crashed, or at least become completely unresponsive. As seen in the logs and trace, it will not respond via Bluetooth, nor will it respond to commands over the UART.&lt;/p&gt;
&lt;p&gt;We don&amp;#39;t make any changes to the SDK, so the APP_ERROR_CHECK should print if it fails.&lt;/p&gt;
&lt;p&gt;At this point we have made significant changes to both our nRF application and the central device, so I will provide an update once we are able to conduct more testing.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Drew&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Losing Indication Confirmation from Central Device</title><link>https://devzone.nordicsemi.com/thread/260364?ContentTypeID=1</link><pubDate>Thu, 16 Jul 2020 12:41:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed5d2ede-4d72-4717-aa46-3f65beef6159</guid><dc:creator>Edvin</dc:creator><description>[quote user="amarchand"]We have attempted to use the nRF Sniffer in the past with varied success. We can try again if that would be mroe helpful to you.[/quote]
&lt;p&gt;&amp;nbsp;As I said, it is at least more familiar. Sorry for the inconvenience.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I noticed the timestamps in the trace (I had to scroll to the right. Sorry for not noticing this). I had also set the LE DATA filter, which stripped away the advertisements after packet 15059, which was why I suspected the cut in the trace.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Correct me if I am wrong here:&lt;/p&gt;
&lt;p&gt;15052: Indication from nRF -&amp;gt; central.&lt;/p&gt;
&lt;p&gt;15053:&amp;nbsp;Acking indication (?)&amp;nbsp;central -&amp;gt; nRF (acking the packtet 15052)&lt;/p&gt;
&lt;p&gt;15054: empty packet nRF -&amp;gt; central&amp;nbsp;&lt;/p&gt;
&lt;p&gt;15055:&amp;nbsp;some data (Do you know what this is?) central -&amp;gt; nRF&lt;/p&gt;
&lt;p&gt;15056: empty packet nRF -&amp;gt; central(not acked)&lt;/p&gt;
&lt;p&gt;15057:&amp;nbsp;retransmission of 15055 central -&amp;gt; nRF (because it didn&amp;#39;t pick up the Ack from nRF in the previous packet)&lt;/p&gt;
&lt;p&gt;15058: empty packet nRF -&amp;gt; central&lt;/p&gt;
&lt;p&gt;15059: empty packet central -&amp;gt; nRF&lt;/p&gt;
&lt;p&gt;Pause 4 seconds&lt;/p&gt;
&lt;p&gt;15060 -&amp;gt; ... advertisements from nRF.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So two things happen at the end here. There i a retransmission of a packet, but that shouldn&amp;#39;t matter. Then the central sends a packet that the nRF doesn&amp;#39;t reply to (15059). It is possible that either the nRF doesn&amp;#39;t pick up the packet from the central, or the sniffer didn&amp;#39;t pick up the packet from the nRF. Either way, it is radio silence from then on, and for 4 seconds (exactly). Is this your supervision timeout?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I suspect the central for being guilty. In a BLE connection it is always the central that is the responsible for sending the first packet. I don&amp;#39;t know the HW of this sniffer, but the sniffer doesn&amp;#39;t pick up any more packets from the central, and apparently, not the nRF either.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;since it doesn&amp;#39;t have any packets to reply to, the nRF doesn&amp;#39;t send anything until the connection times out (4 seconds), and then it starts advertising again after the connection timed out.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;However, this should give the disconnected event in the nRF. If you don&amp;#39;t see it, is it possible that you are waiting for some specific event in the ble_evt_handler() blocking the disconnected event?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If the case is that the nRF crashes (hardfault or app error), the central should keep sending empty packets for the duration of the supervision timeout. I don&amp;#39;t know what changes you may have done to the SDK, but the APP_ERROR_CHECK(err_code) should print something in the log when it receives an err_code != 0. Do you see that? I don&amp;#39;t see it from the log, but I don&amp;#39;t know if you actively removed it. You can check what it looks like by putting:&lt;br /&gt;APP_ERROR_CHECK(1); somewhere in your project after you initialize your log.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would check the central in the connection. I find it weird that the central goes silent. You can test this from sniffing. If they are in a connection, and you cut the power on the peripheral, you will see that the central will keep sending messages. If you cut the power on the central, you will see that the link goes silent, because the peripheral doesn&amp;#39;t have anything to reply to. Then, after the supervision timeout, it will restart advertising.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Losing Indication Confirmation from Central Device</title><link>https://devzone.nordicsemi.com/thread/260343?ContentTypeID=1</link><pubDate>Thu, 16 Jul 2020 11:35:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4144ff2-b15b-4128-9112-c28af822c7e9</guid><dc:creator>amarchand</dc:creator><description>&lt;p&gt;I have tried to use the nRF Sniffer but it&amp;nbsp;can only decode the ATT packets on the single connection&amp;nbsp;where it captures the LTK during pairing. Since our test script involves multiple connects and disconnects, we will need to continue using the Frontline snifffer.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Drew&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Losing Indication Confirmation from Central Device</title><link>https://devzone.nordicsemi.com/thread/260219?ContentTypeID=1</link><pubDate>Wed, 15 Jul 2020 17:14:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c49fe09-d572-4fb8-a143-4db7fa0c21c8</guid><dc:creator>amarchand</dc:creator><description>&lt;p&gt;We are using SDK 16 with Soft Device 113 version 7.0.1&lt;/p&gt;
&lt;p&gt;Yes, the nRF peripheral is address&amp;nbsp;&lt;span&gt;00:07.4d:a8:e8:ed.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The trace I sent is the entire over-the-air transaction. It was not stopped nor cut off. The &amp;quot;Parser Service Events&amp;quot; you see in the RTT ouput are the event we see in our custom service event handler, which are being&amp;nbsp;output from its BLE event interrupt handler. They are output in hexadecimal. Nothing was removed from the logs. Everything we provided was the complete output from the radio and remote device. We do not get a hardfault at the point where we believe the application and/or soft device has crashed.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;We do not know if our application is running when the ATT_WRITE_REQ is missed, but it appears not to be, since the event never gets to the service interrupt handler. We do not see the disconnect event in the app since it appears to be hung by the time the remote device times out the connection. The other device is a Linux-based test application that is not using a Nordic radio.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;We have attempted to use the nRF Sniffer in the past with varied success. We can try again if that would be mroe helpful to you.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I think I have answered all of your questions. If I have not or you need more information please let me know.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best Regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Drew&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Losing Indication Confirmation from Central Device</title><link>https://devzone.nordicsemi.com/thread/260207?ContentTypeID=1</link><pubDate>Wed, 15 Jul 2020 16:11:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19e116f6-093c-44a9-af4a-7f16b353d988</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Thank you for the input,&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/foolsday"&gt;Daniel Veilleux&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;Just to be completely sure, the nRF is the peripheral, and the one with address 00:07.4d:a8:e8:ed, right? (The device sending packet 15052). I am sorry if that is a stupid question, but I am not that familiar with the frontline sniffer.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I agree with&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/members/foolsday"&gt;Daniel Veilleux&lt;/a&gt;, that 15052 is acked by the other device, but packet 15056 is not, which you can tell from the SN and NESN sequence. Are these the last packets over the air, or did you cut the trace there? I don&amp;#39;t see any timestamps in the trace (but that may be because I don&amp;#39;t know where they are written, or something weird with my setup), but I assume the connection has not timed out that quick. It should be able to handle some packet loss.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I also received the log from the nRF which you sent to my colleague via email. It is one of the &amp;quot;parser service event&amp;quot; lines that you are missing? What are the numbers at the end of these lines?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So your application is still running at this point in time, where you lack the&amp;nbsp;&lt;span&gt;ATT_WRITE_REQ reply? Do you see this event on the nRF? And if so, when you reply, what function do you use to reply, and what does it return?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;There doesn&amp;#39;t appear to be an app_error, based on the log. You didn&amp;#39;t remove that from the log or the logging module? Since you are using the nRF52811, I assume that you are using an SDK version that will log this automatically.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What SDK and Softdevice version do you use?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;Do you see any hardfault? (Processor stopping while debugging, and the callstack is pointing somewhere around 0x0a60)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;If it is not too much to ask, is it possible to capture a sniffer trace using the nRF Sniffer? I am not saying it is better, but in Nordic we are a bit more familiar with it, and know where to look.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Edit:&lt;/p&gt;
&lt;p&gt;If the packets stop at the end of the sniffer trace. Do you see a disconnected event in any of the devices, the central or the peripheral? If so, what is the disconnect reason? If it is on the nRF, you can check it using:&lt;/p&gt;
&lt;p&gt;NRF_LOG_INFO(&amp;quot;disconnected, reason: 0x%02x&amp;quot;, p_ble_evt-&amp;gt;evt.gap_evt.params.disconnected.reason);&lt;/p&gt;
&lt;p&gt;in the&amp;nbsp;BLE_GAP_EVT_DISCONNECTED event in the ble_evt_handler().&lt;/p&gt;
&lt;p&gt;If you see it on the other device (central), I guess they have their own SDK, if it is not a Nordic device.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Losing Indication Confirmation from Central Device</title><link>https://devzone.nordicsemi.com/thread/259990?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 19:21:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:705acfd5-b281-4ac9-b978-098f835837c4</guid><dc:creator>Daniel Veilleux</dc:creator><description>&lt;p&gt;Seems odd that the central never sends another packet after 15,059. And without any further packets from the central it&amp;#39;s impossible to say whether or not the peripheral was still awake (the missing packet at 15,060 could have just been lost due to interference).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Losing Indication Confirmation from Central Device</title><link>https://devzone.nordicsemi.com/thread/259987?ContentTypeID=1</link><pubDate>Tue, 14 Jul 2020 19:08:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a507fa2-99fa-4b74-ac62-f7b923563a92</guid><dc:creator>Daniel Veilleux</dc:creator><description>&lt;p&gt;Frame 15054 indicates that the peripheral does in fact receive the confirmation packet. Then the central sends a write request but misses the ACK from the peripheral. The central then sends the write requests again and the peripheral ACKs it again. The central sees that the write request was received by the peripheral but the last packet that the peripheral sends has MD=1 so the central sends another packet. The peripheral never responds and around four seconds later the peripheral starts advertising.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>