Skip to content
This repository has been archived by the owner on Jan 29, 2018. It is now read-only.

Install: C.H.I.P

Vadim Radu edited this page Jan 31, 2017 · 7 revisions

In testing phase

##Use CHIP as a LaserWeb server and USB serial gateway CHIP is a 9$ Linux mini computer (1/2 the size of a Rapberry Pi) with integrated WiFi, Bluetooth and USB host. You can get it from www.getchip.com.

###Getting started Connect to chip using the information provided in the manual ( headless or full-fledged).

###Optimize CHIP environment I recommend changing the default software installed with the lite image, if the chip pc will be used without graphical interface (instructions here), because it frees up a lot of resources otherwise wasted.

I assume all the commands listed below are executed by a sudo capable user, in the home directory, without beeing escalated to root privileges unless it is necessary.

sudo apt update 
sudo apt upgrade

###Install necessary software See: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions for details.

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

###Install LaserWeb3

cd /home/chip
git clone https://github.com/LaserWeb/LaserWeb3.git
cd LaserWeb3
npm install node-pre-gyp node-gyp serialport
npm install

###Edit configuration To find out exact location of the binaries listed below, run

which node
pwd

the laserweb3.service should be edited to reflect the right config: -node binary is in the path listed after the which node command -path to laserweb should be updated in ExecStart, WorkingDirectory, using the output of pwd -user should be updated in User, it is chip if it hasn't been modified.

###Start LaserWeb server There are two ways of running LaserWeb: manual start

cd /home/chip/LaserWeb3
node server.js   

or using a service by running this commands:

sudo cp ~/LaserWeb3/laserweb3.service /etc/systemd/system/laserweb3.service
sudo systemctl enable laserweb3.service
sudo systemctl start laserweb3

Note: to avoid privilege escalation for serial connection the user should be added in the dialout and tty group, replacing (it is chip if not otherwise modified) with corresponding name, via:

sudo usermod -aG dialout <username>
sudo usermod -aG tty <username>