Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeviceIoControl failed on SendFirmware #9

Open
cubic3d opened this issue Oct 5, 2014 · 14 comments
Open

DeviceIoControl failed on SendFirmware #9

cubic3d opened this issue Oct 5, 2014 · 14 comments

Comments

@cubic3d
Copy link

cubic3d commented Oct 5, 2014

I tried to flash the custom FW(injected) and the dumped one - everytime resulting in this error:

c:\Users\-\Desktop\Psychson-master\tools>DriveCom.exe /drive=D /action=SendFirmw
are /burner=BN03V117M.BIN /firmware=fw.bin
Action specified: SendFirmware
Gathering information...
Reported chip type: 2303
Reported chip ID: 98-DE-98-92-72-D7
Reported firmware version: 1.07.53
Mode: Firmware
Switching to boot mode...
FATAL: System.InvalidOperationException: DeviceIoControl failed: 0079
   at DriveCom.PhisonDevice._SendCommand(SafeFileHandle handle, Byte[] cmd, Byte
[] data, Int32 bytesExpected) in c:\Users\-\Desktop\Psychson-master\DriveCom\Dri
veCom\PhisonDevice.cs:line 365
   at DriveCom.PhisonDevice.SendCommand(Byte[] cmd, Byte[] data) in c:\Users\-\D
esktop\Psychson-master\DriveCom\DriveCom\PhisonDevice.cs:line 314
   at DriveCom.PhisonDevice.SendCommand(Byte[] cmd) in c:\Users\-\Desktop\Psychs
on-master\DriveCom\DriveCom\PhisonDevice.cs:line 304
   at DriveCom.PhisonDevice.JumpToPRAM() in c:\Users\-\Desktop\Psychson-master\D
riveCom\DriveCom\PhisonDevice.cs:line 228
   at DriveCom.Startup._ExecuteImage(String fileName) in c:\Users\-\Desktop\Psyc
hson-master\DriveCom\DriveCom\Startup.cs:line 404
   at DriveCom.Startup._SendFirmware() in c:\Users\-\Desktop\Psychson-master\Dri
veCom\DriveCom\Startup.cs:line 375
   at DriveCom.Startup.Main(String[] args) in c:\Users\-\Desktop\Psychson-master
\DriveCom\DriveCom\Startup.cs:line 114

After this error, the drive is getting disconnected and needs to be replugged to work again.
Any ideas?

@mtfurlan
Copy link

mtfurlan commented Oct 6, 2014

I'm getting a similar error, but when dumping the firmware.
Only difference is FATAL: System.InvalidOperationException: DeviceIoControl failed: 048F, rest of the error is the same.

@weaveleftnright
Copy link

I am getting the same original error posted: FATAL: System.InvalidOperationException: DeviceIoControl failed: 0079

@gladston3
Copy link

Getting the same error but while executing. Destroyed two USB-Sticks that way...
Any solutions or tips?

Action specified: SendFirmware
Gathering information...
Reported chip type: 2303
Reported chip ID: 98-DE-A4-82-76-D7
Reported firmware version: 1.11.10
Mode: Firmware
Switching to boot mode...
Rebooting...
Sending firmware...
Executing...
FATAL: System.InvalidOperationException: DeviceIoControl failed: 0079
bei DriveCom.PhisonDevice._SendCommand(SafeFileHandle handle, Byte[] cmd, Byt
e[] data, Int32 bytesExpected) in c:\Users\Florian\Desktop\badusb\Psychson-maste
r\DriveCom\DriveCom\PhisonDevice.cs:Zeile 365.
bei DriveCom.PhisonDevice.SendCommand(Byte[] cmd, Byte[] data) in c:\Users\Fl
orian\Desktop\badusb\Psychson-master\DriveCom\DriveCom\PhisonDevice.cs:Zeile 314
.
bei DriveCom.PhisonDevice.SendCommand(Byte[] cmd) in c:\Users\Florian\Desktop
\badusb\Psychson-master\DriveCom\DriveCom\PhisonDevice.cs:Zeile 304.
bei DriveCom.PhisonDevice.JumpToPRAM() in c:\Users\Florian\Desktop\badusb\Psy
chson-master\DriveCom\DriveCom\PhisonDevice.cs:Zeile 228.
bei DriveCom.Startup._RunFirmware(String fileName) in c:\Users\Florian\Deskto
p\badusb\Psychson-master\DriveCom\DriveCom\Startup.cs:Zeile 439.
bei DriveCom.Startup._SendFirmware() in c:\Users\Florian\Desktop\badusb\Psych
son-master\DriveCom\DriveCom\Startup.cs:Zeile 378.
bei DriveCom.Startup.Main(String[] args) in c:\Users\Florian\Desktop\badusb\P
sychson-master\DriveCom\DriveCom\Startup.cs:Zeile 114.

