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

pine64_updater 1.0.3 crashes on Windows 11 #40

Open
KoraiD opened this issue Apr 24, 2022 · 11 comments
Open

pine64_updater 1.0.3 crashes on Windows 11 #40

KoraiD opened this issue Apr 24, 2022 · 11 comments

Comments

@KoraiD
Copy link

KoraiD commented Apr 24, 2022

After selecting a custom dfu file, the app immediately closes when I press the update button, without any messages.

@warnesj
Copy link

warnesj commented May 22, 2022

I'm having the same issue to. And ever since the app closed/crashed, my Pinecil has been stuck in DFU mode. :( I suspect it has to do with the ZADIG tool used to install the WinUSB drivers. Windows 11 apparently has changed the driver signing enforcement which appears to break ZADIG. I'm going to try and perform an update through a VirtualBox VM running Debian instead and see if I have any better luck.

@gamelaster
Copy link
Member

@warnesj The app crashes immediately after pressing update button? Or somewhere in the middle of process?
If on the beginning, I don't see a reason why Pinecil needs to be stuck in DFU mode. Also, I'm on Windows 11 and the zadig driver replacement works absolutely fine for me. Also 2. you can use dfu-util directly for flashing the firmware within Windows, no need to use VM.

@warnesj
Copy link

warnesj commented May 22, 2022

@gamelaster, thanks for the quick reply! The app doesn't crash immediately after pressing the update button. I see the ZADIG installer attempt to run which sits at a blank screen for a while and then after it disappears I get a Windows alert about an unrecognized USB device. Then the Pine64 Updater closes (which I'm interpreting as a crash? It might not be). I'll try and record a video of what I'm seeing if that will help?

As far as my iron being stuck in DFU, again that's a presumption on my part based on it's behavior. It no longer turns on, but when I connect it to my PC Windows does make a noise. So there's still something running. I figure it's recoverable if I can get a new firmware installed.

Thanks for the recommendation for dfu-util. I was going to try that next. I just needed to install 7-zip to be able to extract the .xz archive.

@gamelaster
Copy link
Member

@warnesj if it's .xz file, it's very likely that you're downloading only source code, not a Windows binary.

Hmm, this looks very strange, it's weird that zadig fails to install the driver. It's true that our zadic build is bit older, but I don't see an issue, because Zadic is installing WinUSB driver, which is signed by Microsoft. Will try to reproduce it, thanks!

@warnesj
Copy link

warnesj commented May 22, 2022

Yeah @gamelaster, it's strange that since v0.9 all the binaries are put into the same .xz archive on the SourceForce page for dfu-util. But I did download v0.11 and here was the output:

`D:\Downloads\Firmware\Pinecil Soldering Iron\dfu-util-0.11-binaries\win64>dfu-util -D Pinecil_EN.dfu
dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Match vendor ID from file: 28e9
Match product ID from file: 0189
Multiple alternate interfaces for DfuSe file
Opening DFU capable USB device...
Device ID 28e9:0189
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #1 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Option Bytes "
DfuSe interface name: "Internal Flash "
Found GD32VF103, which reports a bad page size and count for its internal memory.
Fixed layout based on part number: page size 1024, count 128.
File contains 1 DFU images
Parsing DFU image 1
Target name: ST...
Image for alternate setting 0, (1 elements, total size = 56176)
Setting Alternate Interface #0 ...
Parsing element 1, address = 0x08000000, size = 56168
Erase [= ] 7% 4096 bytesdfuse_download: libusb_control_transfer returned -7 (LIBUSB_ERROR_TIMEOUT)
Error during special command "ERASE_PAGE" download

D:\Downloads\Firmware\Pinecil Soldering Iron\dfu-util-0.11-binaries\win64>`

