Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Upload and Print feature on Creality K1 #2103

Closed
victornpb opened this issue Sep 13, 2023 · 4 comments
Closed

Support Upload and Print feature on Creality K1 #2103

victornpb opened this issue Sep 13, 2023 · 4 comments
Labels

Comments

@victornpb
Copy link

I really want this feature on Orca slicer
image

I tried just setting up as a Octoprint/Klipper and giving it an IP, the device tab works but It doesn't understand the API.

What does the API normally looks like?

This is what uploading a gcode file on the web interface looks like:

It is just a POST on /upload/filename.gcode endpoint

curl 'http://192.168.0.104/upload/K1%20Exaust%20Fan%20Muffler%20(2)_PLA_1h45m.gcode' \
  -H 'Accept: application/json, text/plain, */*' \
  -H 'Accept-Language: en-US,en;q=0.9,pt;q=0.8' \
  -H 'Connection: keep-alive' \
  -H 'Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7cSZUxfFJUfMXs3r' \
  -H 'Origin: http://192.168.0.104' \
  -H 'Referer: http://192.168.0.104/' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36' \
  --data-raw $'------WebKitFormBoundary7cSZUxfFJUfMXs3r\r\nContent-Disposition: form-data; name="file"; filename="K1 Exaust Fan Muffler (2)_PLA_1h45m.gcode"\r\nContent-Type: application/octet-stream\r\n\r\n\r\n------WebKitFormBoundary7cSZUxfFJUfMXs3r--\r\n' \
  --compressed \
  --insecure

Starting a print is done via websocket, this is where the ws is

curl 'ws://192.168.0.104:9999/' \
  -H 'Pragma: no-cache' \
  -H 'Origin: http://192.168.0.104' \
  -H 'Accept-Language: en-US,en;q=0.9,pt;q=0.8' \
  -H 'Sec-WebSocket-Key: hujCwV9dGN8BJF+uYwObAg==' \
  -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36' \
  -H 'Upgrade: websocket' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: Upgrade' \
  -H 'Sec-WebSocket-Version: 13' \
  -H 'Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits' \
  --compressed

And this is the actual message:

  {"method":"set","params":{"opGcodeFile":"printprt:/usr/data/printer_data/gcodes/K1 Exaust Fan Muffler (2)_PLA_1h45m.gcode"}}
image

Does this looks like something that could be easily implemented? If you need more details on anything including running tests I'll be happy to help

@brentrichardjr
Copy link

From my experience setting up and rooting my friend's K1 Max, I suspect your using stock firmware, in which case that would be a creality limitation due to creality's custom klipper and associated software. The rooted firmware works, although it's best to only slice and upload in orcaslicer and then start it on the printer or in creality print.

@victornpb
Copy link
Author

Yes, my original post is about supporting unmodified creality firmware, this would benefit a lot of people currently using creality print slicer which is mostly non developers.

Copy link

GitHub bot: this issue is stale because it has been open for 90 days with no activity.

@github-actions github-actions bot added the stale label Dec 18, 2023
Copy link

GitHub bot: This issue was closed because it has been inactive for 7 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants