<?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>DFU error - Read no data from UART!</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59927/dfu-error---read-no-data-from-uart</link><description>nrfutil
dfu serial -pkg ble_ app _v1 .zip 
-p /dev/ttyUSB 0 - b 57600 - fc 1 
 When activating DFU sometimes on the last packet sent to the bootloader, I see &amp;quot;Read no data from UART!&amp;quot; 
 It works sometimes without error, but other times only on the last</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 09 Apr 2020 16:49:43 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59927/dfu-error---read-no-data-from-uart" /><item><title>RE: DFU error - Read no data from UART!</title><link>https://devzone.nordicsemi.com/thread/244187?ContentTypeID=1</link><pubDate>Thu, 09 Apr 2020 16:49:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:64083d38-1fd3-4437-9e66-65f4c4ccce38</guid><dc:creator>KSV</dc:creator><description>&lt;p&gt;BTW&lt;/p&gt;
&lt;p&gt;Linux OS&lt;/p&gt;
&lt;p&gt;Ubuntu 16.04.6 LTS&lt;/p&gt;
&lt;p&gt;Application is:&amp;nbsp;&amp;nbsp;&amp;nbsp; ble_app_uart_pca10040_s132&lt;/p&gt;
&lt;p&gt;Bootloader is:&amp;nbsp;&amp;nbsp;&amp;nbsp; secure_bootloader_uart_mbr_pca10040_debug&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU error - Read no data from UART!</title><link>https://devzone.nordicsemi.com/thread/244186?ContentTypeID=1</link><pubDate>Thu, 09 Apr 2020 16:42:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1ba03a20-626e-4451-970d-a224a19f9094</guid><dc:creator>KSV</dc:creator><description>&lt;p&gt;I was able to solve the issue.&lt;/p&gt;
&lt;p&gt;Here is what I observed and did:&lt;/p&gt;
&lt;div&gt;
&lt;p&gt;1) Looking at the bootloader debug logging during the DFU, I see that the 4096 byte packets have the following occur after the 4K packet is sent:&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&lt;strong&gt;&amp;nbsp;Host requests CRC on the last 4K packet and bootloader sends 0x3 response:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_CRC_GET (data)&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Offset:69632, CRC:0x0756822C&lt;/p&gt;
&lt;p&gt;&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1&lt;/p&gt;
&lt;p&gt;&amp;lt;debug&amp;gt; nrf_dfu_serial: Sending Response: [0x3, 0x1]&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&lt;strong&gt;Then an OBJECT EXECUTE command is sent by the host and the bootloader immediately sends an 0x4 response:&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_EXECUTE (data)&lt;/p&gt;
&lt;p&gt;&amp;lt;debug&amp;gt; nrf_dfu_serial: Sending Response: [0x4, 0x1]&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&amp;nbsp; &lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;2) The last packet sent is less than 4K. In my case it is 464 bytes. On this part of the process I see the following:&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&lt;strong&gt;Host requests CRC on the last 464 byte packet and bootloader sends 0x3 response:&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_CRC_GET (data)&lt;/p&gt;
&lt;p&gt;&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Offset:70096, CRC:0xA02E108B&lt;/p&gt;
&lt;p&gt;&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Request handling complete. Result: 0x1&lt;/p&gt;
&lt;p&gt;&amp;lt;debug&amp;gt; nrf_dfu_serial: Sending Response: [0x3, 0x1]&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&lt;strong&gt;Then an OBJECT EXECUTE command is sent by the host but this time the bootloader does not immediately send the 0x4 response:&lt;/strong&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;p&gt;&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Handle NRF_DFU_OP_OBJECT_EXECUTE (data)&lt;/p&gt;
&lt;p&gt;&amp;lt;debug&amp;gt; nrf_dfu_req_handler: Whole firmware image received. Postvalidating.&lt;/p&gt;
&lt;p&gt;&amp;lt;debug&amp;gt; nrf_dfu_validation: Hash verification. start address: 0x38000, size: 0x111D0&lt;/p&gt;
&lt;p&gt;&amp;lt;debug&amp;gt; nrf_dfu_validation: Invalidating old application in bank 0.&lt;/p&gt;
&lt;p&gt;&amp;lt;debug&amp;gt; nrf_dfu_serial: Sending Response: [0x4, 0x1]&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Conclusion:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The host side (nrfutil) does not wait long enough for the 0x4 response to be sent. Therefore it thinks there was no response (only at the end of the image) and although everything is fine on the bootloader side, the host side (nrfutil) gives the error message &amp;quot;Read no data from UART!&amp;quot;&lt;/p&gt;
&lt;p&gt;I have ported the nrfutil code into firmware and I added an extra delay at this &amp;quot;end of image&amp;quot; special case and the 0x4 response is received now and the error message is no longer generated.&lt;/p&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU error - Read no data from UART!</title><link>https://devzone.nordicsemi.com/thread/244056?ContentTypeID=1</link><pubDate>Wed, 08 Apr 2020 11:13:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70ca1824-d52d-4ed5-966c-daab842dd173</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I am sorry for the delay, The staffing is reduced during easter due to holidays and I will be gone this week, but I will be back Tuesday next week and will look at your ticket then.&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU error - Read no data from UART!</title><link>https://devzone.nordicsemi.com/thread/243944?ContentTypeID=1</link><pubDate>Tue, 07 Apr 2020 16:25:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:68453f7d-9170-420c-a3b0-c4e73359310b</guid><dc:creator>KSV</dc:creator><description>&lt;p&gt;Application is:&lt;/p&gt;
&lt;p&gt;ble_app_uart_pca10040_s132 &lt;/p&gt;
&lt;p&gt;where it goes into the bootloader in DFU mode&lt;/p&gt;
&lt;p&gt;Bootloader is:&lt;/p&gt;
&lt;p&gt;secure_bootloader_uart_mbr_pca10040_debug&lt;/p&gt;
&lt;p&gt;The problem is in the bootloader code, which is unmodified from the original.&lt;/p&gt;
&lt;p&gt;I generate the ble_app.zip with the following commands:&lt;/p&gt;
&lt;p&gt;For Application only:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nrfutil pkg generate --application&amp;nbsp; nrf52832_xxaa.hex&amp;nbsp; --application-version 1&amp;nbsp; --application-version-string 1.0.0 --hw-version 52&amp;nbsp; --sd-req 0xB7 --key-file dfu_private_key.pem ble_app.zip&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;For Application+SD+BL:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;nrfutil pkg generate --application&amp;nbsp; nrf52832_xxaa.hex&amp;nbsp; --application-version 1&amp;nbsp; --application-version-string 1.0.0 --hw-version 52&amp;nbsp; --softdevice sd.hex --sd-id 0xB7 --sd-req 0xB7 --bootloader bl.hex --bootloader-version 3 --key-file dfu_private_key.pem ble_app_sdbl.zip&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;With these files I execute the dfu:&lt;/p&gt;
&lt;p&gt;nrfutil dfu serial -pkg ble_app.zip -p /dev/ttyUSB0 -b 57600 -fc 1&lt;/p&gt;
&lt;p&gt;The App+SD+BL would seem to work, but would always give me the &lt;strong&gt;Read no data from UART!&lt;/strong&gt; error message after the last packet.&lt;/p&gt;
&lt;p&gt;The application only would always work, until recently, where it also now gives me the same error message after the last packet.&lt;/p&gt;
&lt;p&gt;This error message is generated by the nrfutil utility in uart_slip_receive() because it is waiting for a response from the bootloader that it never receives on the last undersized packet.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: DFU error - Read no data from UART!</title><link>https://devzone.nordicsemi.com/thread/243868?ContentTypeID=1</link><pubDate>Tue, 07 Apr 2020 10:58:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6591e9f6-9d32-4c87-a228-e15ad22d6974</guid><dc:creator>Amanda Hsieh</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Did you use the&amp;nbsp;&lt;span&gt;pca10040_uart_debug project? If so, did you modify the example?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;How do you generate the&amp;nbsp;&lt;code&gt;ble_&lt;/code&gt;&lt;code&gt;app&lt;/code&gt;&lt;code&gt;_v1&lt;/code&gt;&lt;em&gt;.zip&lt;/em&gt;&lt;/span&gt;? What command did you use? What does the package include, app or SD+app?&lt;/p&gt;
&lt;p&gt;-Amanda H.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>