Feature/marlin binary file transfer - #1147
Conversation
Apply atomicobject/heatshrink#87 (upstream commit 3b85e98) and add a regression test for finishing with no buffered input.
Add an asynchronous HTTP API for copying files from ESP storage to a Marlin SD card, with M115 capability checks, negotiated heatshrink compression, retries, cancellation, and exclusive printer-link ownership.
|
Did you do some reseach why this is not yet implemented ? |
|
I’m not sure I understand the question. Do you mean that this feature was I saw that ASCII file transfer was implemented in an earlier branch, but was Marlin already supports this through BINARY_FILE_TRANSFER (available in |
|
my question is did you check why this is not integrated already in ESP3D ? |
|
I checked the current code and the repository history more carefully. ESP3D 3.1 currently has no existing Marlin SD-upload implementation to extend. ESP3D 2.0 did have an I also confirm that the proposed implementation uses Marlin’s Binary So there is no current ESP3D M28/M29 upload path to reuse that I can see. This PR adds all code that A future generic printer-SD upload abstraction could share a UI and common lifecycle with both |
|
Let me also add this information about the PR. The first commit e7aaa7e introduces a small exclusive-printer-link API. Although introduced for Marlin Binary File Transfer, this API is intentionally |
|
Ok - I have asked IA to repeat what have been done in several discussions of ESP3D repository: The PR implements Marlin's "Binary File Transfer Mark II" protocol, which uses M28 B1 to enter binary mode. now about the approach you suggest : The PR embeds the heatshrink 0.4.1 C library directly into the repository. The PR description implies using the ESP internal flash (LittleFS) as the staging area for files "of several megabytes". The PR requires the user to (1) upload a file to the ESP filesystem, then (2) manually call a separate HTTP endpoint to start the BFT transfer. |
|
Thank you for the review. I agree that optional features need clear scope, Protocol status and compatibility
The Marlin protocol documentation This protocol has been in Marlin since 2019 and has seen little modification An unmaintained OctoPrint plugin is not evidence that the Marlin protocol is The MEATPACK exclusion is a real current Marlin limitation. Marlin documents MEATPACK makes sense for people printing from an external source, such as
|
|
Ho man this is too long...and you missed/twisted several points... like in other PR
This was not what it was written.... Anyway if the BTF is no more experimental, can you share the link of the documetation API and the release message ? |
|
the protocol is documented here |
|
The first Marlin release to include the binary transfer protocol was Marlin 2.0.0 (Dec 2019), whose release notes explicitly list “Optimized SD binary file transfer option” among the new features. Notably, the release notes do not describe this feature as experimental |
|
Man do not overlook things, as I wrote you should check why is not already implemented: I did not saw any update for this. the document is same from MarlinFirmware/Marlin#26570 Again I never saw a commit changing the status, and this discussion has been too long with always fuzzy explainations , Before pushing a PR is always better to do some research first then open a ticket to discuss the approach / feasability / acceptability - it would avoid this kind discussion which go in circle. About your question: Thank you for your PR but it won't be merged: 1 - This feature is appeliing but still not final : I do not implement experimental feature because I do not have time to support it. |
Summary
Add an optional service that transfers a file from the ESP3D flash filesystem
or attached ESP3D SD card to Marlin's SD card using Marlin Binary File Transfer.
The service:
The heatshrink 0.4.1 encoder is vendored with its upstream license and an
encoder-finalization regression test.
Configuration
Enable by defining:
#define MARLIN_BINARY_FILE_TRANSFER_FEATUREThe feature is disabled by default.
Testing
Hardware-tested with ESP32-S3, ESP3D 3.1, and Marlin built with BINARY_FILE_TRANSFER.
A 2MB G-code file was transferred from ESP32 LittleFS to Marlin's SD card, then verified with Marlin M35 against the host POSIX cksum. The transfer took less than 2 minutes. To check the
cksum, the new g-code proposed in PR 28257was used.The transferred file was subsequently selected and printed successfully from Marlin's SD card.
The companion PR for the WEBUI will be posted soon.