Hi,I had a problem with nRF51822 DFU.I tried to OTD nRF51822(version SDK_9.0.0 s110) wiht Android 9.0 devices(nRF tool version 1.9.0),but it always fail at 1%.The problem occured because of the version? The log of Android dfu is on attachment.
Hi,I had a problem with nRF51822 DFU.I tried to OTD nRF51822(version SDK_9.0.0 s110) wiht Android 9.0 devices(nRF tool version 1.9.0),but it always fail at 1%.The problem occured because of the version? The log of Android dfu is on attachment.
Hi Bjørn, I generate the firmware image by Master Control Panel\3.8.0.7\nrf\nrf.exe
HI James, I took a closer look at the Android log and its not the Init or start packet, as I can see that these are processed correctly. The error occurs when the DFU controller(Android phone) is writing to the DFU Packet characteristic. I believe that we're entering the default case in nrf_err_code_translate() which is called by dfu_error_notify() which is in turn called by app_data_process() if something goes wrong during the reception of the firmware data.
My bet is that hci_mem_pool_rx_consume() is returning NRF_ERROR_NO_MEM, which is translated to BLE_DFU_RESP_VAL_OPER_FAILED by nrf_err_code_translate().
Could you try to use the nRF connect application and enable the packes receipts notification and set the number of packets to 1 under DFU Settings.? ( DFU settings is found under settings when pressing the three horizontal bars in the upper-left corner of the app window. )
Hi Bjørn,I changed the MIN_CONN_INTERVAL from 15 to 25, it worked fine now.I didn't know why.
HI James,
the older bootloaders SDK v9.0.0 and older had a known issue with the packet buffers being filled up faster than the data could be written to flash, if the the central sent packets with a very short interval and/or sent many packets per connection interval. So that is why we have the PRN (packes receipts notification) which sets the number of packets between each acknowledgement from the DfuTarget. If you set it to 1, the DfuTarget will ack every packet and prevent the buffer from overflowing. Increasing the connection interval will also work, as you have seen.
Best regards
Bjørn
Thanks Bjorn. I set the number of packets to 8, it works fine too.