So I suspect all my issues are related to not being able to install the WinUSB driver. :( I'll keep trying other things and report back if I have any success.

@gamelaster
Copy link
Member

@warnesj this looks like something wrong is with your device. The fact it's stuck in DFU is logical, because the dfu-util begin to erase, but fail in mid-time, so there is nothing to boot. There is another tool officially from vendor of chip for flashing, they have their own driver, you can use it for flash if it will help. For better help, you can ask on official Pinecil chat rooms, you can find links to Discord, Telegram, IRC or Matrix on https://wiki.pine64.org/wiki/Main_Page#Chat_Platforms

@warnesj
Copy link

warnesj commented May 22, 2022

Thanks @gamelaster for the advice and the link. I've did also download the GD32 Dfu Tool from the manufacturer and had similar problems. I'll definitely take up your advice to check out Discord or IRC. Thanks! I'll keep you posted as I make progress.

@warnesj
Copy link

warnesj commented May 23, 2022

So I have some positive news. I managed to find a Window 10 laptop and tried the updater. I'm happy to report that it worked perfectly and my Pinecil is back up and running. :)

To me it still feels like there is a problem which Windows 11 is preventing ZADIG from loading the WinUSB driver. When I was using my Windows 11 desktop with the updater, after clicking the Update button the ZADIG window would appear and stay there for quite a while. Where as on my Windows 10 laptop, after clicking the Update button the ZADIG window appeared and didn't stay for nearly as long. Considering the updater was successful on Windows 10 it leads me to believe that the WinUSB driver installed fine whereas on Windows 11 it did not.

I ran across an post (sorry I didn't bookmark it) that seemed to suggest that if someone had previously run ZADIG on Windows 10 and installed the WinUSB driver that it would continue to work if they upgraded to Windows 11. But if someone had not run ZADIG before upgrading to Windows 11 that the new driver enforcement would prevent the installation.

In the meantime I'll keep messing around and see if I can figure it out. I'll keep you posted if I make any progress.

@gamelaster
Copy link
Member

Hi @warnesj , glad to hear that you successfully flashed your Pinecil and it's not hardware issue!

Well, this is definitely very weird, from your description, it sounds that the WinUSB is actually successfully installed, but something interrupts the flashing or something.... Even more weird is that for you the GD32 DFU Tool didn't worked too...

Thank you so much for the information :)

@hwti
Copy link

hwti commented Aug 9, 2022

I got the same crash on Windows 11.

dfu-util 0.11 worked (without having to change the driver), despite the strange initial status(10) = Device's firmware is corrupt :

Match vendor ID from file: 28e9
Match product ID from file: 0189
Multiple alternate interfaces for DfuSe file
Opening DFU capable USB device...
Device ID 28e9:0189
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #1 ...
Determining device status...
DFU state(10) = dfuERROR, status(10) = Device's firmware is corrupt. It cannot return to run-time (non-DFU) operations
Clearing status
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Option Bytes  "
Non-valid multiplier ' ', assuming bytes
DfuSe interface name: "Internal Flash  "
Found GD32VF103, which reports a bad page size and count for its internal memory.
Fixed layout based on part number: page size 1024, count 128.
File contains 1 DFU images
Parsing DFU image 1
Target name: ST...
Image for alternate setting 0, (1 elements, total size = 52332)
Setting Alternate Interface #0 ...
Parsing element 1, address = 0x08000000, size = 52324
Erase           [=========================] 100%        52324 bytes
Erase    done.
Download        [=========================] 100%        52324 bytes
Download done.
Done parsing DfuSe file

@Albirew
Copy link

Albirew commented Nov 5, 2023

Same issue in Windows 10 (may be related to an update), and also working fine with dfu-util -D x:\path\to\_tmpfirm.dfu

First run in win10 took time with driver installation before crashing, then crashed right after downloaded new firmware.

D:\path\to\dfu-util-0.11-binaries\win64>dfu-util -D D:\path\to\pine64_updater\_tmpfirm.dfu
dfu-util 0.11

Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
Copyright 2010-2021 Tormod Volden and Stefan Schmidt
This program is Free Software and has ABSOLUTELY NO WARRANTY
Please report bugs to http://sourceforge.net/p/dfu-util/tickets/

Match vendor ID from file: 28e9
Match product ID from file: 0189
Multiple alternate interfaces for DfuSe file
Opening DFU capable USB device...
Device ID 28e9:0189
Device DFU version 011a
Claiming USB DFU Interface...
Setting Alternate Interface #1 ...
Determining device status...
DFU state(2) = dfuIDLE, status(0) = No error condition is present
DFU mode device DFU version 011a
Device returned transfer size 2048
DfuSe interface name: "Option Bytes  "
DfuSe interface name: "Internal Flash  "
Found GD32VF103, which reports a bad page size and count for its internal memory.
Fixed layout based on part number: page size 1024, count 128.
File contains 1 DFU images
Parsing DFU image 1
Target name: ST...
Image for alternate setting 0, (1 elements, total size = 55240)
Setting Alternate Interface #0 ...
Parsing element 1, address = 0x08000000, size = 55232
Erase           [=========================] 100%        55232 bytes
Erase    done.
Download        [=========================] 100%        55232 bytes
Download done.
Done parsing DfuSe file

D:\path\to\dfu-util-0.11-binaries\win64>

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

5 participants