User Tools

Site Tools


tech:rpi:start

This is an old revision of the document!


Table of Contents

Notes

Basic Installation

misc

  • Change root and pi passwords
  • Add user, ensure groups, and sudoers
  • Update host name in:
    • /etc/hostname
    • /etc/hosts
  • Resize root partition, reboot, resize fs
  • Make a copy of /var to /home/sys
  • Install (via apt-get) some basics:
    • ksh
    • rsync
    • xterm
    • htop
    • git
    • libudev-dev
    • libusb-1.0-0-dev
    • libfox-1.6-dev
    • autotools-dev
    • autoconf
    • automake
    • libtool
    • xfe (optional)
  • Prune /home/sys/var
  • Set up tmpfs mounts, like (pay attention to mode and size):
    tmpfs /var/log tmpfs defaults,noatime,nosuid,mode=0755,size=100m 0 0
    • /tmp, no mode, size=100M
    • /var/tmp, no mode, size=30M
    • /var/log, mode=0755, size=100M
    • /var/spool/mqueue, mode=700, gid=12, size=30M
  • Clone source for USB relay control:
    git clone git://github.com/signal11/hidapi.git
    git clone https://github.com/darrylb123/usbrelay.git
  • Build HIDAPI, cd to source dir and:
    ./bootstrap
    ./configure --prefix=/usr --enable-testgui
    make
    make install

You need HIDAPI and USBRELAY:

git clone git://github.com/signal11/hidapi.git

Check out the readme, and install dependencies before installing.
then:

git clone https://github.com/darrylb123/usbrelay.git

Then, in usbrelay folder:

gcc -o usbrelay usbrelay.c -lhidapi-libusb

Then do:

ldconfig

Read more here:

To get status:

./usbrelay 2>/dev/null


To get status in bash script:

$ eval $(sudo ./usbrelay 2>/dev/null)
$ echo $PSUIS_2

Turn on:

/usbrelay EO5ZA_1=1

Turn off:

/usbrelay EO5ZA_1=0
tech/rpi/start.1514416818.txt.gz · Last modified: 2017/12/27 17:20 by rk4n3