# Dfu: unrecoverable error on read

**URL:** <https://discuss.blues.com/t/dfu-unrecoverable-error-on-read/847>\
**Category:** Firmware\
**Created:** [May 25, 2022, 2:43pm UTC](https://discuss.blues.com/t/dfu-unrecoverable-error-on-read/847 "2022-05-25T14:43:07Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![LBBD](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/lbbd/32/209_2.png) [@LBBD](https://discuss.blues.com/u/LBBD)\
**Post date:** [May 25, 2022, 2:43pm UTC](https://discuss.blues.com/t/dfu-unrecoverable-error-on-read/847/1 "2022-05-25T14:43:07Z")

</div>

I’ve implemented the DFU functionality, following the [Updating ESP32 Host Firmware](https://dev.blues.io/guides-and-tutorials/notecard-guides/updating-esp32-host-firmware/#updating-esp32-host-firmware) tutorial.  
Based on the log messages it seemed that things were progressing as expected:

```auto
{"req":"dfu.get","offset":397312,"length":4096}
{"payload":"hyYFMiIRhgIAN..."}
dfu: successfully transferred offset:397312 len:4096

```

Until the following error was shown in the serial monitor:

```auto
{"req":"dfu.get","offset":405504,"length":4096}
{"err":"not currently in the DFU operating mode (see hub.set)"}
dfu: error on read: not currently in the DFU operating mode (see hub.set)
dfu: reading chunk (offset:405504 length:4096 try:2)
...
dfu: reading chunk (offset:405504 length:4096 try:5)
{"req":"dfu.get","offset":405504,"length":4096}
{"err":"not currently in the DFU operating mode (see hub.set)"}
dfu: error on read: not currently in the DFU operating mode (see hub.set)
dfu: unrecoverable error on read

```

Where do I go from here?  
I’d appreciate if someone could point me in the right direction.

---

<div class="post-metadata">

**Author:** ![seant](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@seant](https://discuss.blues.com/u/seant)\
**Post date:** [May 25, 2022, 2:50pm UTC](https://discuss.blues.com/t/dfu-unrecoverable-error-on-read/847/2 "2022-05-25T14:50:02Z")

</div>

The Notecard DFU mode times out after 15 minutes (to prevent the risk of a Notecard left in DFU mode no longer communicating to Notehub) - is there a chance that 15 minutes had elapsed since the `{"req":"hub.set","mode":`dfu"}` ?

---

<div class="post-metadata">

**Author:** ![LBBD](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/lbbd/32/209_2.png) [@LBBD](https://discuss.blues.com/u/LBBD)\
**Post date:** [May 25, 2022, 2:59pm UTC](https://discuss.blues.com/t/dfu-unrecoverable-error-on-read/847/3 "2022-05-25T14:59:49Z")

</div>

@seant Thanks for your quick reply.  
Unfortunately I didn’t monitor the entire process, so I don’t have a time record.  
As I saw that the update was successfully initiated I turned away from the monitor and when I came back later I noticed the error.

---

<div class="post-metadata">

**Author:** ![LBBD](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/lbbd/32/209_2.png) [@LBBD](https://discuss.blues.com/u/LBBD)\
**Post date:** [May 25, 2022, 3:09pm UTC](https://discuss.blues.com/t/dfu-unrecoverable-error-on-read/847/4 "2022-05-25T15:09:39Z")

</div>

@seant I see that the data transfer started again and this time I was able to roughly time the beginning.  
I’ll see how and when the process ends and I’ll get back to you with the results.

---

<div class="post-metadata">

**Author:** ![LBBD](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/lbbd/32/209_2.png) [@LBBD](https://discuss.blues.com/u/LBBD)\
**Post date:** [May 25, 2022, 3:22pm UTC](https://discuss.blues.com/t/dfu-unrecoverable-error-on-read/847/5 "2022-05-25T15:22:51Z")

</div>

@seant The same error occurred and indeed it seems that it happened around the 15 minute mark.  
The size of the firmware .bin file is 499KB.

---

<div class="post-metadata">

**Author:** ![seant](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@seant](https://discuss.blues.com/u/seant)\
**Post date:** [May 25, 2022, 4:53pm UTC](https://discuss.blues.com/t/dfu-unrecoverable-error-on-read/847/6 "2022-05-25T16:53:43Z")

</div>

@LBBD If the binary transfer is taking more than 15 minutes to complete you may be able to restart the 15 minute timeout by issuing further `{"req":"hub.set","mode":dfu"}` requests periodically during the repeated `{"req":"dfu.get"}` requests. We are aware of the possibility of timeout of long transfers and in future Notecard firmware we restart the 15 minute timer on each `dfu.get` request.

---

<div class="post-metadata">

**Author:** ![LBBD](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.blues.com/lbbd/32/209_2.png) [@LBBD](https://discuss.blues.com/u/LBBD)\
**Post date:** [May 25, 2022, 6:15pm UTC](https://discuss.blues.com/t/dfu-unrecoverable-error-on-read/847/7 "2022-05-25T18:15:36Z")

</div>

@seant , thanks for the suggestion. The repeated `{"req":"hub.set","mode":dfu"}` solved the timeout issue and the update was completed successfully.