@faridtm
Copy link

faridtm commented Oct 8, 2014

I'm getting a similar error. what is the problem ? how can i download and send original firmware ?
help US please ?

@brandonlw
Copy link
Owner

I'm confused about why you're getting that error there...I'm going to have to try it myself.

If you're willing to take the drive apart, I'd recommend the steps on https://github.com/adamcaudill/Psychson/wiki/Executing-From-Boot-ROM , and then trying while in boot mode (LED stays lit).

@cubic3d
Copy link
Author

cubic3d commented Oct 8, 2014

Ok, I had now time to try a bit more: I used BN03V117M as burner before - now I tried with the older BN03V104M and an injected(hello world) firmware - it worked!

Next problems shown up:

  • Injected script runs as expected but only on USB 2.0 ports. USB 3.0 ports can't start up the device anymore.
  • Flashing a new CFW or the dumped one doesn't work - same error occurs again. Using SetBootMode sets the device into bootmode, but GetInfo and SendFirmware throws the error. I also tried to put the device manually into bootmode and edit the code not to check the mode before flashing with var mode = _GetInfo(); and related if statements - no luck. Something must be wrong with the commands passed to _SendCommand and firmware version? Related to issue Restore factory firmware #14.
Action specified: SendFirmware
Gathering information...
FATAL: System.InvalidOperationException: DeviceIoControl failed: 0079
   at DriveCom.PhisonDevice._SendCommand(SafeFileHandle handle, Byte[] cmd, Byte
[] data, Int32 bytesExpected) in c:\Users\-\Desktop\Psychson-master\DriveCom\Dri
veCom\PhisonDevice.cs:line 365
   at DriveCom.PhisonDevice.SendCommand(Byte[] cmd, Int32 bytesExpected) in c:\U
sers\-\Desktop\Psychson-master\DriveCom\DriveCom\PhisonDevice.cs:line 295
   at DriveCom.PhisonDevice.RequestVendorInfo() in c:\Users\-\Desktop\Psychson-m
aster\DriveCom\DriveCom\PhisonDevice.cs:line 140
   at DriveCom.PhisonDevice.GetChipType() in c:\Users\-\Desktop\Psychson-master\
DriveCom\DriveCom\PhisonDevice.cs:line 170
   at DriveCom.Startup._GetInfo() in c:\Users\-\Desktop\Psychson-master\DriveCom
\DriveCom\Startup.cs:line 384
   at DriveCom.Startup._SendFirmware() in c:\Users\-\Desktop\Psychson-master\Dri
veCom\DriveCom\Startup.cs:line 365
   at DriveCom.Startup.Main(String[] args) in c:\Users\-\Desktop\Psychson-master
\DriveCom\DriveCom\Startup.cs:line 114

@sdrinken
Copy link

sdrinken commented Oct 9, 2014

Hi I just tried it with two Patroit Supersonic Xpress 8GB drives but I too receive the same errors as mentioned above:

E:\Test\Psychson-master\Psychson-master\tools>DriveCom.exe /drive=F /action=GetI
nfo
Action specified: GetInfo
Gathering information...
Reported chip type: 2303
Reported chip ID: 98-DE-98-92-72-D7
Reported firmware version: 1.08.53
Mode: Firmware

E:\Test\Psychson-master\Psychson-master\tools>DriveCom.exe /drive=F /action=Send
Firmware /burner=BN03V104.BIN /firmware=fw.bin
Action specified: SendFirmware
Gathering information...
Reported chip type: 2303
Reported chip ID: 98-DE-98-92-72-D7
Reported firmware version: 1.08.53
Mode: Firmware
Switching to boot mode...
FATAL: System.InvalidOperationException: DeviceIoControl failed: 0079
at DriveCom.PhisonDevice._SendCommand(SafeFileHandle handle, Byte[] cmd, Byte
[] data, Int32 bytesExpected) in e:\Test\Psychson-master\Psychson-master\DriveCo
m\DriveCom\PhisonDevice.cs:line 365
at DriveCom.PhisonDevice.SendCommand(Byte[] cmd, Byte[] data) in e:\Test\Psyc
hson-master\Psychson-master\DriveCom\DriveCom\PhisonDevice.cs:line 314
at DriveCom.PhisonDevice.SendCommand(Byte[] cmd) in e:\Test\Psychson-master\P
sychson-master\DriveCom\DriveCom\PhisonDevice.cs:line 304
at DriveCom.PhisonDevice.JumpToPRAM() in e:\Test\Psychson-master\Psychson-mas
ter\DriveCom\DriveCom\PhisonDevice.cs:line 228
at DriveCom.Startup._ExecuteImage(String fileName) in e:\Test\Psychson-master
\Psychson-master\DriveCom\DriveCom\Startup.cs:line 404
at DriveCom.Startup._SendFirmware() in e:\Test\Psychson-master\Psychson-maste
r\DriveCom\DriveCom\Startup.cs:line 375
at DriveCom.Startup.Main(String[] args) in e:\Test\Psychson-master\Psychson-m
aster\DriveCom\DriveCom\Startup.cs:line 114

