Duet wifi S3D
-
Just my 2 cents and might be off topic but if using usb, you might want to modify a cable and cut out the 5V supply especially if you have a dedicated 5v in to the board already.
-
Thank you for this. I have fine tuned the code for Simplify3D a little, and it works great!
curl -d "@[output_filepath]" -X POST http://hypercube.local/rr_upload?name=gcodes/[output_filename].gcode
-
OK. While the above code does upload a file to duet, it does something to the file that leaves it unprintable. I have experimented with it and discovered the following works. This may not be the optimal method still, but it does yield a printable GCode file.
curl -F "file=@[output_filepath]" "http://hypercube.local/rr_upload?name=gcodes/[output_filename].gcode"
The reason I say it is not optimal is that is places some HTTP data at the top of the file. But, Duet appears to ignore this code and happily prints anyway. So, for now it will do.
--------------------------16eea21da68ae83e Content-Disposition: form-data; name="file"; filename="curl_test.gcode" Content-Type: application/octet-stream
-
This is great! thumbsup Thanks for sharing…
-
Hi,
I used a similar command with Octoprint succesfully so I was quite happy when I found this thread.
The command Im using is
curl -# -d "@[output_filepath]" -X POST http://xxx.xxx.xxx.xxx/rr_upload?name=gcodes/[output_filename].gcode"
which uploads the code correctly, however when I want to print the autouploaded code, it starts the print, does nothing and then returns the message "print finished in 0h 1m".The same code works normally when I upload it via the webinterface.
Whats the trick to get that working?
Cheers
-
Please download the "uploaded" GCode via WebInterface and take a look into the file. Maybe there it will be clearer what happens.
-
I ran the original and the autouploaded file through notepad++s compare tool and they matched 100%
-
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 -
Great, that seems to work. Thanks
-
Great, that seems to work. Thanks
You're welcome. That's what's a forum for
Regards
MoS-tekknix -
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-tekknixThis 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?
-
You need to send a separate command to print the file.
-
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
-
Use the rr_gcode command to send M32 "filename.gcode".
-
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 !!
-
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.
-
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.
-
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...
- 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)
- Special Characters (e.g. äöü) aren't saved properly
- 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
-
hmm, i guess this is a stupid question, but I am unclear
- where to put these lovely scripts to load the file.
-
@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