LinuxCNCrsh with Ethernet/TCP

I have my LinuxCNC router outfitted with a laser diode module. I have also used this laser module on a 3d printer running Marlin. I have used LB and F360 to generate gcode files that I run, but I really miss the interactive jogging, framing, etc available with the Lightburn interface.

LinuxCNC already includes a linuxcncrsh interface that allows control of the machine over a ftp port. I can send ftp commands to the linuxcncrsh interface which connect, power up, home, and put the machine into MDI mode to accept gcode commands. Basically, I can run Lightburn on my Win10 PC using serial over ethernet(port 23), format the gcode as a linuxcncrsh command and send it to port 5007 to control the machine.
Basically, I expect to see messages like “G0 X1” on port 23 which I format to “set MDI G0 X1” before sending.

I could not figure out how to set up a Lightburn LinuxCNC device with TCP over ethernet. So I set up a GRBL device. I am seeing continuous “G0\n” messages. I tried replying to each command with “ok\n” but it doesn’t seem to work??? i.e. I’m trying to use the Home/Frame controls and not seeing any other gcode commands come across FTP.

I understand that LB is discontinuing Linux development. This doesn’t require any LB Linux development but it would be nice if the LB Linuxcnc device had a setting for TCP communications.

Questions:

  1. I’m happy with the g-code generated for linuxcnc. Is there a way to enable TCP/internet for linuxcnc?
  2. If I can’t stick with linuxcnc, should I use GRBL or a different device setup to get TCP/internet???
  3. Is there any documentation on what message are sent and responses expected with TCP?

Never tried this one, test with a Custom GCode Device LinuxCNC Flavor:


and select ethernet

I had tried that (and it works to set up the device), but the custom GCode device doesn’t display any of the controls for controlling the laser.

For instance when I set up as GRBL:

But when I setup custom Gcode, I don’t see the controls.

Or maybe I’m missing something and there is a way to add these (homing, framing, etc) controls?

The same with my device, maybe Lightburn only create the code and cannot control the machine.
Maybe @Rick can share some more.
.
Another idea worth a try: create a Custom GCode device, ethernet, GRBL flavor, then edit the output GCodes per your controller requirements.

I believe in the console window, there is an option for seeing everything (show all) that communicated. I don’t know any specifics about how this works, but it’s quick and dirty to try.

:smile_cat:

Yes, that’s why I was working with the device as GRBL. I figured I could find documentation on what it was expecting (or maybe I can use the show all in the console window to figure out if I can use the GRBL Gcode rather than the Linuxcnc Gcode.

I also notice that devices setup as GRBL allow Network Port selection (default 23) which would be nice as far as port permissions go.

Using a Lightburn GRBL TCP device, I changed my servers response from “OK\n” to “ok\n” and now I get a $I command. I’ll have to figure out what that means to GRBL and how to spoof an appropriate response.

I think I will also work with Transfer mode - Sync instead of Buffered???

This is about my limit with grbl devices, I have a couple but don’t think I’ve used them in at least a year. None of them were setup for Ethernet.

At this point, you’ll have to ask support or someone else might know, such as @misken. Hang in there and see if he responds.

Good luck

:smile_cat:

1 Like

This is weird. At my machine, the controls are identical if using grbl or custom gcode. I think you should take a closer look there again, as it’s very easy to change the gcode commands there. I think this is the way to go.

The $I command just asks to print the version string of the device (“View build info”)

Actually, grbl is a subset of Linuxcnc, so it should be quite similar usually. You can find most information here: Grbl v1.1 Commands · gnea/grbl Wiki · GitHub

1 Like

Try with this device LinuxCNC_Custom_Marlin.lbdev (3.8 KB).
Is Marlin based for a 1200 x 1000 laser, IP:192.168.8.10 import and adjust per your settings. I think you´re better served with Marlin flavor.


Click Devices then Import and OK. After select your newly imported device and configure/test.

Thanks to misken and parsec for the help.

I have set up three devices identical except for gcode flavor (LinuxCNC, GRBL, Marlin). With GRBL and Marlin devices I see some initial network communication, the Linuxcnc flavor device doesn’t connect. (All three are using same 192.168.86.251 port 23 sync communication settings.

My current setup sends a bunch of Linuxcncrsh commands directly to the server.
hello EMC user-typing-at-telnet 1.0
set enable EMCTOO
set mode manual
set estop off
set machine on
set home 0
set home 1
set home 2
set mode mdi

Then it formats the Gcode_command_string into:
set mdi Gcode_command_string

Looking at the options in the Custom Gcode device, I may be able to do all this within the Custom GCode gcode profile!!!

1 Like

The Marlin device I posted already has the output tuned as LinuxCNC.

I have linuxcncrsh working pretty well with the modified Marlin device. I still have a C++ program formatting/translating between LightBurn and linuxcncrsh. I found a couple problems with linuxcncrsh, and I’m evaluating changing to a python interface that I think is more up to date.

Thanks for the help!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.