Has anybody been successful with testing this? and if so is do you use a different burner image or have a different firmware version on your USB? See Getinfo output

Thanks

@gfleck
Copy link

gfleck commented Oct 13, 2014

Hello.

First thanks for provide this valuable material, I followed the steps of HID "Hello World!" and works.

But unfortunately I'm getting the same error above with the Patriot Supersonic Xpress 8GB.

Any update about?

@brandonlw
Copy link
Owner

sdrinken, according to your output, I have the exact same drive and flash chip that you do, so I'm confused why you're getting the error there. I can't reproduce it.

So no update yet.

@sdrinken
Copy link

Hi brandonlw,

Thanks for looking into this. My issue was resolved by downloading the burning image again. I guess it was corrupted.

Everything works fine now. I have notice though that Patroit is selling the 8GB Xpress drive with a different chip version (2307) the 2303 chips are hard to get ;-)

@gfleck
Copy link

gfleck commented Oct 24, 2014

Hi @sdrinken.

I have the same problem with the same Patriot Xpress 8GB (2303 chipset) that you.

You told that resolved the problem, could you explain how you recuperate your drive?

My steps are:

DriveCom.exe /drive=F /action=SetBootMode
Action specified: SetBootMode

Ok, it's works, The led is on.

Now, when I try this:

DriveCom.exe /drive=F /action=SendExecutable /burner=BN03V104M.BIN

Action specified: SendExecutable
FATAL: System.InvalidOperationException: DeviceIoControl failed: 0079
em DriveCom.PhisonDevice._SendCommand(SafeFileHandle handle, Byte[] cmd, Byte[] data, Int32 bytesExpected) na c:\Users\Brandon
Documents\GitHub\PS2251-03\DriveCom\DriveCom\PhisonDevice.cs:linha 365
em DriveCom.PhisonDevice.SendCommand(Byte[] cmd, Int32 bytesExpected) na c:\Users\Brandon\Documents\GitHub\PS2251-03\DriveCom
riveCom\PhisonDevice.cs:linha 295
em DriveCom.PhisonDevice.TransferFile(Byte[] data, Byte header, Byte body) na c:\Users\Brandon\Documents\GitHub\PS2251-03\Driv
Com\DriveCom\PhisonDevice.cs:linha 249
em DriveCom.PhisonDevice.TransferFile(Byte[] data) na c:\Users\Brandon\Documents\GitHub\PS2251-03\DriveCom\DriveCom\PhisonDevi
e.cs:linha 238
em DriveCom.Startup._ExecuteImage(String fileName) na c:\Users\Brandon\Documents\GitHub\PS2251-03\DriveCom\DriveCom\Startup.cs
linha 403
em DriveCom.Startup.Main(String[] args) na c:\Users\Brandon\Documents\GitHub\PS2251-03\DriveCom\DriveCom\Startup.cs:linha 109

I run on Windows 7 64 bits.

Thank you.

@HackR10t
Copy link

C/S: PS2251-03
F/W: 1.12.10
After first successful flash of hello world payload. I get the same error. Using GetInfo_v8.0.0.550 to try to read the chip i get this read out:

Volume: E:
Controller: Unknown
Possible Memory Chip(s): Not available
VID: 13FE
PID: 5201
Query Vendor ID:
Query Product ID:
Query Product Revision:
Physical Disk Capacity: 0 Bytes
Windows Disk Capacity: 0 Bytes
Internal Tags: AAAB-QAH8
ContMeas ID: 4F3C-01-00
Microsoft Windows 7

going to try to find MPALL for PS2251-03 to try to reflash/format chip without shorting pins..Has this issue been solved yet?

@gfleck
Copy link

gfleck commented Jan 20, 2015

It's works for me!

I only need shortcut the 2nd. and 3rd. pins according this image: https://github.com/adamcaudill/Psychson/blob/master/docs/PinsToShortUponPlugInForBootMode.jpg

My device is the Patriot Xpress 8GB with 2303 chipset.

@ghost
Copy link

ghost commented Feb 16, 2015

From where can I get the image burner for Patroit Supersonic Xpress 8GB?
Is this BN03V104M.BIN?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants