Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Slic3r PE 'Send to printer'?

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    12
    36
    5.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • robmundefined
      robm
      last edited by

      @AlexLin:

      OK I found a solution. It is a bit of a hack where I use the ip address /url to determine whether to send it to an octopi or a duet

      Nice work, well done. (in lieu of a 'like' button for an individual post) 🙂

      1 Reply Last reply Reply Quote 0
      • mloidlundefined
        mloidl
        last edited by

        I don't think prusa will accept a pull request for this issue at the moment.
        On github i found the following open issue https://github.com/prusa3d/Slic3r/issues/695, seems they will do some refactoring.

        Today they committed a change which seems to be part of the refactoring.
        https://github.com/prusa3d/Slic3r/commit/4a90ab1f6a1390df4ce332b342536ee61db6ebfd

        cbusillo created this issue in prusa3d/Slic3r

        closed Feature request: Duet Wifi connect #695

        0 bubnikv committed to prusa3d/Slic3r
        Merge branch 'octoprint'
        1 Reply Last reply Reply Quote 0
        • thehairundefined
          thehair
          last edited by

          We'll see if we get a response to the most recently opened issue on Github https://github.com/prusa3d/Slic3r/issues/935. I'm not too hopeful that the Prusa version will ever add in support for the Duet. I ended up making a post processing script that uploads the gcode file. The script is basically just the perl code that slic3r usually uses to upload files.

          #!/usr/bin/perl -i
          
          use strict;
          use warnings;
          use LWP::UserAgent;
          use File::Slurp;
          use File::Basename;
          
          # Set up filepath and filename
          my $filepath = $ARGV[0];
          $filepath =~ tr|\\|/|;
          my $filename = basename($filepath);
          
          my $ua = LWP::UserAgent->new;
          my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time);
          my $t = sprintf("%4d-%02d-%02dT%02d:%02d:%02d",$year+1900,$mon+1,$mday,$hour,$min,$sec);
          
          my $server_endpoint = "http://192.168.X.XX/rr_upload?name=gcodes/$filename&time=$t";
          my $req = HTTP::Request->new(POST => $server_endpoint);
          my $data_file = read_file( $filepath, { binmode => ':raw' } );
          $req->content($data_file);
           
          my $resp = $ua->request($req);
          
          if ($resp->is_success) { 
              my $message = $resp->decoded_content;
              print "Received reply: $message\n";
          }else {  
              print "HTTP POST error code: ", $resp->code, "\n";
              print "HTTP POST error message: ", $resp->message, "\n";   
          }
          

          You'll have to put the address of your Duet where the "XXX" are in the $server_endpoint var. I run all my post processing scripts from a windows bat file which looks sort of like this at the end:

          pause
          perl "C:\Program Files\Slic3r\uploadgcodefile.pl" %1
          del /f %1 
          pause
          

          The bat file uploads the gcode file and then deletes it. The first pause allows me to close the command window to cancel the upload/delete command. The last pause allows me to verify the upload worked.

          This process definitely isn't perfect, but is easier than manually uploading files.

          Xphomegra created this issue in prusa3d/Slic3r

          closed [Request] Add duet/reprapfirmware upload (From slic3r 1.3.0-dev) #935

          1 Reply Last reply Reply Quote 0
          • mloidlundefined
            mloidl
            last edited by

            Hi,

            I've added the option for sending G-Codes to Duet and already created a pull request for it (https://github.com/prusa3d/Slic3r/pull/1051)
            Let's see if Prusa will overtake it into their repo.

            If someone is interested in testing it can be cloned from https://github.com/mloidl/Slic3r/tree/duet

            Best regards,
            Martin

            mloidl opened this pull request in prusa3d/Slic3r

            closed Added possibility for upload to Duet #1051

            Phaedruxundefined AlexLinundefined Mordekainundefined 3 Replies Last reply Reply Quote 3
            • Phaedruxundefined
              Phaedrux Moderator @mloidl
              last edited by

              @mloidl Great work, I hope they take it for the next release.

              Z-Bot CoreXY Build | Thingiverse Profile

              1 Reply Last reply Reply Quote 0
              • AlexLinundefined
                AlexLin @mloidl
                last edited by

                @mloidl nice,well done!!

                1 Reply Last reply Reply Quote 0
                • Mordekainundefined
                  Mordekain @mloidl
                  last edited by

                  @mloidl thanks for the work! great to see it was accepted!

                  If it's not too much trouble, do you think you could post a release already built with the commit?

                  mloidlundefined 1 Reply Last reply Reply Quote 0
                  • mloidlundefined
                    mloidl @Mordekain
                    last edited by

                    @mordekain I have not yet tried to build a release for another pc than mine. I'll try to create a linux appimage for testing. I'm not able to provide a windows or mac executable.
                    On the other hand i assume prusa will release another beta or release candiate soon (current beta was released 19 days ago)

                    1 Reply Last reply Reply Quote 0
                    • Mordekainundefined
                      Mordekain
                      last edited by

                      New release is up!
                      https://github.com/prusa3d/Slic3r/releases/tag/version_1.41.0

                      The new feature works wonderfully, thanks @mloidl !

                      1 Reply Last reply Reply Quote 0
                      • mloidlundefined
                        mloidl
                        last edited by

                        As already mentioned by @Mordekain, the latest Slic3r PE Release 1.41.0 contains the duet upload functionality.
                        Unfortunately the timestamps for uploaded files are not set correctly. This has been fixed and is already submitted to the master branch, so it will be part of the next bug fix release.

                        Phaedruxundefined 1 Reply Last reply Reply Quote 1
                        • Phaedruxundefined
                          Phaedrux Moderator @mloidl
                          last edited by

                          @mloidl great work. Can't wait to try it out. Thanks.

                          Z-Bot CoreXY Build | Thingiverse Profile

                          1 Reply Last reply Reply Quote 0
                          • resamundefined
                            resam
                            last edited by

                            @mloidl thanks for your work in the Duet integration!

                            I'm running my Duet behind a reverse proxy with HTTP Basic Auth to add a (thin) layer of security.
                            Any chance you can add auth credentials to Slic3r? No need for new UI fields, a simple https://username:password@my-fancy-printer.com/ would be sufficient.

                            I'm not sure if the Slic3r HTTP library already supports this - looks like a custom (bare-bones) implementation based on curl?

                            1 Reply Last reply Reply Quote 0
                            • mloidlundefined
                              mloidl
                              last edited by

                              @resam
                              Please have a look to https://github.com/prusa3d/Slic3r/issues/650.

                              If this is what you want it should be possible to implement, since the logic is already implemented for octoprint.

                              Are you able to build Slic3r by your self? I could then push it to my branch and you could test it.

                              Tirpitz93 created this issue in prusa3d/Slic3r

                              closed Feature request: support for basic auth for octoprint #650

                              resamundefined 1 Reply Last reply Reply Quote 0
                              • resamundefined
                                resam @mloidl
                                last edited by

                                @mloidl good find!
                                Actually I'm having problems with getting my HTTPS cert accepted, although I set the path to my self-signed crt file in PEM format.
                                I guess this is the problem: https://github.com/prusa3d/Slic3r/blob/22569de00fb05d3e69695d1a07819b795bbde134/xs/src/slic3r/Utils/Http.cpp#L109
                                (not sure how / where Slic3r is built, but apparently on macOS they don't support custom CA files?)

                                1 Reply Last reply Reply Quote 0
                                • fmaundefined
                                  fma
                                  last edited by

                                  I installed this new release, but I can't seen any menu / button to upload the file to the Duet; how do I configure that?

                                  Frédéric

                                  1 Reply Last reply Reply Quote 0
                                  • mloidlundefined
                                    mloidl
                                    last edited by

                                    @fma In your printer section you have to Select Duet as Host Type

                                    0_1535970651213_7484f5df-356f-4aea-bd44-554410307667-image.png

                                    1 Reply Last reply Reply Quote 0
                                    • fmaundefined
                                      fma
                                      last edited by

                                      Ok, I see. Thanks!

                                      Frédéric

                                      1 Reply Last reply Reply Quote 0
                                      • fmaundefined
                                        fma
                                        last edited by

                                        Ok, I just tried this feature: it works, but:

                                        • it does not support spaces in file/dir name;

                                        • the files send from Slic3rPE don't have the same format that the ones sent from the web server: from Slic3rPE, it uses DD/MM/YYYY instead of MM/DD/YYYY. So order when sorted by date is wrong.

                                        Anyway, thanks for the great job!

                                        Frédéric

                                        1 Reply Last reply Reply Quote 0
                                        • mloidlundefined
                                          mloidl
                                          last edited by

                                          @fma
                                          Thanks for your findings
                                          The problem with the timestamp is already fixed and on the master branch. So it will be part of the next bugfix release.

                                          Regarding whitespaces, i'll try to fix that.

                                          Regards,
                                          Martin

                                          1 Reply Last reply Reply Quote 0
                                          • mloidlundefined
                                            mloidl
                                            last edited by

                                            @fma
                                            I've created Pull Request https://github.com/prusa3d/Slic3r/pull/1195 for the issue with the whitespaces. Hope they will overtake it. Fingers crossed.

                                            mloidl opened this pull request in prusa3d/Slic3r

                                            closed duet upload: allow whitespaces in filenames #1195

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA