Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

This document contains the steps for building OpenFJ.

OpenFJ is a collection of hardware and software combined into an appliance to do the following:

  • RaspAP - Routing and VPN access: one wifi SSID that routes traffic to a local wifi (hotel, marina, etc.) and activates a VPN.

  • LTE Modem - Add a local 4G SIM card for internet access

  • Airtunes - enable music streaming over airtunes to an amplifier

  • GPS NMEA - capture GPS data with gpsd

  • NTP - synchronize time over GPS

  • kismet: wardriving data collection with a secondary wifi antenna

  • Camera capture

    • ALPR

    • People counter

    • Dashcam

  • OBD-II interface: capturing FJ telemetry

  • Accelerometer: capturing acceleration in three axis

  • Thermometer: measuring internal temperature and humidity

  • 360° camera capture and IPFS integration

  • Remote storage and backup support

    • USB drive

    • Flipper Zero

  • LoRA / SDR receiver

Hardware

The base hardware configuration:

Device

Description

Approximate cost

Raspberry Pi 3B

Probably better to buy a newer device with more RAM.

$45 (RPI 3B+, 1GB)
$135 (RPI 5, 8GB)

64GB SD storage card

SanDisk 64GB

$12

NoIR / Wide camera

Raspberry Pi, V3

$35

7” touchscreen

Raspberry Pi, official 7” screen

$97

Garmin 296 GPS

My aeronautical / marine GPS

$25 GPS modules available
$250 used Garmin 296

LTE modem

Generic USB / LTE modem

$18

USB Wifi module

Realtek RTL8812 support

$19

USB extenders

Right angle USB extenders

$8

SmartPi case

Small RPI dashboard case

$33

USB storage

1TB storage device

$20

Flipper Zero

shop.flipperzero.one

$169

Thermometer

DHT22 AM2302 or similar

$7

Accelerometer

ADXL345 IIC/SPI

$4

Total

~ $500

Raspbian install

Install the latest version of 64-bit Raspbian and configure to work headless.

There are many ways to install raspbian, but the easiest is by using the Raspberry Pi imager:

Screenshot 2023-12-25 at 11.51.54.png

Customize settings to access headless.

Screenshot 2023-12-25 at 11.56.21.png

To install bookworm on the Raspberry Pi 3b, select “No filter” for the device.

Install the SD card in the Raspberry Pi, find the IP address, and connect via ssh.

mtb@MTBMBP ~ % arp -a
? (10.0.0.113) at b8:27:eb:b9:17:75 on en0 ifscope [ethernet]

mtb@MTBMBP ~ % ssh 10.0.0.113
The authenticity of host '10.0.0.113 (10.0.0.113)' can't be established.
ED25519 key fingerprint is SHA256:FFpeD1jIncN86IlDPaHfwOGKC1NuubTyEgwpq4nDTc.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Failed to add the host to the list of known hosts (/Users/mtb/.ssh/known_hosts).
Linux openfj 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr  3 17:24:16 BST 2023 aarch64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Dec  5 00:10:33 2023

Afterwords, update:

sudo apt-get update
sudo apt-get full-upgrade
sudo reboot

Routing

Install RaspAP to enable routing across wifi networks. Passengers will connect to OpenFJ, but RaspAP can be configured to route through any local wifi access point or LTE modem.

mtb@OpenFJ:~ $ curl -sL https://install.raspap.com | bash


 888888ba                              .d888888   888888ba
 88     8b                            d8     88   88     8b
a88aaaa8P' .d8888b. .d8888b. 88d888b. 88aaaaa88a a88aaaa8P
 88    8b. 88    88 Y8ooooo. 88    88 88     88   88
 88     88 88.  .88       88 88.  .88 88     88   88
 dP     dP  88888P8  88888P  88Y888P  88     88   dP
                             88
                             dP      version 3.0.4

The Quick Installer will guide you through a few easy steps


RaspAP Install: Configure installation
Detected OS: Debian GNU/Linux 12 (bookworm) 64-bit
Using GitHub repository: RaspAP/raspap-webgui 3.0.4 branch
Configuration directory: /etc/raspap
lighttpd root: /var/www/html? [Y/n]: Y
Installing lighttpd directory: /var/www/html
Complete installation with these values? [Y/n]: Y
RaspAP Install: Updating sources
Hit:1 http://deb.debian.org/debian bookworm InRelease
Hit:2 http://deb.debian.org/debian-security bookworm-security InRelease
Hit:3 http://deb.debian.org/debian bookworm-updates InRelease
Hit:4 http://archive.raspberrypi.com/debian bookworm InRelease
Reading package lists...
RaspAP Install: Checking for systemd network services
systemd-networkd.service is not running (ok)
systemd-resolved.service is not running (ok)
[ ✓ ok ] 
RaspAP Install: Installing required packages
php8.2-cgi will be installed from the main deb sources list
dhcpcd5 and iw will be installed from the main deb sources list
Reading package lists...
Building dependency tree...
Reading state information...
git is already the newest version (1:2.39.2-1.1).
iw is already the newest version (5.19-1).
iw set to manually installed.
The following packages were automatically installed and are no longer required:
  agnostics bluez dos2unix fio fonts-piboto grim gtk2-engines-pixbuf
  gtk2-engines-pixflat gui-pkinst ibverbs-providers libaio1 libaml0
  libatkmm-1.6-1v5 libboost-iostreams1.74.0 libcairomm-1.0-1v5 libcupsimage2
  libdaxctl1 libdbusmenu-glib4 libdbusmenu-gtk3-4 libgfapi0 libgfrpc0
  libgfxdr0 libglibmm-2.4-1v5 libglusterfs0 libgtkmm-3.0-1v5 libibverbs1
  libliftoff-rpi libnbd0 libndctl6 libneatvnc0 libnma-common libnma0
  libpangomm-1.4-1v5 libpmem1 libpmemblk1 librados2 librbd1 librdmacm1
  libseat1 libsigc++-2.0-0v5 libwf-config1 libwf-utils0 libwlroots11
  libxcb-res0 lp-connection-editor lxplug-bluetooth lxplug-cputemp
  lxplug-ejecter lxplug-magnifier lxplug-menu lxplug-netman lxplug-network
  lxplug-ptbatt lxplug-updater lxplug-volumepulse mate-polkit-bin pi-greeter
  pi-language-support pi-printer-support pipanel pishutdown pixflat-icons
  pixflat-theme printer-driver-escpr pulseaudio-module-bluetooth
  qt5-gtk2-platformtheme qt5-style-plugin-cleanlooks qt5-style-plugin-motif
  qt5-style-plugin-plastique qt5-style-plugins qt5ct rp-bookshelf
  rpd-wallpaper wayfire wayvnc wf-panel-pi xsettingsd xwayland
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  dhcpcd dhcpcd-base iptables libip6tc2 libjq1 libonig5 lighttpd-mod-deflate
  lighttpd-mod-openssl netfilter-persistent php-common php8.2-cli
  php8.2-common php8.2-opcache php8.2-readline spawn-fcgi
