Using Lightburn on Linux

Hey There.

I am new around here and getting started with Lightburn. I have a xTool D1 Pro and doing my first steps with it.
I do have to bring up a question, that might feel like an old lame discussion to some of you. I apologize upfront, but I have the feeling that I am not alone with this. So here I am now :slight_smile:

I use Arch btw - ok enough of that. I do in fact run Arch Linux and have Lightburn setup and running just fine. But I have trouble connecting the Laser.
Before deciding to drop this here I did some research, but there is not much out there. But I figured that I can not be the only one running this setup.

So I understand that the connection to the Laser is just a serial communication and the xTool D1 Pro comes with a serial converter that is driven by the ch341 driver/kernel-module
I have the module loaded and when plugging in the Laser, /dev/ttyUSB0 is created. When selecting this port in Lightburn, the Laser-Dialog switches from Disconnected to Ready - but the Console-Dialog still shows ‘Waiting for connection…’ and switching on the show all switch, the message ‘G0’ is spammed for ever.

From my understanding so far this is like a ‘HELLO’ message from Lightburn to initiate the serial communication and Lightburn is expecting a response back. But clearly there is none.

I took care of the permissions of the /dev/ttyUSB0 device and my user has access to it, as this seems to trip most Linux users.
The communication did work once after some replugging, rebooting, restarting but i can not get this to work since then.

How did you create the device in LightBurn? Did you use the xTool provided lbdev file?

Yes of course. Took me some time to figure out, but after Reading the Support-Pages from xtool I found their lbdev file and imported it.

Can you capture output of lsusb as well as all dmesg output after connecting the machine?

everything seems fine there to me

➜  ~ sudo lsusb -s003:019 -v

Bus 003 Device 019: ID 1a86:7523 QinHeng Electronics CH340 serial converter
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               1.10
  bDeviceClass          255 Vendor Specific Class
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x1a86 QinHeng Electronics
  idProduct          0x7523 CH340 serial converter
  bcdDevice           81.34
  iManufacturer           0
  iProduct                2 USB Serial
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x0027
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              104mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      1
      bInterfaceProtocol      2
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0008  1x 8 bytes
        bInterval               1
Device Status:     0x0000
  (Bus Powered)
➜  ~ journalctl -k
usb 3-1.2: new full-speed USB device number 19 using xhci_hcd
usb 3-1.2: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice=81.34
usb 3-1.2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
usb 3-1.2: Product: USB Serial
usbcore: registered new interface driver ch341
usbserial: USB Serial support registered for ch341-uart
ch341 3-1.2:1.0: ch341-uart converter detected
usb 3-1.2: ch341-uart converter now attached to ttyUSB0
➜  ~ ll /dev/ttyUSB*
crw-rw---- root uucp 0 B Mon Sep 18 22:51:04 2023  /dev/ttyUSB0

my user is in group uucp. i used other serial connections in the past for other devices. so this i would consider as working.

If you run with super user privileges does anything change?

Can you take a screenshot of Edit->Device Settings?

If you are familiar with serial terminals, are you able to connect to the port manually to get a welcome message?

You’re going a little offroad here relative to the standard install. LightBurn has you add group permission to both dialout and tty which may be to cover different group ownership scenarios. I think theoretically what you’ve done should work, however.

Have you logged out and logged back in since adding the group permissions?

running with sudo is not possible as I run a Wayland desktop and GUI can not start.

the group dailout does not exist on my system. and according to the docs uucp is used to access devices at /dev/ttyUSB*

and I am able to access the device /dev/ttyUSB0, but even when doing chmod 666 /dev/ttyUSB0, every permission shenanigan should be moved out of the way - at least temporary.

using a serial console, like picocom, I also can access the serial port at /dev/ttyUSB0 but I have no other Information about the serial connection other than the Baud Rate. I can not find any Information on parity,stopbits,databits etc. The general defaults picocom uses do not seem to work. At least, I do not receive anything in the serial console. Or maybe they do work and there is nothing to see in the first place.

Log out and in was performed, after changing my users group assignments.

Edit: I also added my user to the tty group. Logged out and back in, but no change.

Now it just randomly worked once.

This time I payed attention on what I did.

The Laser was plugged in an powered on and the USB was plugged in my Laptop. It was not working.
I powered the Laser off and than back on using the power switch on the Laser.

Than I saw a bunch of symbols in the serial console in Lightburn, then the Information from the Laser, like Firmwareversion and everything just worked.

And everything kept working after I unplugged an replugged the USB-Cable.

But after powering off the Laser and powering it back on, it does not work anymore.

Now again. But it was not immediately like before. I powered the Laser down and back on, saw no change in Lightburn. Turned on ‘Show all’ in the console, saw the G0’s but then out of a sudden, the connection worked.

Waiting for connection...
[xTool D1Pro:ver B2]

(did a Home, to test responsiveness of the Laser)

OK - I figured it out. At least I guess.

There is a switch on the Laser Mainboard - right next to little ‘Boot load’ button. The switch is labeled with UPLOAD on the PCB.

I tried to find information on the switch online and came across this video

The guy talks about the switch and seems to have some deeper knowledge of how those machines tick. He calls it a ‘write protect switch for the Motherboard’. If set to ON, the machine might behave weird.

So as mine does behave weird, I powered the machine off, switched it. Et voila - everything is fine.

After discovering this, I was able to find Information online to switch this to ON when performing Updates. But never to switch it to OFF. Or anything on what it does in the first place.

So my guess is that it write protects the firmware when set to OFF. But no Idea, why it should make the machine behave weird

well, for now, I would consider my Problem fixed. But I am still Interested if anyone has Information about this switch.

That’s odd because I’ve seen this cause the opposite problem. Leaving to “On” prevents normal function.

But in any case, glad it’s working for you.

1 Like

Sorry - it was late. I did not mention that the pictures show the switch AFTER i switched it. So it was in ON position before. Although I did not put it in ON by myself. I noticed the switch when unpacking the Laser, but did not touch it. At least not on purpose. Might have when assembling though but can not tell for sure.

I switched it to OFF and everything is fine ever since.

Thanks for your time and help @berainlb

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