<?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>Can you use scan response as an acknowledgment on peripheral device?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/20778/can-you-use-scan-response-as-an-acknowledgment-on-peripheral-device</link><description>Can a peripheral device know when the client made a scan response request? I want to use scan response as a form of acknowledgment so the peripheral device knows that the client got the payload data in the advertising and scan response packets. 
 I am</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 24 Mar 2017 21:16:38 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/20778/can-you-use-scan-response-as-an-acknowledgment-on-peripheral-device" /><item><title>RE: Can you use scan response as an acknowledgment on peripheral device?</title><link>https://devzone.nordicsemi.com/thread/81155?ContentTypeID=1</link><pubDate>Fri, 24 Mar 2017 21:16:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3250611e-6f95-423f-9b65-e9bb0a0c8273</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;You doesn&amp;#39;t seem to be so much confused. Your idea make sense, you will not get full reliability or bi-directional link (that is possible only through connection) but what you propose is basically simulating what BLE is doing on LL layer during connection. I would say that using connection should be always preferred but you might achieve better power consumption with what you describe (definitely lower bandwidth and only one-way data transfer and only simple ACK in opposite direction).&lt;/p&gt;
&lt;p&gt;To your problem with &lt;code&gt;BLE_GAP_EVT_SCAN_REQ_REPORT&lt;/code&gt;: you need to enable reporting from Soft Device first through SV (SD API) call. See this &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v4.0.2/group___b_l_e___g_a_p___e_n_u_m_e_r_a_t_i_o_n_s.html#ga2da79b1e293414621d79814490a8598e"&gt;description&lt;/a&gt;(but make sure you use correct construction depending on SD type and version you are using).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can you use scan response as an acknowledgment on peripheral device?</title><link>https://devzone.nordicsemi.com/thread/81154?ContentTypeID=1</link><pubDate>Fri, 24 Mar 2017 21:03:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ae7642d-594f-4453-91fa-5f09a77c307f</guid><dc:creator>Zoher Ghadyali</dc:creator><description>&lt;p&gt;So I just wanted to clarify something. I am working with this &lt;a href="https://devzone.nordicsemi.com/tutorials/5/"&gt;BLE advertising tutorial&lt;/a&gt; and I got to the end where I add the scan response data. What I want to do is use the scan response as an ACK from the central device to the peripheral device. Using your answer, I attempted to add a case to the on_ble_evt() function in main.c, linked &lt;a href="https://github.com/NordicSemiconductor/nrf51-ble-tutorial-advertising/blob/master/SDK11.0.0/nrf5-ble-tutorial-advertising/main.c"&gt;here&lt;/a&gt; but I found that I was never entering that case.&lt;/p&gt;
&lt;p&gt;To make it absolutely clear what I am trying to do, I want the peripheral device to raise a flag and change the content of the next advertising packet in the next advertising interval when it sees the scan response request. In this way, I plan on iterating through my payload data while ensuring that the central device does receive my payload data in the advertising packet.&lt;/p&gt;
&lt;p&gt;I would really appreciate any and all advice you have! I am very confused. Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can you use scan response as an acknowledgment on peripheral device?</title><link>https://devzone.nordicsemi.com/thread/81153?ContentTypeID=1</link><pubDate>Fri, 24 Mar 2017 16:10:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5088c145-7394-4773-9a98-bec5d9838ea9</guid><dc:creator>endnode</dc:creator><description>&lt;p&gt;There are 3 aspects:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Yes, APP on nRF5x on top of Soft Device running GAP Peripheral role will get event when there is active scanning (See &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.s132.api.v4.0.2/group___b_l_e___g_a_p___e_n_u_m_e_r_a_t_i_o_n_s.html#ggada486dd3c0cce897b23a887bed284fefad439a364d0294dd6d1937534bdf15e88"&gt;&lt;code&gt;BLE_GAP_EVT_SCAN_REQ_REPORT&lt;/code&gt; and &lt;code&gt;ble_gap_evt_scan_req_report_t&lt;/code&gt;&lt;/a&gt; in S132 Soft Device API documentation). As you see there is Scanner&amp;#39;s MAC address and RSSI visible to GAP Peripheral app.&lt;/li&gt;
&lt;li&gt;However you won&amp;#39;t get any callback before SCAN_RSP packet is issued by the stack so you cannot change SCAN_RSP packet structure based on Scanner&amp;#39;s MAC or other parameter, that must be set before Adv. interval occurs.&lt;/li&gt;
&lt;li&gt;In general Advertising and Scanning are not suited for acknowledged link and unless the point 1 above solves your problem then you would need to choose some open source stack (e.g. Zephyr or Mynewt projects) and try to manage SCAN_RSP data modification within these few microseconds you have between SCAN_REQ and SCAN_RSP. But that seems close to impossible.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Cheers Jan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>