M114 causes Lightburn to hang in busy state using ESP-Link

Dear LightBurn devs, dear community,

first of all a big thanks for this awesome piece of software.

I came across the following problem:

First, my setup is a 3D printer with MKS Gen L board running Marlin with a Neje Laser attached to it which is controlled through an RasperryPi running Octoprint. Lighburn runs on a MacBook Pro running MacOS 10.13.6 (High Sierra).

In order to jog the machine and position the laser on the workpiece I setup an ESP8266 with esp-link and shared the serial port on the Pi via

socat -d -d file:/dev/ttyUSB0,echo=0,ispeed=250000,ospeed=250000 tcp:<IP of the ESP8266>:2323

to that ESP8266 (to circumvent the problem of Lightburn currently not detecting virtual serial ports opened with socat on OSX). This is working quite well most of the time. However, every once in a while I was observing the following oddity: After connecting and homing, I can jog arround for 2-5 commands (using the arrow buttons in the move tab), before it would quit moving indicating that the machine is “Busy” from which it does not recover (need to restart Lightburn). Looking in the console with “show all” enabled, I found that it would always hang on the M114 command preceding the move. And indeed if I use Saved Positions or the console to move the head (therewith no M114 is executed) it works fine until I hit Get Position which freezes in the “Busy” state again.

I then also tried the same in Pronterface, i.e., jogging the machine followed by querrying the position with M114. This is working, albeit, it sometimes takes a moment to respond to M114 (the jog commands get executed instantaneous, only M114 takes a little longer). I also tried different USB cables between the MacBook and the ESP8266 and between the Pi and the printer. The ESP8266 is located in proximity of < 1m to the router, so it should not be a Wifi issue.

So I guess my question is: Is there some timeout in work which prevents Lighburn from receiving the response of M114 if it is slightly delayed? If so, is there some way I can work around this? I really love being able to position the laser by jogging and outlining the cut area before sending the actual job to Octoprint for execution.

Any help is greatly appreciated :slight_smile:

Thank You.

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