Hi,
Hardware:PAC10040 Platform: nRF5_SDK_11.0.0_89a8197 Master Control Panel: V4.1.3
1.If dfu has started and transported some data, then disconnect bluetooth and kill app. 2.The second time to connect start dfu, will return DFU_STATUS_INVALID_STATE. 3.The third time to connect and start will success.
I check the firmware, the firmware has a variable m_dfu_state to mark the state of dfu. m_dfu_state is not DFU_STATE_IDLE when second time enter dfu.
uint32_t dfu_start_pkt_handle(dfu_update_packet_t * p_packet) This function will check m_dfu_state and return the error NRF_ERROR_INVALID_STATE.
How to handle this situation? I meet this on our real production with your Android-DFU-Library. It seem update will success at last. But I want to avoid this. It's unfriendly to my users.
I want to set m_dfu_state as DFU_STATE_IDLE at on_ble_evt() case BLE_GAP_EVT_DISCONNECTED. Is that OK?
Thanks.