RPI 3B (to start with)
Install the latest version of Raspbian and configure to work headless.
Afterwords, update:
sudo apt update
Airtunes
This tutorial involves configuring the the open-source AirPlay receiver called Shairport Sync. Most of the contents found in in this section were directly lifted from here.
This software allows the Raspberry Pi to act as an AirPlay receiver by implementing Apple’s proprietary protocols so that it can stream music, from the output audio jack to the auxiliary input of the FJ’s amplifier.
This setup will allow you to play music from any AirPlay-enabled device to your Raspberry Pi meaning you can use any iPhone and some Android products with a compatible app installed.
First. we need to install several different packages, run the following commands on your Raspberry Pi to install all of the packages that we need.
sudo apt install autoconf libtool libdaemon-dev libasound2-dev libpopt-dev libconfig-dev sudo apt install avahi-daemon libavahi-client-dev sudo apt install libssl-dev
We will now clone the shairport-sync source to OpenFJ.
cd ~ git clone https://github.com/mikebrady/shairport-sync.git
We can now build and install the Shairport software.
cd shairport-sync autoreconf -i -f ./configure --with-alsa --with-avahi --with-ssl=openssl --with-systemd --with-metadata
The autoreconf command setups the basic config file. The configure command further sets up the build system, telling it to utilize the ALSA audio backend, the Avahi network and set it to use OpenSSL for encryption.
With the configuration process now completed we can compile Shairport-sync and install it.
make sudo make install
To enable the Shairport Sync software to start automatically at system startup:
sudo systemctl enable shairport-sync
sudo service shairport-sync start
On an AirPlay-enabled device Openfj should appear in the devices list.
There are several different things we can do to improve the sound quality. The first of these is to change update the RPI firmware to a newer version of the audio driver.
sudo rpi-update *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom *** Performing self-update *** Relaunching after update *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom FW_REV:8e2a862c9c7a0cc5cd505c8f89761d723af8768c *** We're running for the first time *** Backing up files (this will take a few minutes) *** Backing up firmware *** Backing up modules 6.1.0-rpi4-rpi-v8 WANT_32BIT:0 WANT_64BIT:1 WANT_PI4:1 WANT_PI5:1 ############################################################# WARNING: This update bumps to rpi-6.1.y linux tree See: https://forums.raspberrypi.com/viewtopic.php?t=344246 'rpi-update' should only be used if there is a specific reason to do so - for example, a request by a Raspberry Pi engineer or if you want to help the testing effort and are comfortable with restoring if there are regressions. DO NOT use 'rpi-update' as part of a regular update process. ############################################################## Would you like to proceed? (y/N) *** Downloading specific firmware revision (this will take a few minutes) % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 26 144M 26 37.5M 0 0 5043k 0 0:00:29 0:00:07 0:00:22 6101k 100 144M 100 144M 0 0 5514k 0 0:00:26 0:00:26 --:--:-- 4939k *** Updating firmware *** Updating kernel modules *** depmod 6.1.63-v8-16k+ *** depmod 6.1.63-v8+ *** Updating VideoCore libraries *** Using SoftFP libraries *** Updating SDK *** Running ldconfig *** Storing current firmware revision *** Deleting downloaded files *** Syncing changes to disk *** If no errors appeared, your firmware was successfully updated to 8e2a862c9c7a0cc5cd505c8f89761d723af8768c *** A reboot is needed to activate the new firmware
Once the firmware update has completed, turn off the RPI and remove the SD Card, and mount into a reader connected to a computerto modify the RPI /boot/config.txt on the SD Card, with the following new line to this file.
audio_pwm_mode=2
Insure the analog jack is the main audio out and not the HDMI output.
We can utilize the following command in the Raspberry Pi’s terminal to do this.
amixer cset numid=3 1
Now modify the volume db Range that Shairport uses by changing the configuration file:
sudo vi /usr/local/etc/shairport-sync.conf
Find
// volume_range_db = 60 ;Copy
Replace with
volume_range_db = 30;
Finally, reboot OpenFJ:
sudo reboot
GPS NMEA
Plug in the Garmin 296 GPS with a USB cable.
Does the RPI see the UPS?
mtb@openfj:~ $ lsusb Bus 001 Device 004: ID 091e:0003 Garmin International GPS (various models) Bus 001 Device 005: ID 0424:7800 Microchip Technology, Inc. (formerly SMSC) Bus 001 Device 003: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub Bus 001 Device 002: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Install gpsd
sudo apt-get install gpsd gpsd-clients
Deactivate gpsd
sudo systemctl stop gpsd.socket sudo systemctl disable gpsd.socket
Start gpsd manually
sudo gpsd /dev/ttyUSB0 -F /var/run/gpsd.sock
Test (this may take several minutes to update, depending on GPS signal)
cgps -s ┌─ssssssssssssssssssssssssssssssssssssssssss┐┌─aaaaaaaaaaaaaaaaaSeen 0/Used 0┐ │ Time: 2023-11-22T16:36:14.000Z (18)││GNSS PRN Elev Azim SNR Use│ │ Latitude: 41.40120225 N ││ │ │ Longitude: 2.15600508 E ││ │ │ Alt (HAE, MSL): n/a, n/a ││ │ │ Speed: 0.07 km/h ││ │ │ Track (true, var): 184.0, 1.0 deg ││ │ │ Climb: n/a ││ │ │ Status: 2D FIX (5 secs) ││ │ │ Long Err (XDOP, EPX): n/a , n/a ││ │ │ Lat Err (YDOP, EPY): n/a , n/a ││ │ │ Alt Err (VDOP, EPV): n/a , +/- 75.5 m ││ │ │ 2D Err (HDOP, CEP): n/a , +/- 53.2 m ││ │ │ 3D Err (PDOP, SEP): n/a , +/- 92.4 m ││ │ │ Time Err (TDOP): n/a ││ │ │ Geo Err (GDOP): n/a ││ │ │ ECEF X, VX: n/a n/a ││ │ │ ECEF Y, VY: n/a n/a ││ │ │ ECEF Z, VZ: n/a n/a ││ │ │ Speed Err (EPS): n/a ││ │ │ Track Err (EPD): n/a ││ │ │ Time offset: 0.025000578 s ││ │ │ Grid Square: JN11bj86 ││ │ └─aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa┘└─eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee┘
Edit the gpsd configuration file:
mtb@openfj:~ $ cat /etc/default/gpsd # Devices gpsd should collect to at boot time. # They need to be read/writeable, either by user gpsd or the group dialout. DEVICES="" # Other options you want to pass to gpsd START_DAEMON="true" GPSD_OPTIONS="/dev/ttyUSB0" # Automatically hot add/remove USB GPS devices via gpsdctl USBAUTO="true" GPSD_SOCKET="/var/run/gpsd.sock"
Enable the gpsd service
sudo systemctl enable gpsd.socket sudo systemctl start gpsd.socket
location
gpspipe -r
gpsbabel
foxtrotgps
gpsmon
time
sudo apg-get install ntp
sudo vi /etc/ntpsec/ntp.conf
ntpq -p
LTE modem
https://imi-link.com/portfolio/im920d-4g-wifi-dongle/
OpenFJ static network configuration
sudo nmcli con mod "Wired connection 2" ipv4.gateway 192.168.100.1 sudo nmcli con mod "Wired connection 2" ipv4.dns "192.168.100.1" sudo nmcli con mod "Wired connection 2" ipv4.dns "8.8.8.8" sudo nmcli c down "Wired connection 2" && sudo nmcli c up "Wired connection 2" nmcli -p connection show "Wired connection 2" =============================================================================== Connection profile details (Wired connection 2) =============================================================================== connection.id: Wired connection 2 connection.uuid: 6a579dd4-a352-3105-98b6-f6a819a3f200 connection.stable-id: -- connection.type: 802-3-ethernet connection.interface-name: usb0 connection.autoconnect: yes connection.autoconnect-priority: -999 connection.autoconnect-retries: -1 (default) connection.multi-connect: 0 (default) connection.auth-retries: -1 connection.timestamp: 1700673206 connection.read-only: no connection.permissions: -- connection.zone: -- connection.master: -- connection.slave-type: -- connection.autoconnect-slaves: -1 (default) connection.secondaries: -- connection.gateway-ping-timeout: 0 connection.metered: unknown connection.lldp: default connection.mdns: -1 (default) connection.llmnr: -1 (default) connection.dns-over-tls: -1 (default) connection.mptcp-flags: 0x0 (default) connection.wait-device-timeout: -1 connection.wait-activation-delay: -1 ------------------------------------------------------------------------------- 802-3-ethernet.port: -- 802-3-ethernet.speed: 0 802-3-ethernet.duplex: -- 802-3-ethernet.auto-negotiate: no 802-3-ethernet.mac-address: -- 802-3-ethernet.cloned-mac-address: -- 802-3-ethernet.generate-mac-address-mask:-- 802-3-ethernet.mac-address-blacklist: -- 802-3-ethernet.mtu: auto 802-3-ethernet.s390-subchannels: -- 802-3-ethernet.s390-nettype: -- 802-3-ethernet.s390-options: -- 802-3-ethernet.wake-on-lan: default 802-3-ethernet.wake-on-lan-password: -- 802-3-ethernet.accept-all-mac-addresses:-1 (default) ------------------------------------------------------------------------------- ipv4.method: manual ipv4.dns: 8.8.8.8 ipv4.dns-search: -- ipv4.dns-options: -- ipv4.dns-priority: 0 ipv4.addresses: 192.168.100.69/24 ipv4.gateway: 192.168.100.1 ipv4.routes: -- ipv4.route-metric: -1 ipv4.route-table: 0 (unspec) ipv4.routing-rules: -- ipv4.replace-local-rule: -1 (default) ipv4.ignore-auto-routes: no ipv4.ignore-auto-dns: no ipv4.dhcp-client-id: -- ipv4.dhcp-iaid: -- ipv4.dhcp-timeout: 0 (default) ipv4.dhcp-send-hostname: yes ipv4.dhcp-hostname: -- ipv4.dhcp-fqdn: -- ipv4.dhcp-hostname-flags: 0x0 (none) ipv4.never-default: no ipv4.may-fail: yes ipv4.required-timeout: -1 (default) ipv4.dad-timeout: -1 (default) ipv4.dhcp-vendor-class-identifier: -- ipv4.link-local: 0 (default) ipv4.dhcp-reject-servers: -- ipv4.auto-route-ext-gw: -1 (default) ------------------------------------------------------------------------------- ipv6.method: auto ipv6.dns: -- ipv6.dns-search: -- ipv6.dns-options: -- ipv6.dns-priority: 0 ipv6.addresses: -- ipv6.gateway: -- ipv6.routes: -- ipv6.route-metric: -1 ipv6.route-table: 0 (unspec) ipv6.routing-rules: -- ipv6.replace-local-rule: -1 (default) ipv6.ignore-auto-routes: no ipv6.ignore-auto-dns: no ipv6.never-default: no ipv6.may-fail: yes ipv6.required-timeout: -1 (default) ipv6.ip6-privacy: -1 (unknown) ipv6.addr-gen-mode: default ipv6.ra-timeout: 0 (default) ipv6.mtu: auto ipv6.dhcp-duid: -- ipv6.dhcp-iaid: -- ipv6.dhcp-timeout: 0 (default) ipv6.dhcp-send-hostname: yes ipv6.dhcp-hostname: -- ipv6.dhcp-hostname-flags: 0x0 (none) ipv6.auto-route-ext-gw: -1 (default) ipv6.token: -- ------------------------------------------------------------------------------- proxy.method: none proxy.browser-only: no proxy.pac-url: -- proxy.pac-script: -- ------------------------------------------------------------------------------- =============================================================================== Active connection details (6a579dd4-a352-3105-98b6-f6a819a3f200) =============================================================================== GENERAL.NAME: Wired connection 2 GENERAL.UUID: 6a579dd4-a352-3105-98b6-f6a819a3f200 GENERAL.DEVICES: usb0 GENERAL.IP-IFACE: usb0 GENERAL.STATE: activated GENERAL.DEFAULT: yes GENERAL.DEFAULT6: no GENERAL.SPEC-OBJECT: -- GENERAL.VPN: no GENERAL.DBUS-PATH: /org/freedesktop/NetworkManager/ActiveConnection/6 GENERAL.CON-PATH: /org/freedesktop/NetworkManager/Settings/6 GENERAL.ZONE: -- GENERAL.MASTER-PATH: -- ------------------------------------------------------------------------------- IP4.ADDRESS[1]: 192.168.100.69/24 IP4.GATEWAY: 192.168.100.1 IP4.ROUTE[1]: dst = 192.168.100.0/24, nh = 0.0.0.0, mt = 100 IP4.ROUTE[2]: dst = 0.0.0.0/0, nh = 192.168.100.1, mt = 100 IP4.DNS[1]: 8.8.8.8 ------------------------------------------------------------------------------- IP6.ADDRESS[1]: fe80::9b9e:763e:c952:b6b4/64 IP6.GATEWAY: -- IP6.ROUTE[1]: dst = fe80::/64, nh = ::, mt = 1024 -------------------------------------------------------------------------------
FindMyCar
OBD-II - over bluetooth
Camera Module
ALPR
People counter
360?
Environmental sensors
SDL
pwnagotchi
WIGLE
TPMS
915Mhz sensor