0.0.3 • Published 4 years ago

@unisonht/epson-network-rs232-projector v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Setup Raspberry Pi

  1. Install the latest Raspberry Pi image to SD Card
  2. Create a file in the boot partition called ssh
  3. Update packages

    sudo apt-get update sudo apt-get upgrade sudo apt-get autoremove sudo reboot

  4. Create a new user

    1. sudo adduser epson
    2. Add to sudo sudo visudo add the line epson ALL=(ALL) NOPASSWD:ALL
    3. Remove old user sudo deluser pi
    4. Enable password less ssh
      1. mkdir .ssh
      2. Copy contents of local ~/.ssh/id_rsa.pub to pi ~/.ssh/authorized_keys
      3. Fix permissions chmod 700 .ssh; chmod 640 .ssh/authorized_keys
  5. Fix the time

    sudo apt-get install ntpdate sudo /etc/init.d/ntp stop sudo ntpd -q -g sudo /etc/init.d/ntp start

  6. Reboot nightly

    1. sudo vi /etc/crontab
    2. Add 0 5 * * * root reboot
  7. Install node
    1. uname -m
    2. sudo apt-get install xz-utils
    3. wget https://nodejs.org/dist/v10.16.2/node-v10.16.2-linux-armv7l.tar.xz
    4. xz -d node-v10.16.2-linux-armv7l.tar.xz
    5. tar xf node-v10.16.2-linux-armv7l.tar
    6. cd node-v10.16.2-linux-armv7l
    7. sudo cp -R bin/ include/ lib/ share/ /usr/local/
    8. cd ..
    9. rm -rf node-v10.16.2-linux-armv7l
    10. sudo npm install -g npm
  8. Install node-pi-rs232
    1. sudo su - (npm install requires being root and not just sudo)
    2. apt-get install git
    3. cd /opt
    4. git clone https://github.com/joeferner/node-pi-rs232.git
    5. cd /opt/node-pi-rs232
    6. npm install
    7. Autostart, add /opt/node-pi-rs232/run.sh > /dev/null 2>&1 & to /etc/rc.local
  9. Change pi to readonly mode (see https://github.com/adafruit/Raspberry-Pi-Installer-Scripts/blob/master/read-only-fs.sh)
    1. scp read-only-fs.sh 192.168.0.161:
    2. sudo bash read-only-fs.sh
    3. Enable boot-time read/write jumper? y
    4. GPIO pin for R/W jumper: 21
    5. Install GPIO-halt utility? n
    6. Enable kernel panic watchdog? y