User Tools

Site Tools


tech:rpi:start

This is an old revision of the document!


Notes

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://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: * http://www.signal11.us/oss/hidapi/ * https://github.com/darrylb123/usbrelay To get status: <code>./usbrelay 2>/dev/null</code>
To get status in bash script:
<code> $ eval $(sudo ./usbrelay 2>/dev/null) $ echo $PSUIS_2 </code> Turn on: <code>/usbrelay EO5ZA_1=1</code> Turn off: <code>/usbrelay EO5ZA_1=0</code>

tech/rpi/start.1513744960.txt.gz · Last modified: 2017/12/19 22:42 by rk4n3