This plugin is up for adoption

The current maintainer of this plugin is looking for someone to take over maintenance. Learn more...

Upload files using Marlin Binary File Transfer Mark II


There are several major issues currently reported:

  • Installation on systems with python 3 but not python 2
  • Failed transfers on latest Marlin bugfix-2.0.x

I am not currently in a position to maintain this plugin, or the library that handles the actual binary transfer. If you’re interested, please respond to the pinned issues on the repositories:


This will transfer a file to a printer using Marlin firmware’s experimental binary file transfer protocol.

  • Marlin bugfix-2.0.x
  • Enable BINARY_FILE_TRANSFER feature in Configuration_adv.h
  • Ensure capability reporting is enabled

General use:

  1. Connect to the printer
  2. Click the Marlin BFT icon in the Nav bar to open the transfer dialog
  3. Click the gear icon to adjust the timeouts in the settings dialog
  4. Back in the transfer dialog, adjust the transfer settings “Reconnect” and “Send GCode after Transfer”
  5. Click the upload button to select the file. Transfer will start immediately
  6. The dialog will close automatically when the transfer and post-transfer phases are complete

Updating firmware on BigTreeTech boards:

  1. In settings:
    1. Ensure bin is in the “Accept file extensions” list
    2. Set “Wait before reconnect” to a reasonable value like 12000 (12 seconds)
  2. In the transfer dialog:
    1. Enable “Send GCode after transfer” and set the Gcode to M997 (marlin reset)
    2. Click the upload button and select the firmware.bin file. Click OK.
    3. After the M997 reset, reconnect the printer (or enable “Reconnect after transfer”)

It’s also possible to transfer a file using the http api.

  1. Upload the file to OctoPrint using the files api
  2. Disconnect the printer using the connection api
  3. POST a json object to the marlinbft api: ``` POST /api/plugin/marlinbft Content-Type: application/json X-Api-Key: abcdef…

Body: { “command”: “start_transfer”, “handler_type”: “api” “port”: “/dev/ttyACM0”, “baudrate”: 250000, “local_path”: “marlinbft/firmware.bin”, “comm_timeout_ms”: 1000, “wait_after_connect_ms”: 3000, “post_transfer_gcode_enable”: true, “post_transfer_gcode”: [“M997”] } ```

The properties:

required. must be the value “start_transfer”
required. must be the value “api”
required. the serial port the printer is connected on
required. the local path on the server to the uploaded file
optional, settings override, int. the communication timeout
optional, settings override, int. if provided, how long to wait after establishing connection
optional, settings override, bool. whether to send gcode after the transfer completes
optional, settings override, string array. the gcode to send

For settings override properties, if no value is provided the current configuration will be used.


marlin binary file transfer dialog
marlin binary file transfer navbar button