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

Duet wifi S3D

Scheduled Pinned Locked Moved
General Discussion
31
50
12.4k
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.
  • undefined
    sungod3k
    last edited by 5 Oct 2017, 20:13

    I ran the original and the autouploaded file through notepad++s compare tool and they matched 100%

    http://www.42dimensions.de/
    https://printnewworlds.blogspot.com/

    1 Reply Last reply Reply Quote 0
    • undefined
      MoS-tekknix
      last edited by 5 Oct 2017, 21:18

      @sungod3k:

      I ran the original and the autouploaded file through notepad++s compare tool and they matched 100%

      Uhm, thats interesting.

      Can you try this one, i'm using and change the IP to your DuetWifi/Ethernet IP?

      [[language]]
      curl -F "file=@[output_filepath]" "http://192.168.178.144/rr_upload?name=gcodes/[output_filename].gcode"
      
      

      That is working even if the Printer is currently busy.

      Regards
      MoS-tekknix

      1 Reply Last reply Reply Quote 0
      • undefined
        sungod3k
        last edited by 7 Oct 2017, 19:25

        Great, that seems to work. Thanks

        http://www.42dimensions.de/
        https://printnewworlds.blogspot.com/

        1 Reply Last reply Reply Quote 0
        • undefined
          MoS-tekknix
          last edited by 7 Oct 2017, 23:42

          @sungod3k:

          Great, that seems to work. Thanks

          You're welcome. That's what's a forum for 😉

          Regards
          MoS-tekknix

          1 Reply Last reply Reply Quote 0
          • undefined
            tychop
            last edited by 26 Feb 2018, 12:16

            @MoS-tekknix:

            @sungod3k:

            I ran the original and the autouploaded file through notepad++s compare tool and they matched 100%

            Uhm, thats interesting.

            Can you try this one, i'm using and change the IP to your DuetWifi/Ethernet IP?

            [[language]]
            curl -F "file=@[output_filepath]" "http://192.168.178.144/rr_upload?name=gcodes/[output_filename].gcode"
            
            

            That is working even if the Printer is currently busy.

            Regards
            MoS-tekknix

            This script
            curl -F "file=@[output_filepath]" "http://192.168.x.x/rr_upload?name=gcodes/[output_filename].gcode"
            uploads the file correctly, but the print doesn't start…

            Am I missing something?

            1 Reply Last reply Reply Quote 0
            • undefined
              dc42 administrators
              last edited by 26 Feb 2018, 12:24

              You need to send a separate command to print the file.

              Duet WiFi hardware designer and firmware engineer
              Please do not ask me for Duet support via PM or email, use the forum
              http://www.escher3d.com, https://miscsolutions.wordpress.com

              1 Reply Last reply Reply Quote 0
              • undefined
                tychop
                last edited by 26 Feb 2018, 13:16

                Yes, I figured that could be the issue, however, I couldn't find anything here https://github.com/chrishamm/DuetWebControl…

                Is there a command to print? Where can I look for it?

                I can see

                [[language]]
                function startUpload(type, files, fromCallback) {
                
                ```in the javascript, but am clueless how to specify 'print' as the type to upload gcode & start the print
                1 Reply Last reply Reply Quote 0
                • undefined
                  dc42 administrators
                  last edited by 26 Feb 2018, 13:46

                  Use the rr_gcode command to send M32 "filename.gcode".

                  Duet WiFi hardware designer and firmware engineer
                  Please do not ask me for Duet support via PM or email, use the forum
                  http://www.escher3d.com, https://miscsolutions.wordpress.com

                  1 Reply Last reply Reply Quote 0
                  • undefined
                    tychop
                    last edited by 26 Feb 2018, 13:54

                    Yep, Got it

                    This works:
                    curl -F "file=@[output_filepath]" "http://192.168.x.x/rr_upload?name=0%3A%2Fgcodes%2F[output_filename].gcode"
                    curl "http://192.168.x.x/rr_gcode?gcode=M32 0%3A%2Fgcodes%2F[output_filename].gcode"

                    Many thanks !!

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      dc42 administrators
                      last edited by 26 Feb 2018, 16:07

                      You will need to enclose the filename in double quotes when sending it if you want it to work on filenames with ( or ) or ; in the name.

                      Duet WiFi hardware designer and firmware engineer
                      Please do not ask me for Duet support via PM or email, use the forum
                      http://www.escher3d.com, https://miscsolutions.wordpress.com

                      1 Reply Last reply Reply Quote 0
                      • undefined
                        SEUTec
                        last edited by 3 Nov 2018, 21:04 11 Mar 2018, 21:03

                        Hi all:

                        curl –data-binary "@[output_filepath]" "http://192.168.x.x/rr_upload?name=gcodes/[output_filename].gcode"

                        –data-binary don't losse the NewLine or CarriageReturns as -d do.
                        and don't add extra data to the gcode file as -F do.

                        Regards.

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          kuhnikuehnast
                          last edited by 26 Apr 2018, 18:46

                          The best that worked for me is:

                          curl --data-binary "@[output_filepath]" "http://192.168..XX.XX/rr_upload?name=gcodes%2F[output_filename].gcode"

                          curl "http://192.168.XX.XX/rr_gcode?gcode=M32 [output_filename].gcode"

                          But there are still some problems...

                          1. If you have a Space in the name, the file is only saved as the first part til the space (e.g. Test file.gcode is saved as Test.gcode)
                          2. Special Characters (e.g. äöü) aren't saved properly
                          3. Is there a possibility to delete the file on the local computer after uploading it to the duet? Couldn't find any solution...

                          greetings kuhni

                          1 Reply Last reply Reply Quote 0
                          • undefined
                            bellwether @dc42
                            last edited by bellwether 6 Nov 2018, 16:03 11 Jun 2018, 14:56

                            @dc42

                            hmm, i guess this is a stupid question, but I am unclear

                            1. where to put these lovely scripts to load the file.
                            1 Reply Last reply Reply Quote 0
                            • undefined
                              mloidl
                              last edited by 10 Jul 2018, 05:38

                              @brianhanifin said in Duet wifi S3D:

                              --------------------------16eea21da68ae83e
                              Content-Disposition: form-data; name="file"; filename="curl_test.gcode"
                              Content-Type: application/octet-stream

                              @dc42
                              I'm currently implementing the G-Code upload for Slic3rPE and struggeling with the same problem mentioned by @BrianHanifin .
                              Some parts of the HTTP-Header are saved in the G-Code after upload when uploading the G-Code using form_add of libcurl.
                              Is it somehow possible to support forms in the firmware?

                              Thanks,
                              Best regards
                              Martin

                              1 Reply Last reply Reply Quote 0
                              • undefined
                                Johhnyalter
                                last edited by Johhnyalter 10 Jul 2018, 15:51

                                HI,

                                I have just installed a Duet Wifi and running well...However, I cant work out how to get the slicer to control bed temp. Simplify3D wants tools and laser to be indicated as T0 to T5, and Duet indicates bed as 'B' .... Yes, I can and do control bed temp manually prior to printing, but I want it auto controlled by g-code.

                                Could the gurus here help please ?

                                Thanks

                                1 Reply Last reply Reply Quote 0
                                • OBELIKSundefined
                                  OBELIKS
                                  last edited by 11 Jul 2018, 07:17

                                  I think you are overthinking it. Do you have multiple beds?
                                  If not, default setting in S3D is OK, it will output M140 S70 to set bed temperature to 70°C, and that works with Duet

                                  P3Steel Toolson mk2 - Duet 2 WiFi --> RatRig V-Core with Duet WiFi 1.03
                                  Original Prusa i3 MK3S

                                  1 Reply Last reply Reply Quote 1
                                  • gtj0undefined
                                    gtj0
                                    last edited by gtj0 23 Jul 2018, 20:30

                                    In case anyone's interested... here's how I print from Linux...

                                    #!/usr/bin/env bash
                                    echo "$(date) $@" >> /var/log/pp.log
                                    printit() {
                                       set +xe
                                       op="$1"
                                       of=$(basename "$op")
                                       ncftpput -t 5 duet0 /gcodes/ "$op" || ncftpput -t 5 -v duet0 /gcodes/ "$op"
                                    #  I do the ncftpput again if the first one fails as it does sometimes.
                                       fn=$(python -c "import urllib ; print(urllib.urlencode({'gcode': 'M32 \"$of\"'}))")
                                       echo $fn
                                       curl "http://duet0/rr_gcode?$fn"
                                       echo "Done"
                                    }
                                    
                                    printit "$@" 2>&1 >> /var/log/pp.log
                                    

                                    save that someplace and make it executable. You do need ncftpput (part of ncftp package), curl and python (both of which are standard). There are no issues with spaces in the filename BTW.

                                    In Simplify3D Process, Scripts, Post Processing put something like...

                                    /bin/bash /data1/3d/duet/pp.sh "[output_filepath]"
                                    

                                    substituting "/data1/3d/duet/pp.sh" with wherever you put the script.
                                    All you have to do now is 'Save Toolpaths To Disk" and the file should transfer and start printing after the save is complete.

                                    I have also had good luck printing directly from Simplify3D.
                                    Like others have said, you need to set "M555 P2" at the end of your config.g to turn on Marlin emulation and you also have to set "Hardware Flow Control" in the firmware Communications settings.

                                    If I didn't have the PanelDue 7i, I'd print directly. I'm not overly fond of having to switch desktop windows around to start the print.

                                    1 Reply Last reply Reply Quote 0
                                    • undefined
                                      Tanne
                                      last edited by 2 Oct 2018, 09:08

                                      I've cobbled up a quick powershell script for the purpose when I got my Duet. It watches a folder for new/changed .gcode files and offers to upload them.

                                      # adjust these to your values
                                      $folder = "e:\3dprint\gcodes"
                                      $filter = "*.gcode"
                                      $Global:baseUri = "http://duet3d.local/rr_upload?name=gcodes/"
                                      
                                      	
                                      Add-Type -AssemblyName PresentationCore,PresentationFramework
                                      $Global:lastPath = ''
                                      $Global:lastTime = Get-Date
                                      
                                      $Watcher = New-Object IO.FileSystemWatcher $folder, $filter -Property @{ 
                                          IncludeSubdirectories = $false
                                          NotifyFilter = [IO.NotifyFilters]'FileName, LastWrite'
                                      }
                                      
                                      $changeAction = [scriptblock]::Create('
                                          $path = $Event.SourceEventArgs.FullPath
                                          $name = $Event.SourceEventArgs.Name
                                          $timeGenerated = $Event.TimeGenerated
                                      
                                          # usually multile change events are triggered when a file is written, no need to spam those
                                          if ($Global:lastPath -ne $path -or ($Global:lastTime - $timeGenerated).TotalSeconds -lt -10) {
                                      
                                              $Global:lastPath = $path;
                                              $Global:lastTime = $timeGenerated
                                              $msgBoxResult =  [System.Windows.MessageBox]::Show(("Upload `"{0}`" to the printer?" -f $Event.SourceEventArgs.Name),"GCode Upload","YesNo","Question")
                                      
                                              switch  ($msgBoxResult) {
                                                  "Yes" {
                                                      try {
                                                          Invoke-WebRequest -Uri ("{0}{1}" -f $baseUri, $name) -Method Post -InFile $path 
                                                      } catch {
                                                      }
                                                  }
                                                  "No" {
                                                  }
                                              }
                                              }
                                      ')
                                      
                                      $onChanged = Register-ObjectEvent $Watcher Changed -SourceIdentifier FileChanged -Action $changeAction
                                      
                                      # prevent the console from closing
                                      while (1) {
                                          sleep 2
                                      }
                                      

                                      Save somewhere with .ps1 extension and edit line 2-4 to match your settings. To run it rightclick the file -> "Run with PowerShell" and leave the powershell window open. To trigger the upload question just save your gcode file into the folder you specified in line 2.

                                      1 Reply Last reply Reply Quote 0
                                      • undefined
                                        CR-34T3R
                                        last edited by 10 Feb 2019, 18:28

                                        For anyone still looking through this thread, the following S3D script will upload the file to your printer (with a timestamp) and tell it to start printing that file much like Slic3r would do:

                                        curl  -F "file=@[output_filepath]" "http://XXX.XXX.XXX.XXX/rr_upload?name=gcodes/[output_filename].gcode&time=YYY"
                                        curl "http://XXX.XXX.XXX.XXX/rr_gcode?gcode=M32[output_filename].gcode"
                                        

                                        Copy and paste into "Additional terminal commands for post processing" under the Scripts tab and replace XXX.XXX.XXX.XXX with your printer's IP address or hostname if applicable. As mentioned above, DWC will throw a couple of errors but doesn't seem to impact the print in any way. Happy printing!

                                        undefined 1 Reply Last reply 15 Feb 2019, 12:31 Reply Quote 1
                                        • undefined
                                          dc42 administrators @CR-34T3R
                                          last edited by dc42 15 Feb 2019, 12:31

                                          You may wish to add the following line at the end:

                                          curl "http://XXX.XXX.XXX.XXX/rr_disconnect"

                                          This will avoid RRF buffering up messages that S3D isn't going to fetch.

                                          Duet WiFi hardware designer and firmware engineer
                                          Please do not ask me for Duet support via PM or email, use the forum
                                          http://www.escher3d.com, https://miscsolutions.wordpress.com

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