I recently obtained an XTool D1 Pro a couple days ago and took a moment to figure out how to utilize lightburn gcode + the built in wifi so I didn’t need to either; pull the SD everytime, or tether. Overall, pretty simple! It was actually about the exact same process I use on my Snapmaker. I used wireshark to see how XCS communicated and it was the same way, just a different URL.
I made a simple .bat file to send the file to the XTool and drag/drop. To make it yourself, replace XXX.XXX.XXX.XXX with your XTool D1 IP and save as a .bat. Linux/Mac users will have to do their own respective files, this is for windows.
@echo on
curl -X POST -F file=@"%~1" "http://XXX.XXX.XXX.XXX:8080/cnc/data?filetype=1"
pause
Just do up your project as normal, but PUT M17 IN THE HEADER GCODE, click Save GCode, then simply drag and drop the file onto the .bat file and wait for it to upload and give you an ok response and hit enter to close the window. You can also remove the pause and the window will close when it’s done, I just like having the confirmation personally Afterwards, poke the button on the front of the machine!
I think you misinterpreted my post, this is a guide on how to. You save the code above as a .bat file after editing in your XTool IP address, then you can drag/drop your lightburn gcode file onto it and it sends it via wifi to the laser. Then just press the button on the front to start it, negating the need to tether your PC via USB.
Im sorry but I am very slow when it comes to computers. I am trying my hardest to learn the best i can so I can operate my laser better. Where do I edit in the IP address at? Im sorry if my questions are frustrating
Ok so lets see if I got it right this time. So if I am creating a file to burn in lbrn software I should make the file name filesend.bat and save under all files. Once again I apologize for my lack of knowledge on this whole thing
After you save the .bat file I presented here, create your lightburn project as normal. Then click the save gcode button in lightburn to save the gcode to a file. Then drag and drop the gcode file onto the file send .bat.
EDIT: Make sure to have M17 in the header gcode in Lightburn.
Ok, that’s good - no point in having redundant code!
I guess another option with this whole concept would be to have something like a PowerShell program monitor a particular “XTool” folder, so anytime ‘Save GCode’ is used to that folder, the file will be immediately uploaded.
Would likely be an easy thing to add to Lightburn. It’s pretty much just a curl post command. Have a box in device settings for the IP, and if one is set, make an upload gcode button appear next to save. That could simply save the gcode file to a temporary place, run it through curl, then delete the temp file. Maybe have it wait for the ok response to signify it’s done.
Framing is done via XCS the exact same way the actual job is done. It simply makes a small gcode file to run the framing border with low power, sends it to the machine, and you push the button and watch the framing. So it shouldn’t be too hard to implement in Lightburn, since once you get the wifi sender done, just make the framing button save and send to the machine the boundary run.
I’ve made a few more discoveries and currently working on something, I think, users would really like and could be a feature in Lightburn. It’s nothing major but to me, has been a very nice thing. I don’t want to hype too much until I do further testing, but keep an eye out in the next few days.