Guide: Automatic Start via Drag/Drop

Oh wait, that bug is apparently still there. :upside_down_face: The snapmaker controller can’t parse comments correctly, whereas Lightburn can. That’s why it works in Lightburn, but not sent to the machine. Simply remove all the ; from your header gcode (or copy below).

G28
G90
G53
G0 Z25 F6000
G54
G92 Z0
G0 Z200
G53
G0 X4 Y0 F6000
G54
G92 X-1.7 Y4.5
M3 S0

I tested and verified that was the problem by using your file (modifying in my own focus height and material) running it and noticed the wonk, then noticed the semicolons and removed them and it ran fine afterwards.

Found this bug way back in March on firmware 1.15.x

Thanks a lot Skreelink. I even remember reading about this. But it never came to my mind to check that :see_no_evil:

Hey Skreelink,

I love the work you’re doing! The instructions were super simple, and BOOM I’m already able to send commands to the snapmaker wirelessly. It’s great!

I’ve got two questions:

  1. Do you know how I can send files to the snapmaker without starting the job so that I can start it on the machine?
    I tried simply deleting the “start job” command line, but the file will not appear in the local storage of the Snapmaker. (I could always use sm2uploader, but it would be cool to do it this way)

  2. Where are you finding the API codes in order to figure out all this stuff?

Thank you for your time!

K_8D

The API call is upload, make a bat with this instead;

@echo on
curl -X POST "http://[IP HERE]:8080/api/v1/connect?token=[TOKEN HERE]"
curl -X GET "http://[IP HERE]:8080/api/v1/status?token=[TOKEN HERE]"
curl -X POST -F file=@"%~1" "http://[IP HERE]:8080/api/v1/upload?token=[TOKEN HERE]"
curl -X POST "http://[IP HERE]:8080/api/v1/connect?token=[TOKEN HERE]"
curl -X GET "http://[IP HERE]:8080/api/v1/status?token=[TOKEN HERE]"
pause

Besides research on various forums and whatnot, reading through the source code on the github. :upside_down_face:

That is fantastic!! Thanks a bunch!

If you’ve got a spare moment, a list of all the API codes for Snapmaker you’ve gathered over the years would be really handy if you have such a thing kicking around.

Thanks again!