Tweaks for CarPi setup/install
This commit is contained in:
4
CarPi/etc/can.conf
Normal file
4
CarPi/etc/can.conf
Normal file
@ -0,0 +1,4 @@
|
||||
[default]
|
||||
interface = socketcan_native
|
||||
channel = can0
|
||||
|
||||
59
CarPi/etc/dhcpcd.conf
Normal file
59
CarPi/etc/dhcpcd.conf
Normal file
@ -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
|
||||
19
CarPi/etc/hosts
Normal file
19
CarPi/etc/hosts
Normal file
@ -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
|
||||
2
CarPi/etc/ld.so.conf.d/cvehicle.conf
Normal file
2
CarPi/etc/ld.so.conf.d/cvehicle.conf
Normal file
@ -0,0 +1,2 @@
|
||||
# NTCNA CVehicle library
|
||||
/usr/local/cvehicle/lib
|
||||
2
CarPi/etc/ld.so.conf.d/pstar.conf
Normal file
2
CarPi/etc/ld.so.conf.d/pstar.conf
Normal file
@ -0,0 +1,2 @@
|
||||
# other libs
|
||||
/usr/local/pstar/lib
|
||||
26
CarPi/etc/rc.local
Normal file
26
CarPi/etc/rc.local
Normal file
@ -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
|
||||
@ -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
|
||||
|
||||
11
CarPi/etc/systemd/system/sockets.target.wants/gpsd.socket
Normal file
11
CarPi/etc/systemd/system/sockets.target.wants/gpsd.socket
Normal file
@ -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
|
||||
Reference in New Issue
Block a user