Suggested packages:
  dhcpcd-gtk resolvconf | openresolv | systemd-resolved resolvconf firewalld
  php-fpm apache2-utils lighttpd-doc lighttpd-mod-webdav lighttpd-modules-dbi
  lighttpd-modules-lua php-pear vnstati
The following packages will be REMOVED:
  pi-bluetooth piwiz raspberrypi-sys-mods raspberrypi-ui-mods rpd-plym-splash
  userconf-pi
The following NEW packages will be installed:
  dhcpcd dhcpcd-base dhcpcd5 dnsmasq hostapd iptables iptables-persistent
  isoquery jq libip6tc2 libjq1 libonig5 lighttpd lighttpd-mod-deflate
  lighttpd-mod-openssl netfilter-persistent php-common php8.2-cgi php8.2-cli
  php8.2-common php8.2-opcache php8.2-readline qrencode spawn-fcgi vnstat
0 upgraded, 25 newly installed, 6 to remove and 0 not upgraded.
Need to get 6,595 kB of archives.
After this operation, 41.5 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main arm64 hostapd arm64 2:2.10-12 [797 kB]
Get:2 http://deb.debian.org/debian bookworm/main arm64 libip6tc2 arm64 1.8.9-2 [18.7 kB]
Get:3 http://deb.debian.org/debian bookworm/main arm64 iptables arm64 1.8.9-2 [352 kB]
Get:4 http://deb.debian.org/debian bookworm/main arm64 netfilter-persistent all 1.0.20 [7,384 B]
Get:5 http://deb.debian.org/debian bookworm/main arm64 iptables-persistent all 1.0.20 [9,000 B]
Get:6 http://deb.debian.org/debian bookworm/main arm64 lighttpd arm64 1.4.69-1 [328 kB]
Get:7 http://deb.debian.org/debian bookworm/main arm64 vnstat arm64 2.10-2 [104 kB]
Get:8 http://deb.debian.org/debian bookworm/main arm64 dhcpcd-base arm64 9.4.1-24~deb12u3 [185 kB]
Get:9 http://deb.debian.org/debian bookworm/main arm64 dhcpcd all 1:9.4.1-24~deb12u3 [11.1 kB]
Get:10 http://deb.debian.org/debian bookworm/main arm64 dhcpcd5 all 9.4.1-24~deb12u3 [8,568 B]
Get:11 http://deb.debian.org/debian bookworm/main arm64 dnsmasq all 2.89-1 [32.4 kB]
Get:12 http://deb.debian.org/debian bookworm/main arm64 isoquery arm64 3.3.3-1 [50.9 kB]
Get:13 http://deb.debian.org/debian bookworm/main arm64 libonig5 arm64 6.9.8-1 [179 kB]
Get:14 http://deb.debian.org/debian bookworm/main arm64 libjq1 arm64 1.6-2.1 [121 kB]
Get:15 http://deb.debian.org/debian bookworm/main arm64 jq arm64 1.6-2.1 [64.5 kB]
Get:16 http://deb.debian.org/debian bookworm/main arm64 lighttpd-mod-deflate arm64 1.4.69-1 [11.4 kB]
Get:17 http://deb.debian.org/debian bookworm/main arm64 lighttpd-mod-openssl arm64 1.4.69-1 [17.2 kB]
Get:18 http://deb.debian.org/debian bookworm/main arm64 php-common all 2:93 [13.1 kB]
Get:19 http://deb.debian.org/debian bookworm/main arm64 php8.2-common arm64 8.2.7-1~deb12u1 [642 kB]
Get:20 http://deb.debian.org/debian bookworm/main arm64 php8.2-opcache arm64 8.2.7-1~deb12u1 [492 kB]
Get:21 http://deb.debian.org/debian bookworm/main arm64 php8.2-readline arm64 8.2.7-1~deb12u1 [11.9 kB]
Get:22 http://deb.debian.org/debian bookworm/main arm64 php8.2-cli arm64 8.2.7-1~deb12u1 [1,562 kB]
Get:23 http://deb.debian.org/debian bookworm/main arm64 php8.2-cgi arm64 8.2.7-1~deb12u1 [1,521 kB]
Get:24 http://deb.debian.org/debian bookworm/main arm64 qrencode arm64 4.1.1-1 [41.9 kB]
Get:25 http://deb.debian.org/debian bookworm/main arm64 spawn-fcgi arm64 1.6.4-2 [14.1 kB]
Preconfiguring packages ...
Fetched 6,595 kB in 2s (3,725 kB/s)
(Reading database ... 125272 files and directories currently installed.)
Removing pi-bluetooth (0.1.19) ...
Removing piwiz (0.66) ...
Removing rpd-plym-splash (0.37) ...
Removing userconf-pi (0.9) ...
Removing raspberrypi-ui-mods (1.20231206) ...
update-alternatives: using /usr/bin/startlxde to provide /usr/bin/x-session-manager (x-session-manager) in auto mode
Removing raspberrypi-sys-mods (20231208) ...
Removing 'diversion of /usr/lib/python3.11/EXTERNALLY-MANAGED to /usr/lib/python3.11/EXTERNALLY-MANAGED.orig by raspberrypi-sys-mods'
Selecting previously unselected package hostapd.
(Reading database ... 125144 files and directories currently installed.)
Preparing to unpack .../hostapd_2%3a2.10-12_arm64.deb ...
Unpacking hostapd (2:2.10-12) ...
Selecting previously unselected package libip6tc2:arm64.
Preparing to unpack .../libip6tc2_1.8.9-2_arm64.deb ...
Unpacking libip6tc2:arm64 (1.8.9-2) ...
Selecting previously unselected package iptables.
Preparing to unpack .../iptables_1.8.9-2_arm64.deb ...
Unpacking iptables (1.8.9-2) ...
Selecting previously unselected package netfilter-persistent.
Preparing to unpack .../netfilter-persistent_1.0.20_all.deb ...
Unpacking netfilter-persistent (1.0.20) ...
Setting up libip6tc2:arm64 (1.8.9-2) ...
Setting up iptables (1.8.9-2) ...
update-alternatives: using /usr/sbin/iptables-legacy to provide /usr/sbin/iptables (iptables) in auto mode
update-alternatives: using /usr/sbin/ip6tables-legacy to provide /usr/sbin/ip6tables (ip6tables) in auto mode
update-alternatives: using /usr/sbin/iptables-nft to provide /usr/sbin/iptables (iptables) in auto mode
update-alternatives: using /usr/sbin/ip6tables-nft to provide /usr/sbin/ip6tables (ip6tables) in auto mode
update-alternatives: using /usr/sbin/arptables-nft to provide /usr/sbin/arptables (arptables) in auto mode
update-alternatives: using /usr/sbin/ebtables-nft to provide /usr/sbin/ebtables (ebtables) in auto mode
Selecting previously unselected package iptables-persistent.
(Reading database ... 125393 files and directories currently installed.)
Preparing to unpack .../00-iptables-persistent_1.0.20_all.deb ...
Unpacking iptables-persistent (1.0.20) ...
Selecting previously unselected package lighttpd.
Preparing to unpack .../01-lighttpd_1.4.69-1_arm64.deb ...
Unpacking lighttpd (1.4.69-1) ...
Selecting previously unselected package vnstat.
Preparing to unpack .../02-vnstat_2.10-2_arm64.deb ...
Unpacking vnstat (2.10-2) ...
Selecting previously unselected package dhcpcd-base.
Preparing to unpack .../03-dhcpcd-base_9.4.1-24~deb12u3_arm64.deb ...
Unpacking dhcpcd-base (9.4.1-24~deb12u3) ...
Selecting previously unselected package dhcpcd.
Preparing to unpack .../04-dhcpcd_1%3a9.4.1-24~deb12u3_all.deb ...
Unpacking dhcpcd (1:9.4.1-24~deb12u3) ...
Selecting previously unselected package dhcpcd5.
Preparing to unpack .../05-dhcpcd5_9.4.1-24~deb12u3_all.deb ...
Unpacking dhcpcd5 (9.4.1-24~deb12u3) ...
Selecting previously unselected package dnsmasq.
Preparing to unpack .../06-dnsmasq_2.89-1_all.deb ...
Unpacking dnsmasq (2.89-1) ...
Selecting previously unselected package isoquery.
Preparing to unpack .../07-isoquery_3.3.3-1_arm64.deb ...
Unpacking isoquery (3.3.3-1) ...
Selecting previously unselected package libonig5:arm64.
Preparing to unpack .../08-libonig5_6.9.8-1_arm64.deb ...
Unpacking libonig5:arm64 (6.9.8-1) ...
Selecting previously unselected package libjq1:arm64.
Preparing to unpack .../09-libjq1_1.6-2.1_arm64.deb ...
Unpacking libjq1:arm64 (1.6-2.1) ...
Selecting previously unselected package jq.
Preparing to unpack .../10-jq_1.6-2.1_arm64.deb ...
Unpacking jq (1.6-2.1) ...
Selecting previously unselected package lighttpd-mod-deflate.
Preparing to unpack .../11-lighttpd-mod-deflate_1.4.69-1_arm64.deb ...
Unpacking lighttpd-mod-deflate (1.4.69-1) ...
Selecting previously unselected package lighttpd-mod-openssl.
Preparing to unpack .../12-lighttpd-mod-openssl_1.4.69-1_arm64.deb ...
Unpacking lighttpd-mod-openssl (1.4.69-1) ...
Selecting previously unselected package php-common.
Preparing to unpack .../13-php-common_2%3a93_all.deb ...
Unpacking php-common (2:93) ...
Selecting previously unselected package php8.2-common.
Preparing to unpack .../14-php8.2-common_8.2.7-1~deb12u1_arm64.deb ...
Unpacking php8.2-common (8.2.7-1~deb12u1) ...
Selecting previously unselected package php8.2-opcache.
Preparing to unpack .../15-php8.2-opcache_8.2.7-1~deb12u1_arm64.deb ...
Unpacking php8.2-opcache (8.2.7-1~deb12u1) ...
Selecting previously unselected package php8.2-readline.
Preparing to unpack .../16-php8.2-readline_8.2.7-1~deb12u1_arm64.deb ...
Unpacking php8.2-readline (8.2.7-1~deb12u1) ...
Selecting previously unselected package php8.2-cli.
Preparing to unpack .../17-php8.2-cli_8.2.7-1~deb12u1_arm64.deb ...
Unpacking php8.2-cli (8.2.7-1~deb12u1) ...
Selecting previously unselected package php8.2-cgi.
Preparing to unpack .../18-php8.2-cgi_8.2.7-1~deb12u1_arm64.deb ...
Unpacking php8.2-cgi (8.2.7-1~deb12u1) ...
Selecting previously unselected package qrencode.
Preparing to unpack .../19-qrencode_4.1.1-1_arm64.deb ...
Unpacking qrencode (4.1.1-1) ...
Selecting previously unselected package spawn-fcgi.
Preparing to unpack .../20-spawn-fcgi_1.6.4-2_arm64.deb ...
Unpacking spawn-fcgi (1.6.4-2) ...
Setting up lighttpd (1.4.69-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/lighttpd.service → /lib/systemd/system/lighttpd.service.
Setting up php-common (2:93) ...
Created symlink /etc/systemd/system/timers.target.wants/phpsessionclean.timer → /lib/systemd/system/phpsessionclean.timer.
Setting up lighttpd-mod-openssl (1.4.69-1) ...
Setting up php8.2-common (8.2.7-1~deb12u1) ...

Creating config file /etc/php/8.2/mods-available/calendar.ini with new version

Creating config file /etc/php/8.2/mods-available/ctype.ini with new version

Creating config file /etc/php/8.2/mods-available/exif.ini with new version

Creating config file /etc/php/8.2/mods-available/fileinfo.ini with new version

Creating config file /etc/php/8.2/mods-available/ffi.ini with new version

Creating config file /etc/php/8.2/mods-available/ftp.ini with new version

Creating config file /etc/php/8.2/mods-available/gettext.ini with new version

Creating config file /etc/php/8.2/mods-available/iconv.ini with new version

Creating config file /etc/php/8.2/mods-available/pdo.ini with new version

Creating config file /etc/php/8.2/mods-available/phar.ini with new version

Creating config file /etc/php/8.2/mods-available/posix.ini with new version

Creating config file /etc/php/8.2/mods-available/shmop.ini with new version

Creating config file /etc/php/8.2/mods-available/sockets.ini with new version

Creating config file /etc/php/8.2/mods-available/sysvmsg.ini with new version

Creating config file /etc/php/8.2/mods-available/sysvsem.ini with new version

Creating config file /etc/php/8.2/mods-available/sysvshm.ini with new version

Creating config file /etc/php/8.2/mods-available/tokenizer.ini with new version
Setting up isoquery (3.3.3-1) ...
Setting up qrencode (4.1.1-1) ...
Setting up php8.2-opcache (8.2.7-1~deb12u1) ...

Creating config file /etc/php/8.2/mods-available/opcache.ini with new version
Setting up php8.2-readline (8.2.7-1~deb12u1) ...

Creating config file /etc/php/8.2/mods-available/readline.ini with new version
Setting up dnsmasq (2.89-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/dnsmasq.service → /lib/systemd/system/dnsmasq.service.
Setting up hostapd (2:2.10-12) ...
Created symlink /etc/systemd/system/multi-user.target.wants/hostapd.service → /lib/systemd/system/hostapd.service.
Created symlink /etc/systemd/system/hostapd.service → /dev/null.
Setting up dhcpcd-base (9.4.1-24~deb12u3) ...
Adding system user `dhcpcd' (UID 112) ...
Adding new user `dhcpcd' (UID 112) with group `nogroup' ...
Not creating home directory `/usr/lib/dhcpcd'.
Setting up netfilter-persistent (1.0.20) ...
Created symlink /etc/systemd/system/iptables.service → /lib/systemd/system/netfilter-persistent.service.
Created symlink /etc/systemd/system/ip6tables.service → /lib/systemd/system/netfilter-persistent.service.
Created symlink /etc/systemd/system/multi-user.target.wants/netfilter-persistent.service → /lib/systemd/system/netfilter-persistent.service.
Setting up spawn-fcgi (1.6.4-2) ...
Setting up php8.2-cli (8.2.7-1~deb12u1) ...
update-alternatives: using /usr/bin/php8.2 to provide /usr/bin/php (php) in auto mode
update-alternatives: using /usr/bin/phar8.2 to provide /usr/bin/phar (phar) in auto mode
update-alternatives: using /usr/bin/phar.phar8.2 to provide /usr/bin/phar.phar (phar.phar) in auto mode

Creating config file /etc/php/8.2/cli/php.ini with new version
Setting up vnstat (2.10-2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/vnstat.service → /lib/systemd/system/vnstat.service.
Setting up libonig5:arm64 (6.9.8-1) ...
Setting up lighttpd-mod-deflate (1.4.69-1) ...
Setting up libjq1:arm64 (1.6-2.1) ...
Setting up iptables-persistent (1.0.20) ...
Setting up dhcpcd (1:9.4.1-24~deb12u3) ...
Created symlink /etc/systemd/system/multi-user.target.wants/dhcpcd.service → /lib/systemd/system/dhcpcd.service.
Setting up php8.2-cgi (8.2.7-1~deb12u1) ...
update-alternatives: using /usr/bin/php-cgi8.2 to provide /usr/bin/php-cgi (php-cgi) in auto mode
update-alternatives: using /usr/lib/cgi-bin/php8.2 to provide /usr/lib/cgi-bin/php (php-cgi-bin) in auto mode

Creating config file /etc/php/8.2/cgi/php.ini with new version
Setting up jq (1.6-2.1) ...
Setting up dhcpcd5 (9.4.1-24~deb12u3) ...
Processing triggers for libglib2.0-0:arm64 (2.74.6-2) ...
Processing triggers for libc-bin (2.36-9+rpt2+deb12u3) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for shared-mime-info (2.2-1) ...
Processing triggers for initramfs-tools (0.142) ...
update-initramfs: Generating /boot/initrd.img-6.1.0-rpi7-rpi-v8
update-initramfs: Generating /boot/initrd.img-6.1.0-rpi7-rpi-2712
Processing triggers for php8.2-cli (8.2.7-1~deb12u1) ...
Processing triggers for php8.2-cgi (8.2.7-1~deb12u1) ...
[ ✓ ok ] 
RaspAP Install: Enabling PHP for lighttpd
Met dependency: fastcgi
Enabling fastcgi-php: ok
Enabling fastcgi: ok
Run "service lighttpd force-reload" to enable changes
RaspAP Install: Creating RaspAP directories
Creating /etc/raspap/networking
Changing file ownership of /etc/raspap
RaspAP Install: Checking for existing configs
[ ✓ ok ] 
RaspAP Install: Optimize PHP configuration
Enable HttpOnly for session cookies (Recommended)? [Y/n]: Y
Php-cgi enabling session.cookie_httponly.
RaspAP Install: Cloning latest files from GitHub
Cloning into '/tmp/raspap-webgui'...
RaspAP Install: Installing application to /var/www/html
Copying primary RaspAP config to /var/www/html/includes/config.php
Removing source files at /tmp/raspap-webgui
[ ✓ ok ] 
RaspAP Install: Changing file ownership in web root directory
RaspAP Install: Creating hostapd logging & control scripts
[ ✓ ok ] 
RaspAP Install: Creating lighttpd control scripts
Copying configport.sh to /etc/raspap/lighttpd
Changing file ownership
[ ✓ ok ] 
RaspAP Install: Copying lighttpd extra config files
Copying 50-raspap-router.conf to /etc/lighttpd/conf-available
Creating link to /etc/lighttpd/conf-enabled
Existing 50-raspap-router.conf found. Unlinking.
unlink: cannot unlink '/etc/lighttpd/conf-enabled/50-raspap-router.conf': No such file or directory
Linking 50-raspap-router.conf to /etc/lighttpd/conf-enabled/
[ ✓ ok ] 
RaspAP Install: Applying default configuration to installed services
Checking for existence of /etc/dnsmasq.d
Copying config/hostapd.conf to /etc/hostapd/hostapd.conf
Copying config/090_raspap.conf to /etc/dnsmasq.d/090_raspap.conf
Copying config/090_wlan0.conf to /etc/dnsmasq.d/090_wlan0.conf
Copying config/dhcpcd.conf to /etc/dhcpcd.conf
Copying config/defaults.json to /etc/raspap/networking/
Changing file ownership of /etc/raspap/networking/defaults.json
Copying bridged AP config to /etc/systemd/network
RaspAP Install: Unmasking and enabling hostapd service
Removed "/etc/systemd/system/hostapd.service".
Synchronizing state of hostapd.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable hostapd
[ ✓ ok ] 
RaspAP Install: Configuring networking
Enabling IP forwarding
net.ipv4.ip_forward = 1
Restarting procps (via systemctl): procps.service.
Checking iptables rules
Adding rule: -t nat -A POSTROUTING -j MASQUERADE
Adding rule: -t nat -A POSTROUTING -s 192.168.50.0/24 ! -d 192.168.50.0/24 -j MASQUERADE
Persisting IP tables rules
Enable RaspAP control service (Recommended)? [Y/n]: Y
RaspAP Install: Enabling RaspAP daemon
Disable with: sudo systemctl disable raspapd.service
Created symlink /etc/systemd/system/multi-user.target.wants/raspapd.service → /lib/systemd/system/raspapd.service.
[ ✓ ok ] 
RaspAP Install: Configure ad blocking
Install ad blocking and enable list management? [Y/n]: Y
RaspAP Install: Creating ad blocking base configuration (Beta)
Creating /etc/raspap/adblock
Fetching latest hostnames list
/tmp/hostnames.txt  100%[===================>]   4.17M  4.96MB/s    in 0.8s    
Fetching latest domains list
/tmp/domains.txt    100%[===================>]   6.02M  2.89MB/s    in 2.1s    
Adding blocklists to /etc/raspap/adblock
Moving and setting permissions for blocklist update script
changed ownership of '/etc/raspap/adblock/domains.txt' from root:root to root:www-data
changed ownership of '/etc/raspap/adblock/hostnames.txt' from root:root to root:www-data
Adding 090_addblock.conf to /etc/dnsmasq.d
Enabling local DNS name resolution for DHCP clients
Enabling ad blocking management option
[ ✓ ok ] 
RaspAP Install: Configure OpenVPN support
Install OpenVPN and enable client configuration? [Y/n]: Y
RaspAP Install: Installing OpenVPN and enabling client configuration
Adding packages via apt-get
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
  agnostics bluez dos2unix fio fonts-piboto grim gtk2-engines-pixbuf
  gtk2-engines-pixflat gui-pkinst ibverbs-providers libaio1 libaml0
  libatkmm-1.6-1v5 libboost-iostreams1.74.0 libcairomm-1.0-1v5 libcupsimage2
  libdaxctl1 libdbusmenu-glib4 libdbusmenu-gtk3-4 libgfapi0 libgfrpc0
  libgfxdr0 libglibmm-2.4-1v5 libglusterfs0 libgtkmm-3.0-1v5 libibverbs1
  libliftoff-rpi libnbd0 libndctl6 libneatvnc0 libnma-common libnma0
  libpangomm-1.4-1v5 libpmem1 libpmemblk1 librados2 librbd1 librdmacm1
  libseat1 libsigc++-2.0-0v5 libwf-config1 libwf-utils0 libwlroots11
  libxcb-res0 lp-connection-editor lxplug-bluetooth lxplug-cputemp
  lxplug-ejecter lxplug-magnifier lxplug-menu lxplug-netman lxplug-network
  lxplug-ptbatt lxplug-updater lxplug-volumepulse mate-polkit-bin pi-greeter
  pi-language-support pi-printer-support pipanel pishutdown pixflat-icons
  pixflat-theme printer-driver-escpr pulseaudio-module-bluetooth
  qt5-gtk2-platformtheme qt5-style-plugin-cleanlooks qt5-style-plugin-motif
  qt5-style-plugin-plastique qt5-style-plugins qt5ct rp-bookshelf
  rpd-wallpaper wayfire wayvnc wf-panel-pi xsettingsd xwayland
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  easy-rsa libccid libpkcs11-helper1 opensc opensc-pkcs11 pcscd
Suggested packages:
  pcmciautils resolvconf openvpn-dco-dkms openvpn-systemd-resolved
The following NEW packages will be installed:
  easy-rsa libccid libpkcs11-helper1 opensc opensc-pkcs11 openvpn pcscd
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,322 kB of archives.
After this operation, 8,360 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main arm64 libccid arm64 1.5.2-1 [360 kB]
Get:2 http://deb.debian.org/debian bookworm/main arm64 pcscd arm64 1.9.9-2 [84.8 kB]
Get:3 http://deb.debian.org/debian bookworm/main arm64 easy-rsa all 3.1.0-1 [54.8 kB]
Get:4 http://deb.debian.org/debian bookworm/main arm64 libpkcs11-helper1 arm64 1.29.0-1 [48.4 kB]
Get:5 http://deb.debian.org/debian bookworm/main arm64 opensc-pkcs11 arm64 0.23.0-0.3+deb12u1 [796 kB]
Get:6 http://deb.debian.org/debian bookworm/main arm64 opensc arm64 0.23.0-0.3+deb12u1 [359 kB]
Get:7 http://deb.debian.org/debian bookworm/main arm64 openvpn arm64 2.6.3-1+deb12u2 [619 kB]
Preconfiguring packages ...
Fetched 2,322 kB in 1s (3,399 kB/s)
Selecting previously unselected package libccid.
(Reading database ... 125782 files and directories currently installed.)
Preparing to unpack .../0-libccid_1.5.2-1_arm64.deb ...
Unpacking libccid (1.5.2-1) ...
Selecting previously unselected package pcscd.
Preparing to unpack .../1-pcscd_1.9.9-2_arm64.deb ...
Unpacking pcscd (1.9.9-2) ...
Selecting previously unselected package easy-rsa.
Preparing to unpack .../2-easy-rsa_3.1.0-1_all.deb ...
Unpacking easy-rsa (3.1.0-1) ...
Selecting previously unselected package libpkcs11-helper1:arm64.
Preparing to unpack .../3-libpkcs11-helper1_1.29.0-1_arm64.deb ...
Unpacking libpkcs11-helper1:arm64 (1.29.0-1) ...
Selecting previously unselected package opensc-pkcs11:arm64.
Preparing to unpack .../4-opensc-pkcs11_0.23.0-0.3+deb12u1_arm64.deb ...
Unpacking opensc-pkcs11:arm64 (0.23.0-0.3+deb12u1) ...
Selecting previously unselected package opensc.
Preparing to unpack .../5-opensc_0.23.0-0.3+deb12u1_arm64.deb ...
Unpacking opensc (0.23.0-0.3+deb12u1) ...
Selecting previously unselected package openvpn.
Preparing to unpack .../6-openvpn_2.6.3-1+deb12u2_arm64.deb ...
Unpacking openvpn (2.6.3-1+deb12u2) ...
Setting up libccid (1.5.2-1) ...
Setting up pcscd (1.9.9-2) ...
Created symlink /etc/systemd/system/sockets.target.wants/pcscd.socket → /lib/systemd/system/pcscd.socket.
pcscd.service is a disabled or a static unit, not starting it.
Setting up libpkcs11-helper1:arm64 (1.29.0-1) ...
Setting up opensc-pkcs11:arm64 (0.23.0-0.3+deb12u1) ...
Setting up easy-rsa (3.1.0-1) ...
Setting up openvpn (2.6.3-1+deb12u2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/openvpn.service → /lib/systemd/system/openvpn.service.
Setting up opensc (0.23.0-0.3+deb12u1) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for mailcap (3.70+nmu1) ...
Processing triggers for desktop-file-utils (0.26-1) ...
Processing triggers for gnome-menus (3.36.0-1.1) ...
Processing triggers for libc-bin (2.36-9+rpt2+deb12u3) ...
Enabling openvpn-client service on boot
Created symlink /etc/systemd/system/multi-user.target.wants/openvpn-client@client.service → /lib/systemd/system/openvpn-client@.service.
RaspAP Install: Creating OpenVPN control scripts
[ ✓ ok ] 
RaspAP Install: Configure WireGuard support
Install WireGuard and enable VPN tunnel configuration? [Y/n]: Y
RaspAP Install: Configure WireGuard support
Installing wireguard from apt
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
  agnostics bluez dos2unix fio fonts-piboto grim gtk2-engines-pixbuf
  gtk2-engines-pixflat gui-pkinst ibverbs-providers libaio1 libaml0
  libatkmm-1.6-1v5 libboost-iostreams1.74.0 libcairomm-1.0-1v5 libcupsimage2
  libdaxctl1 libdbusmenu-glib4 libdbusmenu-gtk3-4 libgfapi0 libgfrpc0
  libgfxdr0 libglibmm-2.4-1v5 libglusterfs0 libgtkmm-3.0-1v5 libibverbs1
  libliftoff-rpi libnbd0 libndctl6 libneatvnc0 libnma-common libnma0
  libpangomm-1.4-1v5 libpmem1 libpmemblk1 librados2 librbd1 librdmacm1
  libseat1 libsigc++-2.0-0v5 libwf-config1 libwf-utils0 libwlroots11
  libxcb-res0 lp-connection-editor lxplug-bluetooth lxplug-cputemp
  lxplug-ejecter lxplug-magnifier lxplug-menu lxplug-netman lxplug-network
  lxplug-ptbatt lxplug-updater lxplug-volumepulse mate-polkit-bin pi-greeter
  pi-language-support pi-printer-support pipanel pishutdown pixflat-icons
  pixflat-theme printer-driver-escpr pulseaudio-module-bluetooth
  qt5-gtk2-platformtheme qt5-style-plugin-cleanlooks qt5-style-plugin-motif
  qt5-style-plugin-plastique qt5-style-plugins qt5ct rp-bookshelf
  rpd-wallpaper wayfire wayvnc wf-panel-pi xsettingsd xwayland
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  wireguard-tools
The following NEW packages will be installed:
  resolvconf wireguard wireguard-tools
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 153 kB of archives.
After this operation, 567 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bookworm/main arm64 resolvconf all 1.91+nmu1 [55.6 kB]
Get:2 http://deb.debian.org/debian bookworm/main arm64 wireguard-tools arm64 1.0.20210914-1+b1 [89.3 kB]
Get:3 http://deb.debian.org/debian bookworm/main arm64 wireguard all 1.0.20210914-1 [8,216 B]
Preconfiguring packages ...
Fetched 153 kB in 1s (260 kB/s)
Selecting previously unselected package resolvconf.
(Reading database ... 126073 files and directories currently installed.)
Preparing to unpack .../resolvconf_1.91+nmu1_all.deb ...
Unpacking resolvconf (1.91+nmu1) ...
Selecting previously unselected package wireguard-tools.
Preparing to unpack .../wireguard-tools_1.0.20210914-1+b1_arm64.deb ...
Unpacking wireguard-tools (1.0.20210914-1+b1) ...
Selecting previously unselected package wireguard.
Preparing to unpack .../wireguard_1.0.20210914-1_all.deb ...
Unpacking wireguard (1.0.20210914-1) ...
Setting up resolvconf (1.91+nmu1) ...
Created symlink /etc/systemd/system/sysinit.target.wants/resolvconf.service → /lib/systemd/system/resolvconf.service.
Created symlink /etc/systemd/system/systemd-resolved.service.wants/resolvconf-pull-resolved.path → /lib/systemd/system/resolvconf-pull-resolved.path.
Unit /lib/systemd/system/resolvconf-pull-resolved.path is added as a dependency to a non-existent unit systemd-resolved.service.
Created symlink /etc/systemd/system/systemd-resolved.service.wants/resolvconf-pull-resolved.service → /lib/systemd/system/resolvconf-pull-resolved.service.
Unit /lib/systemd/system/resolvconf-pull-resolved.service is added as a dependency to a non-existent unit systemd-resolved.service.
Setting up wireguard-tools (1.0.20210914-1+b1) ...
wg-quick.target is a disabled or a static unit, not starting it.
Setting up wireguard (1.0.20210914-1) ...
Processing triggers for man-db (2.11.2-2) ...
Processing triggers for resolvconf (1.91+nmu1) ...
Enabling wg-quick@wg0
Created symlink /etc/systemd/system/multi-user.target.wants/wg-quick@wg0.service → /lib/systemd/system/wg-quick@.service.
Enabling WireGuard management option
[ ✓ ok ] 
RaspAP Install: Configure VPN provider support (Beta)
Enable VPN provider client configuration? [Y/n]: n
[ ✓ ok ] (Skipped)
RaspAP Install: Adding raspap.sudoers to /etc/sudoers.d/090_raspap
RaspAP Install: Copying RaspAP debug log control script
RaspAP Install: Copying RaspAP install loader
RaspAP Install: Symlinked wpa_supplicant hooks for multiple wlan interfaces
[ ✓ ok ] 
RaspAP Install: Installation completed
Join RaspAP Insiders for early access to exclusive features!

> https://docs.raspap.com/insiders/
> https://github.com/sponsors/RaspAP/


sudo reboot

The Quick installer will complete the steps in the manual installation for you.

After a reboot at the end of the installation, the wireless AP network will be configured as follows:

IP address: 10.3.141.1
Username: admin
Password: secret
DHCP range: 10.3.141.50 to 10.3.141.254
SSID: raspi-webgui
Password: ChangeMe

Your AP's basic settings and many advanced options are now ready to be modified by RaspAP.

Basics

After running the Quick installer or following the manual installation steps, RaspAP will start up a routed wireless access point (AP) with a default configuration. As part of this initial setup, the hostapd service broadcasts an AP with the following settings:

Interface: wlan0
SSID: raspi-webgui
Wireless Mode: 802.11n - 2.4GHz
Channel: 1
Security Type: WPA2
Encryption Type: CCMP
Passphrase: ChangeMe

Each of these settings may be changed on the Hotspot > Basic and Security tabs to any values you wish. Your changes will be applied and made visible on the broadcasted AP by choosingSave settings followed by Restart hotspot.

At this point, a dialog will appear to indicate the progress of the RaspAP service. This is a Linux systemd process that is responsible for starting up several network services in a specific order and timing.

WIFI Routing

With the USB dongle connected and AP active, use RaspAP's WiFi client interface to select and authenticate with your existing wireless router.

The current network configuration will display two default routes. This may be confirmed by checking the Routing table output on RaspAP's Networking interface. In the example below, wlan0 is the AP interface and has a default route (identified by the default label) and a metric value of 303:

Note that our USB adapter is on the wlan1 interface and has a higher metric value of 304. It also has a default route. Until we configure these metrics, our WiFi repeater does not know how to route packets from wlan1 (the client interface) to wlan0 (the AP interface) and vice versa. Clients connected to the AP will not have internet connectivity. Fortunately, this is easily fixed.

Metrics and default routes are used by dhcpcd, the DHCP daemon. Contrary to popular belief, RaspAP does not manipulate the IP routing table or set interface priorities without user input. The Linux kernel sets default metric values when the interface is brought up and will usually choose the network routes it decides is best. The DHCP daemon uses these metrics to prioritize interfaces, where lower values are given a higher priority.

To configure routing for our repeater, select wlan0 (the AP interface, in this example) from the DHCP Server settings interface. Be sure that the "Install a default route for this interface" option is disabled.

Scroll to the bottom and set a metric value of 305 for this interface, then choose Save settings:

This instructs the DHCP daemon to treat the wlan0 interface with a lower priority than the wlan1 interface. There's nothing magic about the value "305" in this example — the important thing is that the AP interface has a higher value, and thus a lower priorty, than the wlan1interface.

For the changes to take effect, choose Restart hotspot from the Hotspot interface.

Behind the scenes, RaspAP has configured the wlan0 interface in /etc/dhcpcd.conf like so:

# RaspAP wlan0 configuration
interface wlan0
static ip_address=10.3.141.1/24
static routers=10.3.141.1
metric 305
nogateway

This is reflected in the updated routing table, visible on the Networking interface. In the example below, the wlan0 interface hosting the AP no longer has a default route and shows a higher metric value (lower priority) than the wlan1 interface:

Airtunes

This tutorial  involves configuring the the open-source AirPlay receiver called Shairport Sync. Most of the contents found 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.

  1. 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 
  1. 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.

  1. With the configuration process now completed we can compile Shairport-sync and install it.

make
sudo make install
  1. 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.

  1. 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
  1. Once the firmware update has completed, modify the RPI /boot/config.txt on the SD Card, with the following new line to this file.

audio_pwm_mode=2
  1. 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
  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;
  1. Finally, reboot OpenFJ:

sudo reboot

GPS NMEA

  1. 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

kismet

From this tutorial,

Install the kismet packages:

wget -O - https://www.kismetwireless.net/repos/kismet-release.gpg.key | sudo apt-key add -
echo "deb https://www.kismetwireless.net/repos/apt/release/$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/kismet.list

sudo apt update
sudo apt install kismet

Add a kismet group and add a user:

sudo usermod -aG kismet pi
sudo usermod -aG kismet mtb
sudo reboot
groups

Device Support

Check for device support:

mtb@OpenFJ:~ $ iw dev
phy#1
	Interface wlan1
		ifindex 4
		wdev 0x100000001
		addr 3c:49:37:07:17:a0
		type managed
		txpower 30.00 dBm
phy#0
	Unnamed/non-netdev interface
		wdev 0x2
		addr ba:27:eb:b9:17:75
		type P2P-device
		txpower 31.00 dBm
	Interface wlan0
		ifindex 3
		wdev 0x1
		addr b8:27:eb:b9:17:75
		ssid planeta8m
		type managed
		channel 6 (2437 MHz), width: 20 MHz, center1: 2437 MHz
		txpower 31.00 dBm

This iw command should produce a list similar to the one below. Look for the wireless device that you intend on putting into monitoring mode (phy#1).

Now determine if the device can support monitoring mode. From the output of the iw phy phy1 info command, look for a section titled Supported interface modes:, and look for * monitor within it.

If this is not present, then this wireless adapter will not work.

mtb@OpenFJ:~ $ iw phy phy1 info
Wiphy phy1
	wiphy index: 1
	max # scan SSIDs: 4
	max scan IEs length: 2257 bytes
	max # sched scan SSIDs: 0
	max # match sets: 0
	RTS threshold: 2347
	Retry short limit: 7
	Retry long limit: 4
	Coverage class: 0 (up to 0m)
	Supported Ciphers:
		* WEP40 (00-0f-ac:1)
		* WEP104 (00-0f-ac:5)
		* TKIP (00-0f-ac:2)
		* CCMP-128 (00-0f-ac:4)
		* CCMP-256 (00-0f-ac:10)
		* GCMP-128 (00-0f-ac:8)
		* GCMP-256 (00-0f-ac:9)
	Available Antennas: TX 0x3 RX 0x3
	Configured Antennas: TX 0x3 RX 0x3
	Supported interface modes:
		 * managed
		 * monitor
	Band 1:
		Capabilities: 0x6c
			HT20
			SM Power Save disabled
			RX HT20 SGI
			RX HT40 SGI
			No RX STBC
			Max AMSDU length: 3839 bytes
			No DSSS/CCK HT40
		Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
		Minimum RX AMPDU time spacing: 16 usec (0x07)
		HT TX/RX MCS rate indexes supported: 0-15, 32
		Bitrates (non-HT):
			* 1.0 Mbps
			* 2.0 Mbps
			* 5.5 Mbps
			* 11.0 Mbps
			* 6.0 Mbps
			* 9.0 Mbps
			* 12.0 Mbps
			* 18.0 Mbps
			* 24.0 Mbps
			* 36.0 Mbps
			* 48.0 Mbps
			* 54.0 Mbps
		Frequencies:
			* 2412 MHz [1] (30.0 dBm)
			* 2417 MHz [2] (30.0 dBm)
			* 2422 MHz [3] (30.0 dBm)
			* 2427 MHz [4] (30.0 dBm)
			* 2432 MHz [5] (30.0 dBm)
			* 2437 MHz [6] (30.0 dBm)
			* 2442 MHz [7] (30.0 dBm)
			* 2447 MHz [8] (30.0 dBm)
			* 2452 MHz [9] (30.0 dBm)
			* 2457 MHz [10] (30.0 dBm)
			* 2462 MHz [11] (30.0 dBm)
			* 2467 MHz [12] (disabled)
			* 2472 MHz [13] (disabled)
			* 2484 MHz [14] (disabled)
	Supported commands:
		 * new_interface
		 * set_interface
		 * new_key
		 * start_ap
		 * new_station
		 * new_mpath
		 * set_mesh_config
		 * set_bss
		 * authenticate
		 * associate
		 * deauthenticate
		 * disassociate
		 * join_ibss
		 * join_mesh
		 * remain_on_channel
		 * set_tx_bitrate_mask
		 * frame
		 * frame_wait_cancel
		 * set_wiphy_netns
		 * set_channel
		 * probe_client
		 * set_noack_map
		 * register_beacons
		 * start_p2p_device
		 * set_mcast_rate
		 * connect
		 * disconnect
		 * set_qos_map
		 * set_multicast_to_unicast
	software interface modes (can always be added):
		 * monitor
	interface combinations are not supported
	HT Capability overrides:
		 * MCS: ff ff ff ff ff ff ff ff ff ff
		 * maximum A-MSDU length
		 * supported channel width
		 * short GI for 40 MHz
		 * max A-MPDU length exponent
		 * min MPDU start spacing
	Device supports TX status socket option.
	Device supports HT-IBSS.
	Device supports SAE with AUTHENTICATE command
	Device supports low priority scan.
	Device supports scan flush.
	Device supports AP scan.
	Device supports per-vif TX power setting
	Driver supports full state transitions for AP/GO clients
	Driver supports a userspace MPM
	Device supports configuring vdev MAC-addr on create.
	max # scan plans: 1
	max scan plan interval: -1
	max scan plan iterations: 0
	Supported TX frame types:
		 * IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
		 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
		 * AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
		 * AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
		 * mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
		 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
		 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
		 * P2P-device: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
	Supported RX frame types:
		 * IBSS: 0x40 0xb0 0xc0 0xd0
		 * managed: 0x40 0xb0 0xd0
		 * AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
		 * AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
		 * mesh point: 0xb0 0xc0 0xd0
		 * P2P-client: 0x40 0xd0
		 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
		 * P2P-device: 0x40 0xd0
	Supported extended features:
		* [ RRM ]: RRM
		* [ FILS_STA ]: STA FILS (Fast Initial Link Setup)
		* [ CQM_RSSI_LIST ]: multiple CQM_RSSI_THOLD records
		* [ CONTROL_PORT_OVER_NL80211 ]: control port over nl80211
		* [ SCAN_RANDOM_SN ]: use random sequence numbers in scans
		* [ SCAN_MIN_PREQ_CONTENT ]: use probe request with only rate IEs in scans
		* [ CONTROL_PORT_NO_PREAUTH ]: disable pre-auth over nl80211 control port support
		* [ SCAN_FREQ_KHZ ]: scan on kHz frequency support
		* [ CONTROL_PORT_OVER_NL80211_TX_STATUS ]: tx status for nl80211 control port support

Configure wireless adapter

Edit the interfaces file, including allow-hotplug, and disable the wlan1 interface from automatically being assigned an IP address. Also, set up the monitor mode of the interface before it is brought up by the operating system.

We then proceed to delete the wlan1 interface as we do not require it for what we are doing.

sudo vi /etc/network/interfaces

 allow-hotplug wlan1
 iface wlan1 inet manual
 pre-up iw phy phy1 interface add mon1 type monitor
 pre-up iw dev wlan1 del
 pre-up ifconfig mon1 up

Reboot OpenFJ, and check to see if mon1: appears under ifconfig

sudo reboot

mtb@OpenFJ:~ $ ifconfig -a
eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether b8:27:eb:ec:42:20  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 58  bytes 6735 (6.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 58  bytes 6735 (6.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

mon1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        unspec 3C-49-37-07-17-A0-3A-30-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)
        RX packets 631  bytes 195587 (191.0 KiB)
        RX errors 0  dropped 631  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.45  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::f63c:c64d:b48f:23bf  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:b9:17:75  txqueuelen 1000  (Ethernet)
        RX packets 95  bytes 12099 (11.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 105  bytes 17189 (16.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Configuring Kismet

Edit the kismet configuration file

sudo vi /etc/kismet/kismet_site.conf

source=mon1
source=hci0

Start Kismet

mtb@OpenFJ:~ $ kismet

KISMET - Point your browser to http://localhost:2501 (or the address of this system) for the Kismet UI

WIGLE

TPMS

915Mhz sensor

  • No labels