Jyers / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. | Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
http://marlinfw.org
GNU General Public License v3.0
2.14k stars 386 forks source link

[Feature Request] allow firmware flashing via OctoPrint #1067

Closed datapaganism closed 3 years ago

datapaganism commented 3 years ago

Description

It would be nice if the firmware was enabled so we could try to flash the firmware using OctoPrint, I have lost all of my sdcard adapters.

Sorry if this has been raised before

Steps to Reproduce

to quote from here

Enable the Binary File Transfer protocol

To compile firmware with the binary file protocol enabled, uncomment this line in Configuration_adv.h:

#define BINARY_FILE_TRANSFER

Set SDCARD_CONNECTION to ONBOARD

The SD card connection must be configured for ONBOARD. If it is set to LCD the firmware file will be copied to the SD card in the LCD and the board will not update when it is reset.

To set the SD card to ONBOARD, modify the #define SDCARD_CONNECTION line in Configuration_adv.h:

#define SDCARD_CONNECTION ONBOARD

datapaganism commented 3 years ago

I only made the feature request after seeing that people could do it themselves, The way I use is my printer is that is hooked up to OctoPrint 24/7 and the SD card is only inserted after a new firmware release.

adam3654 commented 3 years ago

It can be done, I haven't flashed firmware manually in a while now. See this discussion

datapaganism commented 3 years ago

@tititopher68-dev why would you have an unformatted SD card in your printer in the first place? Now I'm confused

datapaganism commented 3 years ago

@adam3654 @datapaganism I complete by saying that this method can be used on other motherboards (BTT or MKS or even the Aquila Voxelab) which do not require SD formatting ... but not with Creality v4 motherboards. 2.2 or v4.2 7 which require the prior formatting of the SD ... therefore to format with an adapter the card on the PC ... On the other hand, I do not know if it is possible to flash the firmware directly from the PC as with the CR10 V2 for example.

Thank you, I understand now, but it seems to be a non issue to me, of course first time setup is necessary.

adam3654 commented 3 years ago

@tititopher68-dev I have flashed new firmware files using the Octoprint plugin for the last 2 months without issue. I have an SD card that I leave in the printer all the time. The plugin writes the new bin file to the SD card, and sends the M997 g-code command to flash the new firmware file.

datapaganism commented 3 years ago

@adam3654 I take it you have compiled your own version of the firmware then, I guess I shall do the same

adam3654 commented 3 years ago

@adam3654 I take it you have compiled your own version of the firmware then, I guess I shall do the same

Yes, there are good step by step guides that makes setting up the environment quite easy. Then you just have to make edits to 2 text files as desired, and click a button in the "auto build marlin" extension. Then upload the bin file to the printer using the octoprint extension (there's a setting in octoprint that needs to be modified that is covered in the link I provided earlier to avoid problems) and you are all set.

smooreace commented 3 years ago

Firmware most definitely does NOT have to be put on a formatted card. I have NEVER used a clean card, and flashed dozens of times

smooreace commented 3 years ago

I think that the reason for the recommendation is to prevent the ignorant from trying to flash with multiple .bin files on the card. That step alone probably prevents several dozen support "calls" a month, in turn saving a fortune in man-hours. There is zero logic to it NEEDING to be done otherwise. Thats simply not how data works.

On Fri, Jun 25, 2021 at 5:31 PM tititopher68-dev @.***> wrote:

@smooreace https://github.com/smooreace: Maybe but I have already had problems doing as you do and in the WIKI, as elsewhere, it is strongly recommended to reformat the SD to avoid any possible problem ...

@datapaganism https://github.com/datapaganism @adam3654 https://github.com/adam3654 : OK, you don't necessarily need an SD to flash the motherboard. I modified my build derived from that of Jyers to have a clean process. I took the opportunity to add a very useful option concerning end of filament detectors ....

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Jyers/Marlin/issues/1067#issuecomment-868864673, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIPE4Q5FJDANWPKJULVRV3TTUT7TRANCNFSM47JVXJWA .