diff --git a/CarPi/README.txt b/CarPi/README.txt new file mode 100644 index 0000000..13bdbf5 --- /dev/null +++ b/CarPi/README.txt @@ -0,0 +1,21 @@ + + Raspberry Pi 3 (RPi) Setup + ========================== + +After writing the MicroSD card with the Raspbian image downloaded from the raspberrypi.org site, +put it into the MicroSD card slot on the RPi and power it up. + +Open a console window, and run the following commands. + +sudo apt-get update +sudo install git subversion +mkdir NTCNA +cd NTCNA +svn co https://www.probestar.com/NTCNA/CVehicle (password is temppwd) +cd NTCNA/CVehicle/trunk/platforms/bboneb +./rpi-setup.sh + +Takes awhile till it is done. There is a lot of software to install. +Powercycle the BBB. + +Adjust start_v2v.sh link as needed, re-run to run the right apps. diff --git a/CarPi/etc/can.conf b/CarPi/etc/can.conf new file mode 100644 index 0000000..c0b476a --- /dev/null +++ b/CarPi/etc/can.conf @@ -0,0 +1,4 @@ +[default] +interface = socketcan_native +channel = can0 + diff --git a/CarPi/etc/dhcpcd.conf b/CarPi/etc/dhcpcd.conf new file mode 100644 index 0000000..4936dd5 --- /dev/null +++ b/CarPi/etc/dhcpcd.conf @@ -0,0 +1,59 @@ +# A sample configuration for dhcpcd. +# See dhcpcd.conf(5) for details. + +# Allow users of this group to interact with dhcpcd via the control socket. +#controlgroup wheel + +# Inform the DHCP server of our hostname for DDNS. +hostname + +# Use the hardware address of the interface for the Client ID. +clientid +# or +# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361. +# Some non-RFC compliant DHCP servers do not reply with this set. +# In this case, comment out duid and enable clientid above. +#duid + +# Persist interface configuration when dhcpcd exits. +persistent + +# Rapid commit support. +# Safe to enable by default because it requires the equivalent option set +# on the server to actually work. +option rapid_commit + +# A list of options to request from the DHCP server. +option domain_name_servers, domain_name, domain_search, host_name +option classless_static_routes +# Respect the network MTU. This is applied to DHCP routes. +option interface_mtu + +# Most distributions have NTP support. +#option ntp_servers + +# A ServerID is required by RFC2131. +require dhcp_server_identifier + +# Generate SLAAC address using the Hardware Address of the interface +#slaac hwaddr +# OR generate Stable Private IPv6 Addresses based from the DUID +slaac private + +# Example static IP configuration: +interface eth0 +static ip_address=192.168.2.12/24 +#static ip6_address=fd51:42f8:caae:d92e::ff/64 +#static routers=192.168.2.1 +#static domain_name_servers=192.168.2.1 8.8.8.8 + +# It is possible to fall back to a static IP if DHCP fails: +# define static profile +#profile static_eth0 +#static ip_address=192.168.1.23/24 +#static routers=192.168.1.1 +#static domain_name_servers=192.168.1.1 + +# fallback to static profile on eth0 +#interface eth0 +#fallback static_eth0 diff --git a/CarPi/etc/hosts b/CarPi/etc/hosts new file mode 100644 index 0000000..160287a --- /dev/null +++ b/CarPi/etc/hosts @@ -0,0 +1,19 @@ +127.0.0.1 localhost +127.0.1.1 raspberrypi pi raspberry + +# vehicle network +192.168.2.1 router +192.168.2.2 wsu obe obu +192.168.2.10 mabx2 +192.168.2.12 pi pi1 +192.168.2.15 carpc +192.168.1.77 denso pod wsu-77 +192.168.2.98 winpc +192.168.2.99 linpc + +# The following lines are desirable for IPv6 capable hosts +::1 ip6-localhost ip6-loopback +fe00::0 ip6-localnet +ff00::0 ip6-mcastprefix +ff02::1 ip6-allnodes +ff02::2 ip6-allrouters diff --git a/CarPi/etc/ld.so.conf.d/cvehicle.conf b/CarPi/etc/ld.so.conf.d/cvehicle.conf new file mode 100644 index 0000000..5c28b76 --- /dev/null +++ b/CarPi/etc/ld.so.conf.d/cvehicle.conf @@ -0,0 +1,2 @@ +# NTCNA CVehicle library +/usr/local/cvehicle/lib diff --git a/CarPi/etc/ld.so.conf.d/pstar.conf b/CarPi/etc/ld.so.conf.d/pstar.conf new file mode 100644 index 0000000..eb49e99 --- /dev/null +++ b/CarPi/etc/ld.so.conf.d/pstar.conf @@ -0,0 +1,2 @@ +# other libs +/usr/local/pstar/lib diff --git a/CarPi/etc/rc.local b/CarPi/etc/rc.local new file mode 100644 index 0000000..3d228f1 --- /dev/null +++ b/CarPi/etc/rc.local @@ -0,0 +1,26 @@ +#!/bin/sh -e +# +# rc.local +# +# This script is executed at the end of each multiuser runlevel. +# Make sure that the script will "exit 0" on success or any other +# value on error. +# +# In order to enable or disable this script just change the execution +# bits. +# +# By default this script does nothing. + +# CAN +ip link set can0 type can bitrate 500000 listen-only on +ifconfig can0 up + +# CVehicle +/usr/local/cvehicle/sbin/cvehicle-setup +#cd /home/debian/NTCNA/CVehicle/trunk/daemons/bsmpd +#bsmpd -c can0 -m bsmpbeat.xml -t 50 -w - + +# PyVehicle (DVI) +#chmod +x /home/debian/NTCNA/PyVehicle/bin/*.sh + +exit 0 diff --git a/CarPi/etc/systemd/system/multi-user.target.wants/gpsd.service b/CarPi/etc/systemd/system/multi-user.target.wants/gpsd.service new file mode 100644 index 0000000..95f05a8 --- /dev/null +++ b/CarPi/etc/systemd/system/multi-user.target.wants/gpsd.service @@ -0,0 +1,15 @@ +[Unit] +Description=GPS (Global Positioning System) Daemon +Requires=gpsd.socket +# Needed with chrony SOCK refclock +After=chronyd.service + +[Service] +Type=forking +EnvironmentFile=-/etc/default/gpsd +ExecStart=/usr/sbin/gpsd $GPSD_OPTIONS $DEVICES + +[Install] +WantedBy=multi-user.target +Also=gpsd.socket + diff --git a/CarPi/etc/systemd/system/sockets.target.wants/gpsd.socket b/CarPi/etc/systemd/system/sockets.target.wants/gpsd.socket new file mode 100644 index 0000000..80181e9 --- /dev/null +++ b/CarPi/etc/systemd/system/sockets.target.wants/gpsd.socket @@ -0,0 +1,11 @@ +[Unit] +Description=GPS (Global Positioning System) Daemon Sockets + +[Socket] +ListenStream=/var/run/gpsd.sock +ListenStream=[::1]:2947 +ListenStream=0.0.0.0:2947 +SocketMode=0600 + +[Install] +WantedBy=sockets.target diff --git a/CarPi/home/pi/.config/lxsession/LXDE-pi/autostart b/CarPi/home/pi/.config/lxsession/LXDE-pi/autostart new file mode 100755 index 0000000..46bb81e --- /dev/null +++ b/CarPi/home/pi/.config/lxsession/LXDE-pi/autostart @@ -0,0 +1,4 @@ +@lxpanel --profile LXDE-pi +@pcmanfm --desktop --profile LXDE-pi +@xscreensaver -no-splash +@/home/pi/start_v2x.sh diff --git a/CarPi/home/pi/.config/lxsession/LXDE-pi/desktop.conf b/CarPi/home/pi/.config/lxsession/LXDE-pi/desktop.conf new file mode 100644 index 0000000..1243771 --- /dev/null +++ b/CarPi/home/pi/.config/lxsession/LXDE-pi/desktop.conf @@ -0,0 +1,54 @@ +[Session] +window_manager=openbox-lxde-pi +disable_autostart=no +polkit/command=lxpolkit +clipboard/command=lxclipboard +xsettings_manager/command=build-in +proxy_manager/command=build-in +keyring/command=ssh-agent +quit_manager/command=lxsession-logout +quit_manager/image=/usr/share/lxde/images/logout-banner.png +quit_manager/layout=top +lock_manager/command=lxlock +terminal_manager/command=lxterminal +launcher_manager/command=lxpanelctl + +[GTK] +sNet/ThemeName=PiXflat +sNet/IconThemeName=PiXflat +sGtk/FontName=PibotoLt 12 +iGtk/ToolbarStyle=3 +iGtk/ButtonImages=0 +iGtk/MenuImages=0 +iGtk/CursorThemeSize=24 +iXft/Antialias=1 +iGtk/AutoMnemonics=1 +iGtk/EnableMnemonics=1 +sGtk/ColorScheme=selected_bg_color:#878791919b9b\nselected_fg_color:#f0f0f0f0f0f0\nbar_bg_color:#ededececebeb\nbar_fg_color:#000000000000\n +sGtk/CursorThemeName=PiXflat +iGtk/ToolbarIconSize=3 +sGtk/IconSizes=gtk-large-toolbar=24,24 +iNet/EnableEventSounds=1 +iNet/EnableInputFeedbackSounds=1 +iXft/Hinting=1 +sXft/HintStyle=hintfull +sXft/RGBA=rgb + +[Mouse] +AccFactor=20 +AccThreshold=10 +LeftHanded=0 + +[Keyboard] +Delay=500 +Interval=30 +Beep=1 + +[State] +guess_default=true + +[Dbus] +lxde=true + +[Environment] +menu_prefix=lxde-pi- diff --git a/CarPi/home/pi/.config/lxsession/LXDE-pi/sshpwd.sh b/CarPi/home/pi/.config/lxsession/LXDE-pi/sshpwd.sh new file mode 100755 index 0000000..cb2b9c0 --- /dev/null +++ b/CarPi/home/pi/.config/lxsession/LXDE-pi/sshpwd.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +export TEXTDOMAIN=pprompt + +. gettext.sh + +if [ -e /run/sshwarn ] ; then + zenity --warning --width=400 --text="$(gettext "SSH is enabled and the default password for the 'pi' user has not been changed.\n\nThis is a security risk - please login as the 'pi' user and run Raspberry Pi Configuration to set a new password.")" +fi diff --git a/CarPi/home/pi/.vnc/passwd b/CarPi/home/pi/.vnc/passwd new file mode 100644 index 0000000..575db67 --- /dev/null +++ b/CarPi/home/pi/.vnc/passwd @@ -0,0 +1 @@ +³‚þoø¬Ñ© \ No newline at end of file diff --git a/CarPi/lib/systemd/system/rc-local.service b/CarPi/lib/systemd/system/rc-local.service new file mode 100644 index 0000000..4cd18d0 --- /dev/null +++ b/CarPi/lib/systemd/system/rc-local.service @@ -0,0 +1,21 @@ +# This file is part of systemd. +# +# systemd is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. + +[Unit] +Description=/etc/rc.local Compatibility +ConditionPathExists=/etc/rc.local + +[Service] +Type=forking +ExecStart=/etc/rc.local start +TimeoutSec=0 +StandardOutput=tty +RemainAfterExit=yes +SysVStartPriority=99 + +[Install] +WantedBy=multi-user.target diff --git a/CarPi/lib/systemd/system/x11vnc.service b/CarPi/lib/systemd/system/x11vnc.service new file mode 100644 index 0000000..201167f --- /dev/null +++ b/CarPi/lib/systemd/system/x11vnc.service @@ -0,0 +1,11 @@ +[Unit] +Description=Start x11vnc at startup. +After=multi-user.target + +[Service] +Type=simple +ExecStart=/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/vnc.passwd -rfbport 5900 -shared + +[Install] +WantedBy=multi-user.target + diff --git a/CarPi/rpi-setup.sh b/CarPi/rpi-setup.sh new file mode 100755 index 0000000..666889b --- /dev/null +++ b/CarPi/rpi-setup.sh @@ -0,0 +1,100 @@ +#!/bin/sh + +# copy config files +for i in etc lib usr +do + sudo cp -r $i/* /$i/ +done +cp -r home/pi/.* /home/pi/ + +# network +echo "Networking installed, use WiFi for Internet" + +# update & clean +sudo apt-get update +sudo apt-get dist-upgrade +sudo apt-get install -y ntpdate subversion git cmake +sudo apt-get -y autoremove +sudo apt-get clean + +# Need rc.local to start CAN and BSMPd +sudo systemctl enable rc-local.service +if [ ! -f /etc/init/x11vnc.conf ]; then + sudo systemctl enable x11vnc.service +fi + +# time +sudo ntpdate pool.ntp.org +sudo hwclock -w +sudo apt-get update + +# clone/pull +mkdir -p $HOME/ProbeStar +cd $HOME/ProbeStar +for i in git_tools linux_tools pi_tools Cnomicon Pynomicon +do + if [ -d $i ]; then + cd $i + git config credential.helper store + git pull --recurse-submodules + cd .. + else + git clone https://github.com/nprobert/$i --recurse-submodules + fi +done +cd $HOME +for i in ProbeStar/*; do + ln -fs $i +done +mkdir bin +cp linux_tools/bin/* bin/ + +# checkouts +mkdir -p $HOME/NTCNA +cd $HOME/NTCNA +for i in CVehicle PyVehicle +do + if [ -d $i ]; then + cd $i + git config credential.helper store + git pull --recurse-submodules + cd .. + else + git clone https://github.com/nprobert/$i --recurse-submodules + fi +done +cd $HOME +for i in NTCNA/*; do + ln -fs $i +done + +# packages & builds +if [ -d $HOME/ProbeStar/Cnomicon ]; then + cd $HOME/Cnomicon/packages + ./packages.sh + cd .. + ./cbuild.sh + ./cinstall.sh +fi + +if [ -d $HOME/NTCNA/CVehicle ]; then + cd $HOME/CVehicle/packages + ./packages.sh + cd .. + ./cbuild.sh + ./cinstall.sh +fi + +# python stuff +cd $HOME/NTCNA/Pynomicon/packages +./packages.sh +chmod +x $HOME/Pynomicon/bin/*.sh +cd $HOME/NTCNA/PyVehicle/packages +./packages.sh +chmod +x $HOME/PyVehicle/bin/*.sh + +# cleanup +sudo raspi-config + +git config --global user.email "nprobert@probestar.net" +git config --global user.name "Neal Probert" diff --git a/CarPi/rpi-update.sh b/CarPi/rpi-update.sh new file mode 100755 index 0000000..2dea805 --- /dev/null +++ b/CarPi/rpi-update.sh @@ -0,0 +1,16 @@ +#!/bin/sh + +# copy config files +sudo cp -r etc lib usr / + +# Need rc.local? +sudo systemctl enable rc-local.service + +# update +sudo ntpdate pool.ntp.org +sudo hwclock -w + +# checkouts +pstar-update.sh +ntcna-update.sh + diff --git a/CarPi/usr/local/bin/all-update.sh b/CarPi/usr/local/bin/all-update.sh new file mode 100755 index 0000000..1a9b686 --- /dev/null +++ b/CarPi/usr/local/bin/all-update.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +cd $HOME + +for i in ProbeStar NTCNA CAMP Gits +do + if [ -L "$i" ]; then + echo "$i: Symlinked" + echo "=============" + elif [ -d "$i" ]; then + if [ "$i" == "ProbeStar" ]; then + $HOME/bin/pstar-update.sh + else + d=`echo "${i,,}"` + $HOME/bin/$d-update.sh + fi + fi +done + diff --git a/CarPi/usr/local/bin/ntcna-update.sh b/CarPi/usr/local/bin/ntcna-update.sh new file mode 100755 index 0000000..56d8b36 --- /dev/null +++ b/CarPi/usr/local/bin/ntcna-update.sh @@ -0,0 +1,58 @@ +#!/bin/bash + +function do_git { + echo $1 "(Git)" + cd $1 + git ls-remote --get-url + git pull + cd .. + echo +} + +function do_merc { + echo $1 "(Mercurial)" + cd $1 + hg pull -uv + cd .. + echo +} + +function do_svn { + echo $1 "(Subversion)" + cd $1 + svn info --show-item url + svn update + cd .. + echo +} + +function do_dir { + pwd + echo $1 + echo "-----------------" + for i in * + do + if [ -d $i ]; then + if [ -d $i/.git ]; then + do_git $i + elif [ -d $i/.hg ]; then + do_merc $i + elif [ -d $i/.svn ]; then + do_svn $i + else + cd $i + do_dir $i + cd .. + fi + fi + done +} + +if [ -d $HOME/NTCNA ]; then + cd $HOME/NTCNA + echo "NTCNA Repositories" + echo "==================" + do_dir . + echo "==================" +fi + diff --git a/CarPi/usr/local/bin/pstar-update.sh b/CarPi/usr/local/bin/pstar-update.sh new file mode 100755 index 0000000..03e9029 --- /dev/null +++ b/CarPi/usr/local/bin/pstar-update.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +function do_git { + echo $1 "(Git)" + cd $1 + git ls-remote --get-url + git pull + cd .. + echo +} + +function do_merc { + echo $1 "(Mercurial)" + cd $1 + hg pull -u + cd .. + echo +} + +function do_svn { + echo $1 "(Subversion)" + cd $1 + svn info --show-item url + svn update + cd .. + echo +} + +function do_dir { + pwd + echo $1 + echo "-----------------" + for i in * + do + if [ -d $i ]; then + if [ -d $i/.git ]; then + do_git $i + elif [ -d $i/.hg ]; then + do_merc $i + elif [ -d $i/.svn ]; then + do_svn $i + else + cd $i + do_dir $i + cd .. + fi + fi + done +} + +if [ -d $HOME/ProbeStar ]; then + cd $HOME/ProbeStar + echo "P* Repositories:" + echo "================" + do_dir . + echo "================" +fi diff --git a/CarPi/usr/local/sbin/start_vnc.sh b/CarPi/usr/local/sbin/start_vnc.sh new file mode 100644 index 0000000..e6c5b35 --- /dev/null +++ b/CarPi/usr/local/sbin/start_vnc.sh @@ -0,0 +1,3 @@ +#!/bin/bash +x11vnc -bg -o %HOME/.x11vnc.log.%VNCDISPLAY -rfbauth /etc/x11vnc.pass -auth /etc/x11vnc.pass -forever + diff --git a/Imager/imager_1.4_amd64.deb b/Imager/imager_1.4_amd64.deb deleted file mode 100644 index 1273ce7..0000000 Binary files a/Imager/imager_1.4_amd64.deb and /dev/null differ diff --git a/Imager/imager_1.4.exe b/Imager/imager_1.6.2.exe similarity index 67% rename from Imager/imager_1.4.exe rename to Imager/imager_1.6.2.exe index a41a943..61719bc 100644 Binary files a/Imager/imager_1.4.exe and b/Imager/imager_1.6.2.exe differ diff --git a/Imager/imager_1.6.2_amd64.deb b/Imager/imager_1.6.2_amd64.deb new file mode 100644 index 0000000..5ddcad4 Binary files /dev/null and b/Imager/imager_1.6.2_amd64.deb differ diff --git a/Radio/Pi-Star/3.4/KD8NVN - Digital Voice Dashboard - Configuration.pdf b/Radio/Pi-Star/3.4/KD8NVN - Digital Voice Dashboard - Configuration.pdf deleted file mode 100644 index 3f64775..0000000 Binary files a/Radio/Pi-Star/3.4/KD8NVN - Digital Voice Dashboard - Configuration.pdf and /dev/null differ diff --git a/Radio/Pi-Star/3.4/Pi-Star_Config_25-Nov-2020.zip b/Radio/Pi-Star/3.4/Pi-Star_Config_25-Nov-2020.zip deleted file mode 100644 index c71d304..0000000 Binary files a/Radio/Pi-Star/3.4/Pi-Star_Config_25-Nov-2020.zip and /dev/null differ diff --git a/Radio/Pi-Star/3.4/Pi-Star_Config_nano-spot_29-Feb-2020.zip b/Radio/Pi-Star/3.4/Pi-Star_Config_nano-spot_29-Feb-2020.zip deleted file mode 100644 index 9c34e1c..0000000 Binary files a/Radio/Pi-Star/3.4/Pi-Star_Config_nano-spot_29-Feb-2020.zip and /dev/null differ diff --git a/Radio/Pi-Star/4.1/KD8NVN - Digital Voice Dashboard - Configuration.pdf b/Radio/Pi-Star/4.1/KD8NVN - Digital Voice Dashboard - Configuration.pdf deleted file mode 100644 index 0304cb2..0000000 Binary files a/Radio/Pi-Star/4.1/KD8NVN - Digital Voice Dashboard - Configuration.pdf and /dev/null differ diff --git a/Radio/Pi-Star/4.1/Pi-Star_Config_30-Nov-2020.zip b/Radio/Pi-Star/4.1/Pi-Star_Config_30-Nov-2020.zip deleted file mode 100644 index e861689..0000000 Binary files a/Radio/Pi-Star/4.1/Pi-Star_Config_30-Nov-2020.zip and /dev/null differ diff --git a/config/lxsession/LXDE-pi/autostart b/config/lxsession/LXDE-pi/autostart index cc77be0..8cf2ffb 100644 --- a/config/lxsession/LXDE-pi/autostart +++ b/config/lxsession/LXDE-pi/autostart @@ -1,5 +1,4 @@ @lxpanel --profile LXDE-pi @pcmanfm --desktop --profile LXDE-pi @xscreensaver -no-splash -@point-rpi -@/home/pi/start_v2x.sh +@/home/pi/start_rpi.sh diff --git a/packages/VNC-Viewer-6.20.529-Linux-ARM.deb b/packages/VNC-Viewer-6.20.529-Linux-ARM.deb deleted file mode 100644 index 4266d7a..0000000 Binary files a/packages/VNC-Viewer-6.20.529-Linux-ARM.deb and /dev/null differ