<?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 BLE scan is done in the DFU (OTA) example?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/61159/how-ble-scan-is-done-in-the-dfu-ota-example</link><description>Hi, 
 For nRF52840 BLE, in the DFU (OTA) example (buttonless OTA): 
 ../nRF5_SDK_15.3.0_59ac345/examples/ble_peripheral/ble_app_buttonless_dfu 
 How scanning is done? Or where and which function initializes scan parameters? Something similar to 
 nrf_ble_scan_init_t</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 12 May 2020 00:41:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/61159/how-ble-scan-is-done-in-the-dfu-ota-example" /><item><title>RE: How BLE scan is done in the DFU (OTA) example?</title><link>https://devzone.nordicsemi.com/thread/249321?ContentTypeID=1</link><pubDate>Tue, 12 May 2020 00:41:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46714637-4702-46fc-92bf-69fc9366e9e7</guid><dc:creator>TigerD</dc:creator><description>&lt;p&gt;Vidar,&lt;/p&gt;
&lt;p&gt;I am a newbie on BLE. I read a bit more. Now, my understanding is that the connection is handled by the event&lt;/p&gt;
&lt;p&gt;BLE_GAP_EVT_CONNECTED&lt;/p&gt;
&lt;p&gt;and the starting point is handled by&lt;/p&gt;
&lt;p&gt;Buttonless_Dfu_Sdh_State_Observer&lt;/p&gt;
&lt;p&gt;Those events are provided through services. ( But how the service data are exchanged and what is the data link layer of the service communication? Is it through non-primary BLE channels? Am I right or wrong?)&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;David&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How BLE scan is done in the DFU (OTA) example?</title><link>https://devzone.nordicsemi.com/thread/249293?ContentTypeID=1</link><pubDate>Mon, 11 May 2020 18:49:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a112a65e-6137-4ed1-b0c1-137c4d6555b5</guid><dc:creator>TigerD</dc:creator><description>&lt;p&gt;Vidar,&lt;/p&gt;
&lt;p&gt;Ok, DFU controller is at the host side. So I guess the CONNECT button on the DFU controller is connecting to the advertisement by the Device. BUT how and when the BLE device starts the firmware update process without scanning? I am still missing this point. Please explain. On the Host side (Andriod), clicks DFU icon, opens firmware .zip file, and reads firmware data into buffer, THEN it trys to connect DFU Target, (THIS SHALL BE THE DEVICE SIDE). It finds the services, ..., then JUMPing to DFU bootloader. SO where and how the DFU controller is connected to the DEVICE:&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Connected to DA:D5:58:B8:6F:C1&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If the device is not scanning? Sorry, I am missing something here.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;David&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;//=============================================&lt;/p&gt;
&lt;p&gt;I 12:00:10.042 [DFU] Firmware file opened successfully&lt;br /&gt;V 12:00:10.042 [DFU] Connecting to DFU target...&lt;br /&gt;D 12:00:10.044 [DFU] gatt = device.connectGatt(autoConnect = false)&lt;br /&gt;I 12:00:10.051 [DFU] Connected to DA:D5:58:B8:6F:C1&lt;br /&gt;V 12:00:10.052 [DFU] Discovering services...&lt;br /&gt;D 12:00:10.052 [DFU] gatt.discoverServices()&lt;br /&gt;I 12:00:10.055 [DFU] Services discovered&lt;br /&gt;D 12:00:10.075 [DFU] wait(1000)&lt;br /&gt;I 12:00:10.631 Connection parameters updated (interval: 198.75ms, latency: 0, timeout: 4000ms)&lt;br /&gt;W 12:00:11.066 [DFU] Application with buttonless update found&lt;br /&gt;V 12:00:11.066 [DFU] Jumping to the DFU Bootloader...&lt;br /&gt;V 12:00:11.066 [DFU] Enabling indications for 8ec90003-f315-4f60-9fb8-838830daea50&lt;br /&gt;D 12:00:11.066 [DFU] gatt.setCharacteristicNotification(8ec90003-f315-4f60-9fb8-838830daea50, true)&lt;br /&gt;D 12:00:11.067 [DFU] gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x02-00)&lt;br /&gt;I 12:00:11.302 [DFU] Data written to descr.8ec90003-f315-4f60-9fb8-838830daea50, value (0x): 02-00&lt;br /&gt;V 12:00:11.302 [DFU] Notifications enabled for 8ec90003-f315-4f60-9fb8-838830daea50&lt;br /&gt;A 12:00:11.307 [DFU] Indications enabled&lt;br /&gt;D 12:00:11.309 [DFU] wait(1000)&lt;br /&gt;V 12:00:12.324 [DFU] Writing to characteristic 8ec90003-f315-4f60-9fb8-838830daea50&lt;br /&gt;D 12:00:12.324 [DFU] gatt.writeCharacteristic(8ec90003-f315-4f60-9fb8-838830daea50)&lt;br /&gt;A 12:00:12.693 [DFU] Enter bootloader sent (Op Code = 1)&lt;br /&gt;I 12:00:12.695 [DFU] Notification received from 8ec90003-f315-4f60-9fb8-838830daea50, value (0x): 20-01-01&lt;br /&gt;A 12:00:12.695 [DFU] Response received (Op Code = 1, Status = 1)&lt;br /&gt;D 12:00:16.906 [Callback] Connection state changed with status: 8 and new state: DISCONNECTED (0)&lt;br /&gt;E 12:00:16.906 Error 8 (0x8): GATT CONN TIMEOUT&lt;br /&gt;I 12:00:16.906 Disconnected&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How BLE scan is done in the DFU (OTA) example?</title><link>https://devzone.nordicsemi.com/thread/249291?ContentTypeID=1</link><pubDate>Mon, 11 May 2020 18:32:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ee52f9f7-dbc4-45d2-aecb-fc8b53af009a</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi David,&lt;/p&gt;
&lt;p&gt;The DFU controller is the one that transfers the FW image to your DFU target device. It&amp;#39;s usually a smartphone or PC.&lt;/p&gt;
&lt;p&gt;Please make sure you have disabled UART logging (NRF_LOG_BACKEND_UART_ENABLED=0) as that may explain the high base current.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How BLE scan is done in the DFU (OTA) example?</title><link>https://devzone.nordicsemi.com/thread/249215?ContentTypeID=1</link><pubDate>Mon, 11 May 2020 13:59:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:75fe2cb7-b6e3-41eb-87c2-819aa1552aff</guid><dc:creator>TigerD</dc:creator><description>&lt;p&gt;Vidar,&lt;/p&gt;
&lt;p&gt;Thank you for your input.&lt;/p&gt;
&lt;p&gt;I have profiler and currently it measured at &amp;gt;500uA during advertising. It is too high for us. Could you please be more specific on the DFU controller/master? Is it in the SoftDevice or BLE library.&amp;nbsp; i guess if it is in the library, I would be able to make changes?&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;David&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How BLE scan is done in the DFU (OTA) example?</title><link>https://devzone.nordicsemi.com/thread/249118?ContentTypeID=1</link><pubDate>Mon, 11 May 2020 08:37:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d47ec077-37bb-4561-b025-51ae40fb6551</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Scanning is usually done by the DFU controller/master to find connectable advertising packets from the DFU target. You can adjust the APP_ADV_INTERVAL define to change the advertisement interval as you said. You may use our online power profiler (&lt;a href="https://devzone.nordicsemi.com/nordic/power/"&gt;https://devzone.nordicsemi.com/nordic/power/&lt;/a&gt;) to estimate what impact it will have on power consumption.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How BLE scan is done in the DFU (OTA) example?</title><link>https://devzone.nordicsemi.com/thread/248957?ContentTypeID=1</link><pubDate>Fri, 08 May 2020 12:55:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c6eebd5-ab35-4e56-8c31-f4d733ae195f</guid><dc:creator>TigerD</dc:creator><description>&lt;p&gt;Vidar,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Correct myself, the advertising interval is set through:&lt;/p&gt;
&lt;p&gt;&amp;nbsp; Init.config.ble_adv_fast_interval&amp;nbsp; &amp;nbsp;= APP_ADV_INTERVAL.&lt;/p&gt;
&lt;p&gt;That I can change.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;David&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How BLE scan is done in the DFU (OTA) example?</title><link>https://devzone.nordicsemi.com/thread/248952?ContentTypeID=1</link><pubDate>Fri, 08 May 2020 12:48:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:239adcb7-2da9-4826-9874-b6191d30f277</guid><dc:creator>TigerD</dc:creator><description>&lt;p&gt;Vidar,&lt;/p&gt;
&lt;p&gt;It is under peripheral category or folder. I may miss something. If no scanning at all, how does it receive a new version of firmware data through Over-the-Air? And how does it know when to start firmware update when this example is buttonless DFU?&lt;/p&gt;
&lt;p&gt;What I am looking for is to optimize and reduce the power consumption. Even no scanning, the advertising interval is about 150ms, and I don&amp;#39;t know where is the interval is set, and how to change it.&lt;/p&gt;
&lt;p&gt;Thank you,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;David&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How BLE scan is done in the DFU (OTA) example?</title><link>https://devzone.nordicsemi.com/thread/248910?ContentTypeID=1</link><pubDate>Fri, 08 May 2020 11:39:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:46bc0c0d-465b-43c8-a8e9-96cb9a7992a2</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;Hi David,&lt;/p&gt;
&lt;p&gt;Could you try to explain a bit more about why you are adding a scanner to this project? Is it to connect to other peripheral devices? The &amp;#39;ble_app_buttonless_dfu&amp;#39; is a peripheral only example so it doesn&amp;#39;t do scanning by default.&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Vidar&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>