Install: Raspberry Pi

The LaserWeb4 frontend is very feature-rich and quite heavy and will not run smoothly on the Rasbian Desktop, but you can run the server part on a Raspberry Pi and connect from a PC on the network.

Install the server

Start from a clean Rasbian image, on a Raspberry Pi 2 or 3.


Install Node  10.x

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
apt-get install -y nodejs

Confirm you have the correct NPM version (should be >=6.4.1)

npm -v

Confirm you have the correct NodeJS version (should be >= 10.15.1)

node -v


Install git

sudo apt-get update
sudo apt-get install git


Download and install LaserWeb server

cd /home/pi
git clone https://github.com/LaserWeb/lw.comm-server.git
cd lw.comm-server
sudo npm install serialport --unsafe-perm --build-from-source
sudo npm install


Manually start the server

cd /home/pi/lw.comm-server
node server.js

You should get the following console response:

> This email address is being protected from spambots. You need JavaScript enabled to view it. start C:\Users\cprez\git\LaserWeb\lw.comm-server
> node server.js

***************************************************************
        ---- LaserWeb Comm Server 4.0.133 ----
***************************************************************
  Use  http://192.168.1.100:8000 to connect this server.

* Updates:
  Remember to check the commit log on
  https://github.com/LaserWeb/lw.comm-server/commits/master
  regularly, to know about updates and fixes, and then when ready
  update accordingly by running git pull

* Support:
  If you need help / support, come over to
  https://forum.makerforums.info/c/laserweb-cncweb
***************************************************************

Press CTRL-C to stop the server.
Now that you know it's working, you can setup the autostart of the service.

Setup Systemd to automatically start the LaserWeb server

# Move to the directory with the .service file
cd ~/lw.comm-server/

# Create the symlink
sudo ln -s `pwd`/lw.comm-server.service /etc/systemd/system

# Reload the service files so the system knows about this new one
sudo systemctl daemon-reload

# Enable and start the service
sudo systemctl enable lw.comm-server.service
sudo systemctl start lw.comm-server

You can check the status of the server with

sudo systemctl status lw.comm-server

You can restart the server with

sudo systemctl restart lw.comm-server

You can stop the server with

sudo systemctl stop lw.comm-server

(The logs will get added to /var/log/syslog)

Install the frontend

Install the LaserWeb4 executable on your Windows, OSX or Linux PC. This way you get the lastest frontend version.

    Connect your machine to one of the USB ports
    Start the LaserWeb4 app
    Click on Comms tab
    Click on "Server Connection"
    Change Server-IP to `RasPi-IP:8000`  (replace RasPi-IP with the IP of your RasPi)
    Click connect

-> You should see a green message "Server connected" in the log area at bottom right.

Alternatively you can use the frontend without installing the executable (older version):

    Connect your machine to one of the USB ports
    Open Chrome (or Chromium) on any PC in your network.
    Open URL `RasPi-IP:8000`  (replace RasPi-IP with the IP of your RasPi)
    Click on Comms tab
    Click on "Server Connection"
    Change Server-IP to `RasPi-IP:8000`  (replace RasPi-IP with the IP of your RasPi)
    Click connect

-> You should see a green message "Server connected" in the log area at bottom right.

Then:

    Set the "Machine Connection" dropdown to USB
    Choose the correct serial port in the "USB / Serial Port" dropdown (ex. /dev/ttyACM0)
    Check that the baud rate is set to 115200
    Click connect below

-> You should get a green message "Machine connected" in the log area, followed by a green line with the detected firmware. If you get some red messages insted of the green firmware line, you probably have selected the wrong port or the firmware is not supported.

You can now proceed with Initial Configuration.

(Alternative) Frontend via Webbrowser

Insead of installing the frontend, your can alternatively just use a web browser (preferably chrome) to call the server integrated frontend, but this one is not up to date with the latest version!

  • Connect your machine to one of the Raspi USB ports
  • Open Chrome Browser (or Chromium) on any PC in your network (not on a Raspi!).
  • Open URL `Raspi-IP:8000`  (replace Raspi-IP with the IP of your Raspi)
  • Click on Comms tab
  • Click on "Server Connection"
  • Change Server-IP to `Raspi-IP:8000`  (replace Raspi-IP with the IP of your Raspi)
  • Click connect

-> You should see a green message "Server connected" in the log area at bottom right.

  • Set the "Machine Connection" dropdown to USB
  • Choose the correct serial port in the "USB / Serial Port" dropdown (ex. /dev/ttyACM0)
  • Check that the baud rate is set to 115200
  • Click connect below

-> You should get a green message "Machine connected"  in the log area, followed by a green line with the detected firmware. If you get some red messages insted of the green firmware line, you probably have selected the wrong port or the firmware is not supported.

Reset on Connect

Some boards need a reset command after connecting (or will disconnect after a few seconds). To do that, you have to create a file called ".env" (nothing in front of the dot!) in the installation folder of the server with the following content:

RESET_ON_CONNECT=1


You can proceed with Initial Configuration.

Print