[Android Q&A, Help & Troubleshooting] Ayesh_Dushmantha:
HI, i have a hard bricked redmi 5 plus. It got bricked while an OTA update. I tried to flash a ROM with MiFlashTool in EDL mode many times but ended up with the "error: ping the target via firehose failed. write time out, maybe device was disconnected.".

Device manager identifies the device as "Qualcomm HS-USB QDLoader 9008" and MiFlashTool identified as "COMxx". I tried with different MiFlashTool versions and several ROM versions.

COM log is as follows

[6:18:30 PM COM6]:MiFlash 2019.12.6.0
[6:18:30 PM COM6]:flash in thread name:COM6,id:8
[6:18:30 PM COM6]:sw in images
[6:18:30 PM COM6]:flash in thread name:COM6,id:8
[6:18:31 PM COM6]:[COM6]:start flash.
[6:18:31 PM COM6]:received hello packet
[6:18:31 PM COM6]:programmertype: 0
[6:18:31 PM COM6]:vboytest:C:\vince_images_8.2.1_20180201.0000.00_7.1_cn\images
[6:18:31 PM COM6]:download programmer file: C:\vince_images_8.2.1_20180201.0000.00_7.1_cn\images\prog_emmc_firehose_8953_ddr.mbn
[6:18:31 PM COM6]:download programmer C:\vince_images_8.2.1_20180201.0000.00_7.1_cn\images\prog_emmc_firehose_8953_ddr.mbn
[6:18:36 PM COM6]:Send done packet
[6:18:36 PM COM6]:file C:\vince_images_8.2.1_20180201.0000.00_7.1_cn\images\prog_emmc_firehose_8953_ddr.mbn transferred successfully
[6:18:38 PM COM6]:send nop command
[6:18:38 PM COM6]:send command:<?xml version="1.0" ?><data><nop verbose="0" value="ping"/></data>
[6:18:40 PM COM6]:write time out try agian 1
[6:18:42 PM COM6]:write time out try agian 2
[6:18:45 PM COM6]:write time out try agian 3
[6:18:47 PM COM6]:write time out try agian 4
[6:18:50 PM COM6]:write time out try agian 5
[6:18:53 PM COM6]:write time out try agian 6
[6:18:55 PM COM6]:write time out try agian 7
[6:18:56 PM COM6]:error:The write timed out.
[6:18:56 PM COM6]:System.Exception: write time out,maybe device was disconnected.
at XiaoMiFlash.code.Utility.Comm.WritePort(Byte[] send, Int32 offSet, Int32 count)
at XiaoMiFlash.code.Utility.Comm.SendCommand(String command, Boolean checkAck)
at XiaoMiFlash.code.bl.SerialPortDevice.ping()
at XiaoMiFlash.code.bl.SerialPortDevice.XiaomiFlash() at XiaoMiFlash.code.Utility.Comm.WritePort(Byte[] send, Int32 offSet, Int32 count)
at XiaoMiFlash.code.Utility.Comm.SendCommand(String command, Boolean checkAck)
at XiaoMiFlash.code.bl.SerialPortDevice.ping()
at XiaoMiFlash.code.bl.SerialPortDevice.XiaomiFlash()
[6:18:56 PM COM6]:no provision exit:COM6
[6:18:56 PM COM6]:flashSuccess False
[6:18:56 PM COM6]:isFactory False CheckCPUID False
[6:18:56 PM COM6]:before:flashSuccess is False set IsUpdate:True set IsDone True
[6:18:56 PM COM6]:after:flashSuccess is False set IsUpdate:false set IsDone true

MiFlash log is as follows

[6:17:29 PM]:lsusb path:"C:\MiFlash20191206\Source\ThirdParty\Qualcomm\fh_loader\lsusb.exe"
[6:17:30 PM]:ls ubs :Qualcomm HS-USB QDLoader 9008 (COM6)

[6:17:30 PM]:vboytest HubPath: USB#ROOT_HUB30#4&23a127ac&0&0#{f18a0e88-c30c-11d0-8815-00a0c906bed8}
[6:17:31 PM]:GetScriptDevices
[6:17:31 PM]:add device COM6 index 6
[6:18:18 PM]:lsusb path:"C:\MiFlash20191206\Source\ThirdParty\Qualcomm\fh_loader\lsusb.exe"
[6:18:19 PM]:ls ubs :Qualcomm HS-USB QDLoader 9008 (COM6)

[6:18:19 PM]:vboytest HubPath: USB#ROOT_HUB30#4&23a127ac&0&0#{f18a0e88-c30c-11d0-8815-00a0c906bed8}
[6:18:19 PM]:GetScriptDevices
[6:18:19 PM]:FlashingDevice.flashDeviceList.Remove COM6
[6:18:19 PM]:add device COM6 index 6
[6:18:30 PM]:lsusb path:"C:\MiFlash20191206\Source\ThirdParty\Qualcomm\fh_loader\lsusb.exe"
[6:18:30 PM]:ls ubs :Qualcomm HS-USB QDLoader 9008 (COM6)

[6:18:30 PM]:vboytest HubPath: USB#ROOT_HUB30#4&23a127ac&0&0#{f18a0e88-c30c-11d0-8815-00a0c906bed8}
[6:18:30 PM]:GetScriptDevices
[6:18:30 PM]:FlashingDevice.flashDeviceList.Remove COM6
[6:18:30 PM]:add device COM6 index 6
[6:18:30 PM]:Thread start,thread id 8,thread name COM6
[6:18:56 PM]:deivce:COM6 error: [6:18:56 PM COM6]:error:The write timed out.
[6:18:56 PM]:Thread stopped, thread id 8, thread name COM6

Please help me to solve the issue.

Thanks in advance.