Great Sharing: Prusaslicer Profiles by Dylan and McGybeer

Hooray, uploading works!

Some remarks for other users (@macdylan correct me if I am wrong):

  • smuploader should be placed somewhere where the user has write access. This means that e.g. an folder in “Program files” in Windows is not a good idea unless you want to edit the user access rights manually or want to add the “-knownhosts” parameter to the program call.
  • on the first start, smuploader seems to take ages to find the printer. Have patience and don’t keep killing and restarting it as I did…
  • you can speed up subsequent starts by adding the “-hosts” parameter as I did in the script below
  • here is a short Linux shell script that starts smuploader and lets it search the printer for a maximum of 24 hours in case it is not running, then starts Prusaslicer - and kills smuploader as soon as Prusaslicer is closed:
#!/bin/bash
trap "kill -9 -- -$$" ERR EXIT
   [path-to-smuploader]/sm2uploader-linux-amd64 -octoprint :8844 -timeout 86400s -host [printer ip] & [path-to-PrusaSlicer]/PrusaSlicer.AppImage

On Windows you can do the same using a batch or wsh script. The following batch script is untested since I do not have Prusaslicer on Windows any more, but it should work unless I overlooked something. Just create a text file, paste the following text into it, replace the placeholders (the rectagular brackets with everything in between them) with the correct values on your computer and change the “.txt” ending of the file with “.bat”:

@echo off

start "SM2-Uploader by MacDylan" "[path-to-smuplader]\sm2uploader-win64.exe" -octoprint :8844 -timeout 86400s -host [printer ip]
start /w "" "[path-to-PrusaSlicer]\PrusaSlicer.exe" 
taskkill /IM sm2uploader-win64.exe /F

Both scripts use port 8844 as suggested by MacDylan. Depending on your system you might need to change that one if another program already uses it.

In case someone wonders: the “upload and print” button from Prusaslicer just uploads the file as well - the print command is not forwarded (yet, at least - let’s see what MacDylan comes up with next :wink: )