cncjs / cncjs

A web-based interface for CNC milling controller running Grbl, Marlin, Smoothieware, or TinyG.
https://cnc.js.org
MIT License
2.27k stars 562 forks source link

Cant connect my raspberry pi 3B+ to CNCjs #486

Open dubir1 opened 5 years ago

dubir1 commented 5 years ago

Description Cant connect my raspberry pi 3B+ to CNCjs. I want to know i give the right commands.

Versions

Just want to make sure that those are the right commands for my Raspberry pi to work with CNCjs.:

  1. sudo apt-get update
  2. sudo apt-get upgrade -y
  3. sudo apt-get dist-upgrade -y
  4. sudo apt-get install -y build-essential git
  5. sudo apt-get install htop iotop nmon lsof screen -y

Here i do not know what command I need to write:

Install Node.js via Package Manager & Add Package Source

curl -sL https://deb.nodesource.com/setup_7.x | sudo -E bash - # Install NodeJS v7 sudo apt-get install -y nodejs # npm nodejs-legacy #(Installed with nodesource)

  1. sudo npm install npm@latest -g
  2. sudo npm install -g cncjs@latest --unsafe-perm
  3. sudo npm install -g pm2
  4. sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u pi --hp /home/pi
  5. pm2 start $(which cncjs) -- --port 8000 -m /tinyweb:/home/pi/tinyweb
  6. pm2 save
  7. pm2 list
  8. sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8000
  9. sudo apt-get install iptables-persistent -y
  10. sudo netfilter-persistent save

IS IT CORRECT? Thanks!

MitchBradley commented 5 years ago

The same people pay attention to the facebook group as here. You will not get extra help by asking in both places.