<?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>Want to understand API flow in BLE-DFU</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96472/want-to-understand-api-flow-in-ble-dfu</link><description>Hello, 
 
 With reference to the nordic tutorial : https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/software/posts/ncs-dfu#:~:text=on%20the%20nRF5340-,DFU%20over%20Bluetooth,-Modify%20the%20Peripheral I saw the code which has mostly connection</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 21 Feb 2023 09:38:54 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96472/want-to-understand-api-flow-in-ble-dfu" /><item><title>RE: Want to understand API flow in BLE-DFU</title><link>https://devzone.nordicsemi.com/thread/411053?ContentTypeID=1</link><pubDate>Tue, 21 Feb 2023 09:38:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab701cbd-1ffc-4ef5-b571-62d087dbd5ad</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Mohammed,&amp;nbsp;&lt;br /&gt;If you want to print out the log of the BLE DFU packet transmitted between the DFU mater and the target you can focus on these functions in smp_bt.c :&amp;nbsp;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;smp_bt_chr_write() : is the call back when the master (phone) send BLE packet to the target&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;smp_bt_tx_pkt() is when the DFU target send response back to the phone.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;br /&gt;If you add a breakpoint inside these, it will most likely break the connection. But if you only print out the log, it should be fine.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I would also suggest to use the sniffer :&amp;nbsp;&lt;a href="https://www.nordicsemi.com/Products/Development-tools/nrf-sniffer-for-bluetooth-le"&gt;https://www.nordicsemi.com/Products/Development-tools/nrf-sniffer-for-bluetooth-le&lt;/a&gt;&amp;nbsp;to capture the BLE DFU communication. It can be easier than looking at the log.&amp;nbsp;&lt;/div&gt;
&lt;div&gt;&lt;/div&gt;
&lt;div&gt;If you want to understand the SMP protocol, I would also suggest trying the SMP DFU via UART. You can very easily inspect the communication with a logic analyzer. You can start with a very small image to update. After you get an overview of how the SMP DFU work, you can then compare it with the BLE DFU sniffer trace and then can dissect the BLE communication to match it with the SMP protocol.&amp;nbsp;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Want to understand API flow in BLE-DFU</title><link>https://devzone.nordicsemi.com/thread/411020?ContentTypeID=1</link><pubDate>Tue, 21 Feb 2023 08:19:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15acea1c-f245-4249-9193-33b6d7ab33a4</guid><dc:creator>Ubaid_M</dc:creator><description>&lt;p&gt;Thanks&amp;nbsp;&lt;a class="internal-link view-user-profile" href="https://devzone.nordicsemi.com/members/hungbui"&gt;Hung Bui&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;If I want to print or see the data packets incoming during BLE DFU.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Can you suggest which API in &amp;quot;smp_bt.c&amp;quot; can hold the breakpoint or add print statements..?&lt;/p&gt;
&lt;p&gt;I know it may slow and crash the thing, but for understanding I need to deep dive in code.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Want to understand API flow in BLE-DFU</title><link>https://devzone.nordicsemi.com/thread/409099?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2023 10:12:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f334cd79-e830-47b6-affa-a4ff167cd4ea</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Mohammed,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would suggest to have a look at the documentation of the SMP protocol &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/device_mgmt/smp_protocol.html"&gt;here&lt;/a&gt;. The information of SMP over BLE can be found &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/device_mgmt/smp_transport.html"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;If you want to step into the code, you would need to add breakpoint in smp_bt.c in&amp;nbsp;\zephyr\subsys\mgmt\mcumgr\transport.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>