prusa3d / Prusa-Firmware-MMU

Other
32 stars 15 forks source link

Don't detach USB before entering bootloader #208

Closed gudnimg closed 1 year ago

gudnimg commented 1 year ago

Fixes this error when flashing via PrusaSlicer:

image

leptun commented 1 year ago

Still doesn't work for me. The new error is:

avrdude-slic3r: ser_open(): can't open device "\\.\COM23": The system cannot find the file specified.

avrdude-slic3r: Could not open port: COM23

COM23 is the bootloader com port. COM20 is the firmware com port. I still have to press upload twice

gudnimg commented 1 year ago

Still doesn't work for me. The new error is:

avrdude-slic3r: ser_open(): can't open device "\\.\COM23": The system cannot find the file specified.

avrdude-slic3r: Could not open port: COM23

COM23 is the bootloader com port. COM20 is the firmware com port. I still have to press upload twice

Strange I've been flashing the MMU multiple times today without any issues. Are you using Windows 10? image

leptun commented 1 year ago

Yes. Windows 10. PrusaSlicer 2.5.0. The MMU unit is using a fresh board with the stock bootloader.

leptun commented 1 year ago

I think the MMU bootloader was attaching to the USB bus too late. This might be because I was using the MMU connected to a USB 2.0 HUB together with other devices. I bypassed the USB hub and now it uploads correctly. This still shouldn't be a reason to fail the upload, so we should investigate more. It would be nice if PrusaSlicer could add a longer delay after closing the first COM port so that the device attaches at its own pace.

Otherwise, I think this PR is good and we should merge it