How to: Lightburn on Linux Manjaro, USB, Atomstack X7 PRO

It took me about two days to get this recipe together by the bits and pieces found.
It explains how to get Lightburn on Linux Manjaro, to control my laser via USB.
That is the “generic” part which might be useful for any Manjaro/Arch Linux user with any laser machine.
For the “specific” part, my laser is the AtomStack X7 PRO; it has a GRBL controller having a CH340 chip.

((1)) What is detected on USB by Manjaro?

■ Plug the AtomStack X7 PRO into USB and turn it on.

■ Get the USB device list…
$ lsusb

Bus 005 Device 009: ID 1a86:7523 QinHeng Electronics CH340 serial converter

Notes:
● 0x1a86 is the vendor ID.
● 0x7523 is the product ID.
● The Atomstack X7 PRO uses the CH340 chip.

■ In USB tree view to see the driver used…
$ lsusb -t

|__ Port 3: Dev 9, If 0, Class=Vendor Specific Class, Driver=, 12M

Notes:
● “Driver=???, 12M”; there is no driver loaded for that device;
should be something like ch340 or ch341.

((2)) Lightburn manual: LINUX INSTALLATION

■ Replace shell command…
$ sudo adduser $USER dialout && sudo adduser $USER tty
with…
$ sudo usermod -G uucp,tty -a $USER
and execute!

■ Logout and login to apply the user/group member changes.

Notes:
● Current $USER needs to be member of the USB port owners group,
to have access to USB.

((3)) Ensure driver for the Atomstack X7 PRO (CH34x) is present in kernel

■ Check current installed and running kernel for CH34x driver
$ ls /lib/modules/5.15.7-1-MANJARO/kernel/drivers/usb/serial
… (among others)
ch341.ko.xz

Notes:
● It is present and part of current kernel.
● Else an external CH34x driver need to be installed.
● Installed does not mean loaded (on demand).

((4)) Ensure driver for the Atomstack X7 PRO (CH34x) is loaded on boot.

■ Create file /etc/modprobe.d/atomstack.conf
$sudo nano /etc/modprobe.d/atomstack.conf

options usbserial vendor=0x1a86 product=0x7523

Notes:
● You can name atomstack.conf into anything you want.
● The vendor and product IDs were discovered in ((1)).

■ Turn off the laser machine.
■ Reboot the PC.

((5)) Check for ttyUSB0

■ Get the tty file list…
$ ls /dev/tty*
Notes:
● There is NO ttyUSB0 in the list.

■ Turn on laser machine (boot till home screen)

■ Get the tty file list again…
$ ls /dev/tty*
Notes:
● There is ttyUSB0 in the list.
● ttyUSB0 can sometimes be ttyUSB1, 2, etc.
● Boot laser machine is needed for init signal to Manjaro to load ch341;
now you can unplug and replug USB cable and see ttyUSB0 fanish and reapear
without reboot laser machine.
● Try $ lsusb -t as explained in ((1)); ch341 is now visible.

■ Start Lightburn and connect laser through ttyUSB0.

While figuring this out I intended to publish this recipe in this forum.
Hope this helps anyone… and get him/her up n running in 30 minutes,
instead of two days!

5 Likes

I run Ubuntu. Surprised that it requires a driver…

I run a couple of grbl and a Ruida machine and have never loaded a driver for any of them. Have run Lightburn for a while…

They use libusb as a standard as far as I know.

Is this something specific to the Atomstack?

Where do they get the module ‘ch341.ko.xz’, if it’s not present on the machine?

I usually use something like ‘ls -l /dev/tty[UA]*’ this will list anything that follows ‘tty’ that starts with a ‘U’ or ‘A’. Probably still too much output from the /dev/ directory. I usually have some ttyACM0 along with the other stuff.

Thanks, I’m sure it will be valuable.

:smiley_cat:

1 Like

Maybe Ubuntu has better automation in this area so it seems the hardware need no driver.
libusb is also on Manjaro I just checked and its for generic usb access it says.
Maybe the specific hardware behind it often needs a driver for translating from generic system instructions to specific hardware used.
I don’t know exactly, just guessing.

Atomstack is my first laser cutter ever. Got it two weeks ago.
Found out it uses the ch340 (serial converter?) chip. It is s also used in Arduino’s I came across in figuring out.
I would like to thinker with Ruida and other DSP controllers also in time.

:sunglasses:

Most of the time I use a ‘Dragon’ external ISP for the Arduino bread board. The original ones won’t load via ISP connection because of hardware configuration.

Those I just plug into Ubuntu USB and use them… No drivers…

I have udev rules for most of my USB devices.

Most of these Linux versions are a spinoff from Debian, so I would think they would be more than similar.

Are you sure you need it?

Where is it, if it’s not on the system?

:smiley_cat:

1 Like

Maybe they need driver but are loaded automatically on your OS. Every OS has its level of automation luxury for end users. But for some OSes a little or big extra work needs to be done.

Point ((4)) of this thread, putting a file in /etc/modprobe.d (Arch linux wiki) is used by udev.

I don’t know of all the intricate details about what happens down there in the Software-OS-USB-Hardware channels. But I do know that the hardware and driver belongs to manufacturer knowledge domain, up to the point where an OS talks to it through that software driver.

And then of course it is preferable that an OS supports a wide variety of hardware by having drivers for them on board or as an installable/compilable driver. Even more preferable, recognizes hardware and seIect the right driver automatically. The modprobe section, was a needed step to get automatic recognition and loading going on Manjaro/Arch.

I guess some plug and play USB devices have a little firmware inside containing their own drivers, like a wireless mouse/keyboard with this little USB receiver that comes with it; that works immediately. But still I bet there are drivers down there.

What I probably should have said was that I put it in the udev directory. When I first started using Linux, I was on Debian. I had to carry a ‘stick’ with the proprietary support code on it to get it to work. Spend time with modprobe, maybe that’s why I stay away…

This used to be called the HAL (Hardware Abstraction Layer), but I think they have been trying to get rid of it since ‘the turn of the century’. I think it’s turned into a ‘giant monolith’ of a program, becoming impossible to support.

USB and USB Hardware connections are just serial lines. Both ends have to have some smarts to make them work. There is a good standard on how they communicate. I’m sure we’ll see a move to the type ‘C’ USB. I think the Macs have them. Another different connector… :crying_cat_face:

As a manufacturer, they can make these ‘sticks’ or ‘controllers’ work without having a specific ‘driver’. They just ‘choose’ not to.

Take care… Thanks for the chat and taking the time to detail the installation on your Linux box.

:smiley_cat:

1 Like

I appreciate your replies to this first thread of mine ever here on Lightburn.
There are some worth knowing details added in the process, which is great.
Thank you! Till next time!
:smiley:

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