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
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) |
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 |
LTE modem | Generic USB / LTE modem | $18 |
USB Wifi module | Realtek RTL8812 support | $19 |
USB extenders | Right angle USB extenders | $8 |
SmartiPi 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:
Customize settings to access headless.
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.
To utilize all of the network functions (like USB dongle support) RaspAP Insiders Edition is required. This requires becoming a patron for at least $10 per month of the RaspAP project.
To validate with the RaspAP repository on github, a ssh-key needs to be added on OpenFJ to validate with github.
First, generate an ssh key with the GitHub email address:
ssh-keygen -t ed25519 -C "your_email@example.com"
Then copy the contents of .ssh/id_ed25519.pub and create a new ssh key on github.
Finally, create a Personal access token (classic) on github
Check the validity of the personal access token:
curl -sS -f -I -H "Authorization: token MY_TOKEN" https://api.github.com HTTP/2 200 server: GitHub.com date: Tue, 26 Dec 2023 20:22:28 GMT content-type: application/json; charset=utf-8 content-length: 2396 cache-control: private, max-age=60, s-maxage=60 vary: Accept, Authorization, Cookie, X-GitHub-OTP etag: "979b3d7229c1715b3fb34055cfb174fcc6fd63c1940b86a91391db0a5d3bdca2" x-oauth-scopes: repo x-accepted-oauth-scopes: x-github-media-type: github.v3; format=json x-github-api-version-selected: 2022-11-28 x-ratelimit-limit: 5000 x-ratelimit-remaining: 4999 x-ratelimit-reset: 1703625748 x-ratelimit-used: 1 x-ratelimit-resource: core access-control-expose-headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset access-control-allow-origin: * strict-transport-security: max-age=31536000; includeSubdomains; preload x-frame-options: deny x-content-type-options: nosniff x-xss-protection: 0 referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin content-security-policy: default-src 'none' vary: Accept-Encoding, Accept, X-Requested-With x-github-request-id: 9F0A:6283:DB5DB57:1CACFBB8:658B3604
And install RaspAP using the easy installer (with insiders option enabled). During the installation, introduce the github username, and personal access token as the password:
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... lighttpd is already the newest version (1.4.69-1). git is already the newest version (1:2.39.2-1.1). hostapd is already the newest version (2:2.10-12). dnsmasq is already the newest version (2.89-1). iptables-persistent is already the newest version (1.0.20). php8.2-cgi is already the newest version (8.2.7-1~deb12u1). dhcpcd5 is already the newest version (9.4.1-24~deb12u3). iw is already the newest version (5.19-1). vnstat is already the newest version (2.10-2). qrencode is already the newest version (4.1.1-1). jq is already the newest version (1.6-2.1). isoquery is already the newest version (3.3.3-1). 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. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. [ ✓ ok ] RaspAP Install: Enabling PHP for lighttpd already enabled 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. 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 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 Rule already exits: -A POSTROUTING -j MASQUERADE Rule already exits: -A POSTROUTING -s 192.168.50.0/24 ! -d 192.168.50.0/24 -j MASQUERADE Enable RaspAP control service (Recommended)? [Y/n]: Y RaspAP Install: Enabling RaspAP daemon Disable with: sudo systemctl disable 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.21M 1.18MB/s in 3.5s Fetching latest domains list /tmp/domains.txt 100%[===================>] 6.03M 768KB/s in 8.0s 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 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... openvpn is already the newest version (2.6.3-1+deb12u2). 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. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Enabling openvpn-client service on boot 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... wireguard is already the newest version (1.0.20210914-1). resolvconf is already the newest version (1.91+nmu1). 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. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Enabling wg-quick@wg0 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/ mtb@OpenFJ:~ $ mtb@OpenFJ:~ $ mtb@OpenFJ:~ $ mtb@OpenFJ:~ $ sudo reboot Broadcast message from root@OpenFJ on pts/1 (Tue 2023-12-26 13:59:57 MST): The system will reboot now! mtb@OpenFJ:~ $ Connection to 10.0.0.113 closed by remote host. 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.
Insider settings
Rerun the installer with the upgrade option for the insider settings
mtb@OpenFJ:~ $ curl -sL https://install.raspap.com | bash -s -- --upgrade --insiders --name miketangobravo --token ghp_E1ImsfA33SNoZlFppV9KFPcD7Ads3V0sJyB 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.3 Insiders The Quick Installer will guide you through a few easy steps RaspAP Install: Configure upgrade Detected OS: Debian GNU/Linux 12 (bookworm) 64-bit Using GitHub repository: RaspAP/raspap-insiders 3.0.3 branch Configuration directory: /etc/raspap lighttpd root: /var/www/html? [Y/n]: Y Upgrading lighttpd directory: /var/www/html This will upgrade your existing install to version 3.0.3 Insiders Your configuration will NOT be changed Complete upgrade 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 curl dnsutils nmap will be installed from the main deb sources list Reading package lists... Building dependency tree... Reading state information... lighttpd is already the newest version (1.4.69-1). git is already the newest version (1:2.39.2-1.1). hostapd is already the newest version (2:2.10-12). dnsmasq is already the newest version (2.89-1). iptables-persistent is already the newest version (1.0.20). php8.2-cgi is already the newest version (8.2.7-1~deb12u1). dhcpcd5 is already the newest version (9.4.1-24~deb12u3). iw is already the newest version (5.19-1). curl is already the newest version (7.88.1-10+deb12u5). dnsutils is already the newest version (1:9.18.19-1~deb12u1). nmap is already the newest version (7.93+dfsg1-1). vnstat is already the newest version (2.10-2). qrencode is already the newest version (4.1.1-1). jq is already the newest version (1.6-2.1). isoquery is already the newest version (3.3.3-1). 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. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. [ ✓ ok ] RaspAP Install: Enabling PHP for lighttpd already enabled 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: 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. Linking 50-raspap-router.conf to /etc/lighttpd/conf-enabled/ [ ✓ ok ] RaspAP Install: Copying defaults.json to /etc/raspap/networking/ RaspAP Install: Configuring networking Enabling IP forwarding net.ipv4.ip_forward = 1 Restarting procps (via systemctl): procps.service. Checking iptables rules Rule already exits: -A POSTROUTING -j MASQUERADE Rule already exits: -A POSTROUTING -s 192.168.50.0/24 ! -d 192.168.50.0/24 -j MASQUERADE Enable RaspAP control service (Recommended)? [Y/n]: Y RaspAP Install: Enabling RaspAP daemon Disable with: sudo systemctl disable 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.21M 7.85MB/s in 0.5s Fetching latest domains list /tmp/domains.txt 100%[===================>] 6.02M 3.14MB/s in 1.9s 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 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... openvpn is already the newest version (2.6.3-1+deb12u2). 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. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Enabling openvpn-client service on boot RaspAP Install: Creating OpenVPN control scripts [ ✓ ok ] RaspAP Install: Installing additional features (Insiders) RaspAP Install: Feature mobile data clients Installing required packages for mobile data clients Reading package lists... Building dependency tree... Reading state information... wvdial is already the newest version (1.61-6). socat is already the newest version (1.7.4.4-2). bc is already the newest version (1.07.1-3). 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. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Installing configuration files and scripts [ ✓ ok ] RaspAP Install: Feature dynamic dns RaspAP Install: Configure Dynamic DNS support Install ddclient and enable DDNS configuration? [Y/n]: Y RaspAP Install: Installing required packages Reading package lists... Building dependency tree... Reading state information... ddclient is already the newest version (3.10.0-2). 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. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Enabling ddclient.service Synchronizing state of ddclient.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable ddclient Enabling Dynamic DNS management option [ ✓ ok ] RaspAP Install: Configure Firewall Install iptables templates and enable firewall configuration? [Y/n]: Y Creating firewall configuration directory Copying config/iptables_rules.json to /etc/raspap/networking/firewall/ Enabling Firewall management option [ ✓ 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... wireguard is already the newest version (1.0.20210914-1). resolvconf is already the newest version (1.91+nmu1). 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. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Enabling wg-quick@wg0 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 Thank you for supporting this project as an Insider!
Basic Settings
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. 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 wlan1
interface.
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:
LTE modem
Connect the 4G LTE wifi dongle.
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 -------------------------------------------------------------------------------
SmartiPi Case setup
Now that the base operating system and networking have been configured, we can stuff the hardware into the SmartiPi case and utilize the touchscreen.
These instructions for putting the case together are an edited version of the assembly instructions found here. There will be leftover screws.
Step 1
Insert the female end of the Micro USB power splitter cable into the back cover as shown below.
Step 2
Use the two small black screws to secure the small plastic retaining part to the back cover. This will hold the power cable in the case.
Do not overtighten the screws!
Step 3
Assemble the metal base on the bottom of the plastic base. The metal base can only properly assemble onto the base one way. Please make sure all of the holes are aligned. Use the four silver screws to attach the metal base to the plastic base. Assemble the screws as shown in the photo. Then assemble the adhesive rubber feet in the locations show below.
Step 4
Assemble one of the white ribbon cables with the contacts facing up to the display connection on the display board. If using the fan, connect the red jumper lead that came with the display to the 5v connection on the display board GPIO pins and the black jumper lead to the ground pin. Remove the standoffs that attach the display board to the display and replace with the provided gold screws.
Step 5
Attach the display to the housing using the green screws as shown below. Feed the white ribbon cable through the slot in the center of the housing. Feed the fan power leads through the hole at the top.
Step 6
Assemble the port block part and the Raspberry Pi at the same time to the display housing. Use the standoffs that were removed in step 4 to hold the Raspberry pi in place.
Step 7
Connect the camera.
Step 8
Permanently cover the camera hole with the adhesive front panel.
Step 9
Assemble the display housing to the stand with the large black screws and nuts. DO NOT OVERTIGHTEN. Loosely attach the screws at this point.
Step 10
Attach the small rubber vibration mounts to the holes in the back cover as shown below. Push the small end of the mount through the back cover from the outside. Then pull it through the cover as shown.
Step 11
Then pull the rubbers mounts through the fan holes and pull the thin end of the mount until the
fan is mounted on the rubber mount as shown below. The fan should only be mounted in the way as shown below.
Step 12
Attach the power leads from the display to the red and black on the fan.
Step 13
Attach the power cables to the Pi and the display.
Step 14
Assemble the back cover to the display housing with the four black screws. The port blocking part should have tabs that fit inside the housing and cover.
Step 17
Adjust the angle of the display to suit you needs. Then tighten the pivot screws.
DO NOT OVERTIGHTEN. Tighten the screws just enough to hold the display in place.
Keyboard and Mouse
We need a keyboard and mouse to work with this device.
The Raspberry Pi touchscreen can work as a mouse, but not as a keyboard.
sudo wget https://github.com/remotepi/examples/raw/master/drivers/remotepi_1.0.17_armhf.deb sudo dpkg -i remotepi_1.0.17_armhf.deb sudo /etc/init.d/remotepi start
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.
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, 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
To check the audio output:
mtb@OpenFJ:~ $ speaker-test -c2 -twav -l7 speaker-test 1.2.8 Playback device is default Stream parameters are 48000Hz, S16_LE, 2 channels WAV file(s) Rate set to 48000Hz (requested 48000Hz) Buffer size range from 96 to 1048576 Period size range from 32 to 349526 Using max buffer size 1048576 Periods = 4 was set period_size = 262144 was set buffer_size = 1048576 0 - Front Left 1 - Front Right Time per period = 3.188024 0 - Front Left 1 - Front Right Time per period = 3.172214 0 - Front Left 1 - Front Right Time per period = 3.186163 0 - Front Left 1 - Front Right Time per period = 3.184413 0 - Front Left 1 - Front Right Time per period = 3.177440 0 - Front Left 1 - Front Right Time per period = 3.187576 0 - Front Left 1 - Front Right Time per period = 3.163264
And to adjust the output volume:
alsamixer
The pi uses a 4-Pole 3.5mm audio jack:
The sound quality of the on-board line-out jack on the raspberry pi is nominal.
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
Traccar
Traccar is the service for tracking the OpenFJ route, and providing a link for outside observers to follow.
Create the traccar directory
sudo mkdir /opt/traccar cd /opt/traccar
Download and unzip the server software for Linux ARM 64
[mtb@OpenFJ:/opt/traccar $ sudo wget https://github.com/traccar/traccar/releases/download/v5.10/traccar-linux-arm64-5.10.zip --2023-12-28 15:38:18-- https://github.com/traccar/traccar/releases/download/v5.10/traccar-linux-arm64-5.10.zip Resolving github.com (github.com)... 140.82.114.4 Connecting to github.com (github.com)|140.82.114.4|:443... connected. HTTP request sent, awaiting response... 302 Found Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/4038949/16190f10-2403-404b-9a81-f25dbee3364c?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20231228%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231228T223820Z&X-Amz-Expires=300&X-Amz-Signature=171c36f8506013281902add9f3ffe25bf7323730b8d6bf4bc9f4a4f31e7510f4&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=4038949&response-content-disposition=attachment%3B%20filename%3Dtraccar-linux-arm64-5.10.zip&response-content-type=application%2Foctet-stream [following] --2023-12-28 15:38:20-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/4038949/16190f10-2403-404b-9a81-f25dbee3364c?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAVCODYLSA53PQK4ZA%2F20231228%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231228T223820Z&X-Amz-Expires=300&X-Amz-Signature=171c36f8506013281902add9f3ffe25bf7323730b8d6bf4bc9f4a4f31e7510f4&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=4038949&response-content-disposition=attachment%3B%20filename%3Dtraccar-linux-arm64-5.10.zip&response-content-type=application%2Foctet-stream Resolving objects.githubusercontent.com (objects.githubusercontent.com)... 185.199.109.133, 185.199.110.133, 185.199.111.133, ... Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.109.133|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 176378688 (168M) [application/octet-stream] Saving to: ‘traccar-linux-arm64-5.10.zip’ traccar-linux-arm64-5.10.zip 100%[============================================================>] 168.21M 6.53MB/s in 42s 2023-12-28 15:39:03 (3.99 MB/s) - ‘traccar-linux-arm64-5.10.zip’ saved [176378688/176378688] mtb@OpenFJ:/opt/traccar $ sudo unzip traccar-linux-arm64-5.10.zip Archive: traccar-linux-arm64-5.10.zip inflating: traccar.run inflating: README.txt mtb@OpenFJ:/opt/traccar $ sudo rm traccar-linux-arm64-5.10.zip
Run the Traccar install/run procedure:
mtb@OpenFJ:/opt/traccar $ sudo ./traccar.run Creating directory out Verifying archive integrity... 100% MD5 checksums are OK. All good. Uncompressing traccar 100% Created symlink /etc/systemd/system/multi-user.target.wants/traccar.service → /etc/systemd/system/traccar.service.
Start the Traccar server with systemctl:
mtb@OpenFJ:/opt/traccar $ sudo systemctl start traccar.service
Check the Traccar web portal:
Email: admin
Password: admin
time
sudo apg-get install ntp
sudo vi /etc/ntpsec/ntp.conf
ntpq -p
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