-
Notifications
You must be signed in to change notification settings - Fork 79
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
[marlinBFT] Flashing failed, Unable to transfer firmware file to printer #318
Comments
Can you try another client / browser? |
Also, can you enable verbose BFT protocol logging and upload the resulting octoprint.log file? The console log is empty because this method doesn't run any external commands. |
I just test with firefox, chrome and microsoft edge but with no results, that was you mean ?
How should I do that ? |
Soory, I forgot I have seen verbose BTP protocol logging in the documentation and I already activate it earlier. What is : |
I tried from an another computer (windows 10 too), same thing in the log "Cannot open file on client" |
For information, I activated the serial.log from octoprint. There is no trace of the file exchange When i normally switch on the printer and octoprint connect to it, il looks like: when i retry to update the firmware and the process lead to the disconnection/reconnection: The only difference I see is the timeout but I don't think it matters. |
It's as if the file really doesn't exist on your Pi, or something (like permissions) is stopping OctoPi from reading it. I've never seen this before.
Is saying that they largest file the server will accept from the browser is 5,243,904 Bytes, or about 5MB. We can increase that but 5MB should be plenty. What is the size of the firmware file you're trying to upload? |
Actually the error is misleading / badly worded. I can only guess that there is something in your running firmware which is causing the BFT protocol to fail. Either that or another OctoPrint plugun is interfering with the serial connection. |
Another thought - I've got a Creality v4.2.2 board for testing. Do you have the bin file for the firmware that your printer is running? If you upload the file I could try loading it on my board to see what happens when I try to use BFT to load a new file to it. |
Here is my last firmware In parallel, Ill try with different location of the file, like directly one the raspberry. |
I do not know how to select a local file with the plugin, maybe it is not even possible ? Sould we suspect the network between the file and the raspberry ? |
I can confirm that with this FW installed on the board I cannot use BFT to transfer any further FW updates, so the problem seems to be something in this image which is rendering the BFT protocol unusable. What's interesting is that the code which is supposed to delete the previous FW file is also not working - the file remains on the SD card. Furthermore, no files can be removed from the SD card with the
Compared with the same command on a firmware I compiled from the bugfix-2.0.x branch this morning:
So I think your problem is in your firmware, but I don't know what is causing it. I noticed you have If you compiled this firmware yourself you need to take a look at the settings you have changed and see if you can figure out where the problem is. |
Indeed, that is interesting, thank you for your investigation.
It was just a test after reading some threads on the binary file transfer issues, I will disable it from now.
Yes I have, with VScode but nothing fancy I think, I will look further in this way and try to compile the bugfix 2.0.x, but my primary goal was to update my printer from and old By the way, in the documentation for marlin BFT flashing it refers only to |
Yes, I'm running bugfix-2.1.x on my own printer and BFT works fine. My board is a BTT SKR Turbo, but I'll try 2.1.x on the Creality board too when I get a chance. |
I can confirm that firmware I just compiled from the current bugfix-2.1.x branch for my Creality v4.2.2 board also has this problem (the SD card seems to be read only - files cannot be deleted). Firmware I just compiled from today's bugfix-2.1.x branch for my SKR Turbo does not have the problem - I can read and write the SD card. So this looks like a bug or configuration issue in Marlin's bugfix-2.1.x branch which affects the Creality board (maybe others). |
Seems like this is probably related to MarlinFirmware/Marlin#24422. |
I have just recompiled a fresh new FW from latest
Since you tested it this morning with the same board, I do not understand why it is not working for me. Any ideas ? |
My initial tests were with an older bugfix-2.0.x branch. Reading through the Marlin issue, it sounds like there is a 'new' bugfix-2.0.x since 2022-02-22, and builds up to this date might be OK. I haven't been following Marlin development too closely so don't know what the story is with 'new' and 'old' bugfix-2.0.x but I did see when I tried to update one of my branches that there were a lot of changes at some point in the past few months. It sounds like there was a complete SD IO rewrite somewhere in there. |
I confirm: I am not sure what to look to find the cause, what are your suggestions ? |
Modification like that on sdio.h and sdio.cpp could impact function of the firmware updater plugin ? |
I don't know. I think you either need to comment on the Marlin SD Card problem issue I linked above or create your own issue on the Marlin repository. Remember that the root cause here seems to be that we can't write to the SD card (to create new files or delete old ones). The firmware updater plugin is impacted because SD card IO operations are failing. Commenting on the existing issue might be the way to go because this issue (which sounds pretty similar to what we're seeing) was closed as a duplicate of MarlinFirmware/Marlin#24422. |
Done here ;) |
I arrived here later, I also had the same error with the latest Marlin Bugfix 2.1, maybe because of the refactoring of the SDIO module. |
Hum, I tried the again with the new bugfix 2.1.x but BFT failed with the same error, no file written on the sd card... I will try later after getting some sleep... |
For an Ender3V2 with 422 (STM32F1) latest SDIO commit in Bugfix solves the issue. |
It is working, I think it was a mess in my VStudio files. Thank you for all @benlye , this plugin is very useful and time saving. |
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. |
Hardware Setup
Creality V4.2.2, Ender3V2, octoprint, raspberrypi 3b1.2
Software setup
OctoPrint 1.8.1, octopi_version: 0.18.0
Experimented with different firmwares : marlin release 2.1, Marlin bugfix-2.1.x
VS code :
default_envs = STM32F103RE_creality_xfer or STM32F103RE_creality
Tested with commented and uncommented #define CUSTOM_FIRMWARE_UPLOAD
Describe the problem
Message "Flashing failed Unable to transfer firmware file to printer" when flashing with marlin BFT method.
The octoprint.log tell us :
Exception: Cannot open file on client
What does it mean ?
Log Files
octoprint.log:
octoprint(5).log
plugin_firmwareupdater_console.log
Nothing in it (why ?)
Additional context
I tried different configurations over two days, different firmwares, and i finally make a clean install of octoprint 1.8.1 on a new sdcard but non results.
Since it is the only flashing method which seams to be working with de V4.2.2 creality board, I would love to have this feature so I would be happy to help figuring out a solution.
The text was updated successfully, but these errors were encountered: