OctoPrint / OctoPrint-FirmwareUpdater

OctoPrint plugin for flashing pre-compiled firmware images to a 3D printer.
https://plugins.octoprint.org/plugins/firmwareupdater/
GNU Affero General Public License v3.0
352 stars 76 forks source link

Flash issue with marlinbft and Ender 3 Pro with 4.2.7 motherboard #281

Closed coliss86 closed 2 years ago

coliss86 commented 2 years ago

Hardware Setup

Send: M115
Recv: FIRMWARE_NAME:Marlin 2.0.9.2 (Oct 29 2021 10:30:37) SOURCE_CODE_URL:github.com/MarlinFirmware/Marlin PROTOCOL_VERSION:1.0 MACHINE_TYPE:Custom EXTRUDER_COUNT:1 UUID:cede2a2f-41a2-4748-9b12-c55c62f367ff
Recv: Cap:SERIAL_XON_XOFF:0
Recv: Cap:BINARY_FILE_TRANSFER:1
Recv: Cap:EEPROM:1
Recv: Cap:VOLUMETRIC:1
Recv: Cap:AUTOREPORT_POS:0
Recv: Cap:AUTOREPORT_TEMP:1
Recv: Cap:PROGRESS:0
Recv: Cap:PRINT_JOB:1
Recv: Cap:AUTOLEVEL:1
Recv: Cap:RUNOUT:0
Recv: Cap:Z_PROBE:1
Recv: Cap:LEVELING_DATA:1
Recv: Cap:BUILD_PERCENT:0
Recv: Cap:SOFTWARE_POWER:0
Recv: Cap:TOGGLE_LIGHTS:0
Recv: Cap:CASE_LIGHT_BRIGHTNESS:0
Recv: Cap:EMERGENCY_PARSER:0
Recv: Cap:HOST_ACTION_COMMANDS:1
Recv: Cap:PROMPT_SUPPORT:1
Recv: Cap:SDCARD:1
Recv: Cap:REPEAT:0
Recv: Cap:SD_WRITE:1
Recv: Cap:AUTOREPORT_SD_STATUS:0
Recv: Cap:LONG_FILENAME:0
Recv: Cap:THERMAL_PROTECTION:1
Recv: Cap:MOTION_MODES:0
Recv: Cap:ARCS:1
Recv: Cap:BABYSTEPPING:1
Recv: Cap:CHAMBER_TEMPERATURE:0
Recv: Cap:COOLER_TEMPERATURE:0
Recv: Cap:MEATPACK:0

Describe the problem I followed the doc to flash the printer with marlinbft. When the SD Card is empty, the printer is successfully flashed. However, when I repeated the process, the updater tells me that the printer has been successfully flashed but I cannot see my updates on the printer. I plug the SD card to my computer and found the previous firmware. Here the content of the SD Card : image

Log Files flash.log

Additional context Here is the setup of the plugin : image

image

benlye commented 2 years ago

Your printer won't update if the previous FW file still exists on the SD card. The plugin is supposed to delete the previous file (using an M30 command), and the log you attached indicated that it tried, and indeed the last file from your log isn't in your screenshot of files on the SD card, so it's not clear what the problem is.

2021-10-29 11:01:55,391 - octoprint.plugins.firmwareupdater - INFO - Attempting to delete previous firmware file /fw105629.bin
...
2021-10-29 11:01:55,532 - octoprint.plugins.firmwareupdater - INFO - Transfering file to printer using Marlin BFT '/tmp/tmp7z_rrglf' -> /fw110155.bin

Can you do this:

From what you've said, the first attempt to flash will work but the second won't.

What we want to see at the end is only the second FW file on the SD card. If the FW files from the first and second attempt are both on the card there is a problem deleting files.

coliss86 commented 2 years ago

Here is what I have done :

Is it possible to add an option which deletes all the files fw.*\.bin before starting to flash ?

here are the logs Tell me if you want me to do new tests.

benlye commented 2 years ago

If you were able to flash twice in a row successfully, and only the last used file was present on the card, then it seems like the plugin is working correctly. The FW file uploaded/flashed last won't be deleted until you attempt to update using the plugin again.

I don't know why the board would keep resetting until the card was removed, that's not a problem I've seen before but it sounds like something went wrong with the board's internal updating process.

coliss86 commented 2 years ago

Ok, I'm closing the issue until the next problem :-)

Thanks for your help :muscle:

github-actions[bot] commented 2 years ago

This issue has been automatically locked because there was no further activity after it was closed. Please open a new issue for any related problems.