RPI 3B (to start with)
Install the latest version of Raspbian and configure to work headless.
Afterwords, update:
Code Block |
---|
sudo apt update |
Airtunes
This tutorial involves configuring the the open-source AirPlay receiver called Shairport Sync. Most of the contents found in in this section were directly lifted from here.
This software allows the Raspberry Pi to act as an AirPlay receiver by implementing Apple’s proprietary protocols so that it can stream music, from the output audio jack to the auxiliary input of the FJ’s amplifier.
This setup will allow you to play music from any AirPlay-enabled device to your Raspberry Pi meaning you can use any iPhone and some Android products with a compatible app installed.
First. we need to install several different packages, run the following commands on your Raspberry Pi to install all of the packages that we need.
Code Block |
---|
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.
Code Block |
---|
cd ~
git clone https://github.com/mikebrady/shairport-sync.git |
We can now build and install the Shairport software.
Code Block |
---|
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.
Code Block |
---|
make
sudo make install |
To enable the Shairport Sync software to start automatically at system startup:
Code Block |
---|
sudo systemctl enable shairport-sync |
Code Block |
---|
sudo service shairport-sync start |
Info |
---|
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.
Code Block |
---|
sudo rpi-update
*** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
*** Performing self-update
*** Relaunching after update
*** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
FW_REV:8e2a862c9c7a0cc5cd505c8f89761d723af8768c
*** We're running for the first time
*** Backing up files (this will take a few minutes)
*** Backing up firmware
*** Backing up modules 6.1.0-rpi4-rpi-v8
WANT_32BIT:0 WANT_64BIT:1 WANT_PI4:1 WANT_PI5:1
#############################################################
WARNING: This update bumps to rpi-6.1.y linux tree
See: https://forums.raspberrypi.com/viewtopic.php?t=344246
'rpi-update' should only be used if there is a specific
reason to do so - for example, a request by a Raspberry Pi
engineer or if you want to help the testing effort
and are comfortable with restoring if there are regressions.
DO NOT use 'rpi-update' as part of a regular update process.
##############################################################
Would you like to proceed? (y/N)
*** Downloading specific firmware revision (this will take a few minutes)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
26 144M 26 37.5M 0 0 5043k 0 0:00:29 0:00:07 0:00:22 6101k
100 144M 100 144M 0 0 5514k 0 0:00:26 0:00:26 --:--:-- 4939k
*** Updating firmware
*** Updating kernel modules
*** depmod 6.1.63-v8-16k+
*** depmod 6.1.63-v8+
*** Updating VideoCore libraries
*** Using SoftFP libraries
*** Updating SDK
*** Running ldconfig
*** Storing current firmware revision
*** Deleting downloaded files
*** Syncing changes to disk
*** If no errors appeared, your firmware was successfully updated to 8e2a862c9c7a0cc5cd505c8f89761d723af8768c
*** A reboot is needed to activate the new firmware
|
Once the firmware update has completed, turn off the RPI and remove the SD Card, and mount into a reader connected to a computerto modify the RPI /boot/config.txt on the SD Card, with the following new line to this file.
Code Block |
---|
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.
Code Block |
---|
amixer cset numid=3 1 |
Now modify the volume db Range that Shairport uses by changing the configuration file:
Code Block |
---|
sudo vi /usr/local/etc/shairport-sync.conf |
Find
Code Block |
---|
// volume_range_db = 60 ;Copy |
Replace with
Code Block |
---|
volume_range_db = 30; |
Finally, reboot OpenFJ:
Code Block |
---|
sudo reboot |
GPS NMEA
Plug in the Garmin 296 GPS with a USB cable.
Does the RPI see the UPS?
Code Block |
---|
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
Code Block |
---|
sudo apt-get install gpsd gpsd-clients |
Deactivate gpsd
Code Block |
---|
sudo systemctl stop gpsd.socket
sudo systemctl disable gpsd.socket |
Start gpsd manually
Code Block |
---|
sudo gpsd /dev/ttyUSB0 -F /var/run/gpsd.sock |
Test (this may take several minutes to update, depending on GPS signal)
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) |
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 |
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:
Customize settings to access headless.
Install the SD card in the Raspberry Pi, find the IP address, and connect via ssh.
Code Block |
---|
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:
Code Block |
---|
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.
Code Block |
---|
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 11 (bullseye) 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://security.debian.org/debian-security bullseye-security InRelease
Hit:2 http://deb.debian.org/debian bullseye InRelease
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
Hit:4 http://archive.raspberrypi.org/debian bullseye 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
php7.4-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.30.2-1+deb11u2).
iw is already the newest version (5.9-3).
iw set to manually installed.
dhcpcd5 is already the newest version (1:8.1.2-1+rpt9).
The following package was automatically installed and is no longer required:
libfuse2
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
libjq1 libonig5 libqrencode4 lighttpd-mod-deflate lighttpd-mod-openssl
netfilter-persistent php-common php7.4-cli php7.4-common php7.4-json
php7.4-opcache php7.4-readline spawn-fcgi
Suggested packages:
rrdtool php-fpm apache2-utils lighttpd-doc lighttpd-mod-authn-gssapi
lighttpd-mod-authn-pam lighttpd-mod-authn-sasl lighttpd-mod-geoip
lighttpd-mod-maxminddb lighttpd-mod-trigger-b4-dl lighttpd-mod-vhostdb-pgsql
lighttpd-mod-webdav lighttpd-modules-dbi lighttpd-modules-ldap
lighttpd-modules-lua lighttpd-modules-mysql php-pear vnstati
The following NEW packages will be installed:
dnsmasq hostapd iptables-persistent isoquery jq libjq1 libonig5 libqrencode4
lighttpd lighttpd-mod-deflate lighttpd-mod-openssl netfilter-persistent
php-common php7.4-cgi php7.4-cli php7.4-common php7.4-json php7.4-opcache
php7.4-readline qrencode spawn-fcgi vnstat
0 upgraded, 22 newly installed, 0 to remove and 0 not upgraded.
Need to get 5,559 kB of archives.
After this operation, 27.6 MB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main arm64 hostapd arm64 2:2.9.0-21 [764 kB]
Get:2 http://deb.debian.org/debian bullseye/main arm64 netfilter-persistent all 1.0.15 [11.0 kB]
Get:3 http://deb.debian.org/debian bullseye/main arm64 iptables-persistent all 1.0.15 [12.4 kB]
Get:4 http://deb.debian.org/debian bullseye/main arm64 lighttpd arm64 1.4.59-1+deb11u2 [337 kB]
Get:5 http://deb.debian.org/debian bullseye/main arm64 vnstat arm64 2.6-3 [92.0 kB]
Get:6 http://deb.debian.org/debian bullseye/main arm64 dnsmasq all 2.85-1 [32.0 kB]
Get:7 http://deb.debian.org/debian bullseye/main arm64 isoquery arm64 3.2.4-1+deb11u1 [37.2 kB]
Get:8 http://deb.debian.org/debian bullseye/main arm64 libonig5 arm64 6.9.6-1.1 [176 kB]
Get:9 http://deb.debian.org/debian bullseye/main arm64 libjq1 arm64 1.6-2.1 [121 kB]
Get:10 http://deb.debian.org/debian bullseye/main arm64 jq arm64 1.6-2.1 [64.5 kB]
Get:11 http://deb.debian.org/debian bullseye/main arm64 libqrencode4 arm64 4.1.1-1 [39.4 kB]
Get:12 http://deb.debian.org/debian bullseye/main arm64 lighttpd-mod-deflate arm64 1.4.59-1+deb11u2 [9,012 B]
Get:13 http://deb.debian.org/debian bullseye/main arm64 lighttpd-mod-openssl arm64 1.4.59-1+deb11u2 [17.8 kB]
Get:14 http://deb.debian.org/debian bullseye/main arm64 php-common all 2:76 [15.6 kB]
Get:15 http://deb.debian.org/debian bullseye/main arm64 php7.4-common arm64 7.4.33-1+deb11u4 [999 kB]
Get:16 http://deb.debian.org/debian bullseye/main arm64 php7.4-json arm64 7.4.33-1+deb11u4 [18.2 kB]
Get:17 http://deb.debian.org/debian bullseye/main arm64 php7.4-opcache arm64 7.4.33-1+deb11u4 [179 kB]
Get:18 http://deb.debian.org/debian bullseye/main arm64 php7.4-readline arm64 7.4.33-1+deb11u4 [11.6 kB]
Get:19 http://deb.debian.org/debian bullseye/main arm64 php7.4-cli arm64 7.4.33-1+deb11u4 [1,302 kB]
Get:20 http://deb.debian.org/debian bullseye/main arm64 php7.4-cgi arm64 7.4.33-1+deb11u4 [1,266 kB]
Get:21 http://deb.debian.org/debian bullseye/main arm64 qrencode arm64 4.1.1-1 [41.9 kB]
Get:22 http://deb.debian.org/debian bullseye/main arm64 spawn-fcgi arm64 1.6.4-2 [14.1 kB]
Preconfiguring packages ...
Fetched 5,559 kB in 1s (4,283 kB/s)
Selecting previously unselected package hostapd.
(Reading database ... 156744 files and directories currently installed.)
Preparing to unpack .../00-hostapd_2%3a2.9.0-21_arm64.deb ...
Unpacking hostapd (2:2.9.0-21) ...
Selecting previously unselected package netfilter-persistent.
Preparing to unpack .../01-netfilter-persistent_1.0.15_all.deb ...
Unpacking netfilter-persistent (1.0.15) ...
Selecting previously unselected package iptables-persistent.
Preparing to unpack .../02-iptables-persistent_1.0.15_all.deb ...
Unpacking iptables-persistent (1.0.15) ...
Selecting previously unselected package lighttpd.
Preparing to unpack .../03-lighttpd_1.4.59-1+deb11u2_arm64.deb ...
Unpacking lighttpd (1.4.59-1+deb11u2) ...
Selecting previously unselected package vnstat.
Preparing to unpack .../04-vnstat_2.6-3_arm64.deb ...
Unpacking vnstat (2.6-3) ...
Selecting previously unselected package dnsmasq.
Preparing to unpack .../05-dnsmasq_2.85-1_all.deb ...
Unpacking dnsmasq (2.85-1) ...
Selecting previously unselected package isoquery.
Preparing to unpack .../06-isoquery_3.2.4-1+deb11u1_arm64.deb ...
Unpacking isoquery (3.2.4-1+deb11u1) ...
Selecting previously unselected package libonig5:arm64.
Preparing to unpack .../07-libonig5_6.9.6-1.1_arm64.deb ...
Unpacking libonig5:arm64 (6.9.6-1.1) ...
Selecting previously unselected package libjq1:arm64.
Preparing to unpack .../08-libjq1_1.6-2.1_arm64.deb ...
Unpacking libjq1:arm64 (1.6-2.1) ...
Selecting previously unselected package jq.
Preparing to unpack .../09-jq_1.6-2.1_arm64.deb ...
Unpacking jq (1.6-2.1) ...
Selecting previously unselected package libqrencode4:arm64.
Preparing to unpack .../10-libqrencode4_4.1.1-1_arm64.deb ...
Unpacking libqrencode4:arm64 (4.1.1-1) ...
Selecting previously unselected package lighttpd-mod-deflate.
Preparing to unpack .../11-lighttpd-mod-deflate_1.4.59-1+deb11u2_arm64.deb ...
Unpacking lighttpd-mod-deflate (1.4.59-1+deb11u2) ...
Selecting previously unselected package lighttpd-mod-openssl.
Preparing to unpack .../12-lighttpd-mod-openssl_1.4.59-1+deb11u2_arm64.deb ...
Unpacking lighttpd-mod-openssl (1.4.59-1+deb11u2) ...
Selecting previously unselected package php-common.
Preparing to unpack .../13-php-common_2%3a76_all.deb ...
Unpacking php-common (2:76) ...
Selecting previously unselected package php7.4-common.
Preparing to unpack .../14-php7.4-common_7.4.33-1+deb11u4_arm64.deb ...
Unpacking php7.4-common (7.4.33-1+deb11u4) ...
Selecting previously unselected package php7.4-json.
Preparing to unpack .../15-php7.4-json_7.4.33-1+deb11u4_arm64.deb ...
Unpacking php7.4-json (7.4.33-1+deb11u4) ...
Selecting previously unselected package php7.4-opcache.
Preparing to unpack .../16-php7.4-opcache_7.4.33-1+deb11u4_arm64.deb ...
Unpacking php7.4-opcache (7.4.33-1+deb11u4) ...
Selecting previously unselected package php7.4-readline.
Preparing to unpack .../17-php7.4-readline_7.4.33-1+deb11u4_arm64.deb ...
Unpacking php7.4-readline (7.4.33-1+deb11u4) ...
Selecting previously unselected package php7.4-cli.
Preparing to unpack .../18-php7.4-cli_7.4.33-1+deb11u4_arm64.deb ...
Unpacking php7.4-cli (7.4.33-1+deb11u4) ...
Selecting previously unselected package php7.4-cgi.
Preparing to unpack .../19-php7.4-cgi_7.4.33-1+deb11u4_arm64.deb ...
Unpacking php7.4-cgi (7.4.33-1+deb11u4) ...
Selecting previously unselected package qrencode.
Preparing to unpack .../20-qrencode_4.1.1-1_arm64.deb ...
Unpacking qrencode (4.1.1-1) ...
Selecting previously unselected package spawn-fcgi.
Preparing to unpack .../21-spawn-fcgi_1.6.4-2_arm64.deb ...
Unpacking spawn-fcgi (1.6.4-2) ...
Setting up lighttpd (1.4.59-1+deb11u2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/lighttpd.service → /lib/systemd/system/lighttpd.service.
Setting up php-common (2:76) ...
Created symlink /etc/systemd/system/timers.target.wants/phpsessionclean.timer → /lib/systemd/system/phpsessionclean.timer.
Setting up lighttpd-mod-openssl (1.4.59-1+deb11u2) ...
Setting up isoquery (3.2.4-1+deb11u1) ...
Setting up php7.4-common (7.4.33-1+deb11u4) ...
Creating config file /etc/php/7.4/mods-available/calendar.ini with new version
Creating config file /etc/php/7.4/mods-available/ctype.ini with new version
Creating config file /etc/php/7.4/mods-available/exif.ini with new version
Creating config file /etc/php/7.4/mods-available/fileinfo.ini with new version
Creating config file /etc/php/7.4/mods-available/ffi.ini with new version
Creating config file /etc/php/7.4/mods-available/ftp.ini with new version
Creating config file /etc/php/7.4/mods-available/gettext.ini with new version
Creating config file /etc/php/7.4/mods-available/iconv.ini with new version
Creating config file /etc/php/7.4/mods-available/pdo.ini with new version
Creating config file /etc/php/7.4/mods-available/phar.ini with new version
Creating config file /etc/php/7.4/mods-available/posix.ini with new version
Creating config file /etc/php/7.4/mods-available/shmop.ini with new version
Creating config file /etc/php/7.4/mods-available/sockets.ini with new version
Creating config file /etc/php/7.4/mods-available/sysvmsg.ini with new version
Creating config file /etc/php/7.4/mods-available/sysvsem.ini with new version
Creating config file /etc/php/7.4/mods-available/sysvshm.ini with new version
Creating config file /etc/php/7.4/mods-available/tokenizer.ini with new version
Setting up libqrencode4:arm64 (4.1.1-1) ...
Setting up qrencode (4.1.1-1) ...
Setting up php7.4-readline (7.4.33-1+deb11u4) ...
Creating config file /etc/php/7.4/mods-available/readline.ini with new version
Setting up dnsmasq (2.85-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/dnsmasq.service → /lib/systemd/system/dnsmasq.service.
Setting up hostapd (2:2.9.0-21) ...
Created symlink /etc/systemd/system/multi-user.target.wants/hostapd.service → /lib/systemd/system/hostapd.service.
Job for hostapd.service failed because the control process exited with error code.
See "systemctl status hostapd.service" and "journalctl -xe" for details.
Created symlink /etc/systemd/system/hostapd.service → /dev/null.
Setting up netfilter-persistent (1.0.15) ...
Created symlink /etc/systemd/system/multi-user.target.wants/netfilter-persistent.service → /lib/systemd/system/netfilter-persistent.service.
Setting up php7.4-opcache (7.4.33-1+deb11u4) ...
Creating config file /etc/php/7.4/mods-available/opcache.ini with new version
Setting up spawn-fcgi (1.6.4-2) ...
Setting up vnstat (2.6-3) ...
Created symlink /etc/systemd/system/multi-user.target.wants/vnstat.service → /lib/systemd/system/vnstat.service.
Setting up libonig5:arm64 (6.9.6-1.1) ...
Setting up lighttpd-mod-deflate (1.4.59-1+deb11u2) ...
Setting up php7.4-json (7.4.33-1+deb11u4) ...
Creating config file /etc/php/7.4/mods-available/json.ini with new version
Setting up libjq1:arm64 (1.6-2.1) ...
Setting up php7.4-cli (7.4.33-1+deb11u4) ...
update-alternatives: using /usr/bin/php7.4 to provide /usr/bin/php (php) in auto mode
update-alternatives: using /usr/bin/phar7.4 to provide /usr/bin/phar (phar) in auto mode
update-alternatives: using /usr/bin/phar.phar7.4 to provide /usr/bin/phar.phar (phar.phar) in auto mode
Creating config file /etc/php/7.4/cli/php.ini with new version
Setting up iptables-persistent (1.0.15) ...
update-alternatives: using /lib/systemd/system/netfilter-persistent.service to provide /lib/systemd/system/iptables.service (iptables.service) in auto mode
Setting up jq (1.6-2.1) ...
Setting up php7.4-cgi (7.4.33-1+deb11u4) ...
update-alternatives: using /usr/bin/php-cgi7.4 to provide /usr/bin/php-cgi (php-cgi) in auto mode
update-alternatives: using /usr/lib/cgi-bin/php7.4 to provide /usr/lib/cgi-bin/php (php-cgi-bin) in auto mode
Creating config file /etc/php/7.4/cgi/php.ini with new version
select() returned error: Inappropriate ioctl for device
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u7) ...
Processing triggers for php7.4-cli (7.4.33-1+deb11u4) ...
Processing triggers for php7.4-cgi (7.4.33-1+deb11u4) ...
[ ✓ 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]:
RaspAP Install: Creating ad blocking base configuration (Beta)
Creating /etc/raspap/adblock
Fetching latest hostnames list
/tmp/hostnames.txt 100%[===================>] 4.17M 4.74MB/s in 0.9s
Fetching latest domains list
/tmp/domains.txt 100%[===================>] 6.02M 1.42MB/s in 9.2s
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 package was automatically installed and is no longer required:
libfuse2
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
easy-rsa libccid libpkcs11-helper1 opensc opensc-pkcs11 pcscd
Suggested packages:
pcmciautils 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,213 kB of archives.
After this operation, 6,935 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main arm64 libccid arm64 1.4.34-1 [331 kB]
Get:2 http://deb.debian.org/debian bullseye/main arm64 pcscd arm64 1.9.1-1 [93.6 kB]
Get:3 http://deb.debian.org/debian bullseye/main arm64 easy-rsa all 3.0.8-1 [45.2 kB]
Get:4 http://deb.debian.org/debian bullseye/main arm64 libpkcs11-helper1 arm64 1.27-1 [44.9 kB]
Get:5 http://deb.debian.org/debian bullseye/main arm64 opensc-pkcs11 arm64 0.21.0-1 [776 kB]
Get:6 http://deb.debian.org/debian bullseye/main arm64 opensc arm64 0.21.0-1 [355 kB]
Get:7 http://deb.debian.org/debian bullseye/main arm64 openvpn arm64 2.5.1-3 [568 kB]
Preconfiguring packages ...
Fetched 2,213 kB in 2s (1,173 kB/s)
Selecting previously unselected package libccid.
(Reading database ... 157163 files and directories currently installed.)
Preparing to unpack .../0-libccid_1.4.34-1_arm64.deb ...
Unpacking libccid (1.4.34-1) ...
Selecting previously unselected package pcscd.
Preparing to unpack .../1-pcscd_1.9.1-1_arm64.deb ...
Unpacking pcscd (1.9.1-1) ...
Selecting previously unselected package easy-rsa.
Preparing to unpack .../2-easy-rsa_3.0.8-1_all.deb ...
Unpacking easy-rsa (3.0.8-1) ...
Selecting previously unselected package libpkcs11-helper1:arm64.
Preparing to unpack .../3-libpkcs11-helper1_1.27-1_arm64.deb ...
Unpacking libpkcs11-helper1:arm64 (1.27-1) ...
Selecting previously unselected package opensc-pkcs11:arm64.
Preparing to unpack .../4-opensc-pkcs11_0.21.0-1_arm64.deb ...
Unpacking opensc-pkcs11:arm64 (0.21.0-1) ...
Selecting previously unselected package opensc.
Preparing to unpack .../5-opensc_0.21.0-1_arm64.deb ...
Unpacking opensc (0.21.0-1) ...
Selecting previously unselected package openvpn.
Preparing to unpack .../6-openvpn_2.5.1-3_arm64.deb ...
Unpacking openvpn (2.5.1-3) ...
Setting up libccid (1.4.34-1) ...
Setting up pcscd (1.9.1-1) ...
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.27-1) ...
Setting up opensc-pkcs11:arm64 (0.21.0-1) ...
Setting up easy-rsa (3.0.8-1) ...
Setting up openvpn (2.5.1-3) ...
Created symlink /etc/systemd/system/multi-user.target.wants/openvpn.service → /lib/systemd/system/openvpn.service.
Setting up opensc (0.21.0-1) ...
Processing triggers for man-db (2.9.4-2) ...
Processing triggers for mailcap (3.69) ...
Processing triggers for desktop-file-utils (0.26-1) ...
Processing triggers for gnome-menus (3.36.0-1) ...
Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u7) ...
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 package was automatically installed and is no longer required:
libfuse2
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
wireguard-tools
The following NEW packages will be installed:
wireguard wireguard-tools
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 97.1 kB of archives.
After this operation, 332 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main arm64 wireguard-tools arm64 1.0.20210223-1 [88.9 kB]
Get:2 http://deb.debian.org/debian bullseye/main arm64 wireguard all 1.0.20210223-1 [8,164 B]
Fetched 97.1 kB in 0s (378 kB/s)
Selecting previously unselected package wireguard-tools.
(Reading database ... 157455 files and directories currently installed.)
Preparing to unpack .../wireguard-tools_1.0.20210223-1_arm64.deb ...
Unpacking wireguard-tools (1.0.20210223-1) ...
Selecting previously unselected package wireguard.
Preparing to unpack .../wireguard_1.0.20210223-1_all.deb ...
Unpacking wireguard (1.0.20210223-1) ...
Setting up wireguard-tools (1.0.20210223-1) ...
wg-quick.target is a disabled or a static unit, not starting it.
Setting up wireguard (1.0.20210223-1) ...
Processing triggers for man-db (2.9.4-2) ...
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/
mtb@openfj:~ $
mtb@openfj:~ $ sudo reboot |
The Quick installer will complete the steps in the manual installation for you.
After the 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.
Airtunes
This tutorial involves configuring the the open-source AirPlay receiver called Shairport Sync. Most of the contents found in in this section were directly lifted from here.
This software allows the Raspberry Pi to act as an AirPlay receiver by implementing Apple’s proprietary protocols so that it can stream music, from the output audio jack to the auxiliary input of the FJ’s amplifier.
This setup will allow you to play music from any AirPlay-enabled device to your Raspberry Pi meaning you can use any iPhone and some Android products with a compatible app installed.
First. we need to install several different packages, run the following commands on your Raspberry Pi to install all of the packages that we need.
Code Block |
---|
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.
Code Block |
---|
cd ~
git clone https://github.com/mikebrady/shairport-sync.git |
We can now build and install the Shairport software.
Code Block |
---|
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.
Code Block |
---|
make
sudo make install |
To enable the Shairport Sync software to start automatically at system startup:
Code Block |
---|
sudo systemctl enable shairport-sync |
Code Block |
---|
sudo service shairport-sync start |
Info |
---|
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.
Code Block |
---|
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 n/a n/a ││ Dload Upload Total Spent Left Speed 0 0 0 │ │ Speed Err0 (EPS): 0 n/a0 0 0 --:--:-- ││--:--:-- --:--:-- 0 26 144M 26 37.5M 0 0 5043k 0 0:00:29 │ │0:00:07 Track Err (EPD): n/a 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 Timelibraries offset: *** Updating SDK *** Running ldconfig *** Storing 0.025000578 s 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 │ │ Grid Square: |
Once the firmware update has completed, turn off the RPI and remove the SD Card, and mount into a reader connected to a computerto modify the RPI /boot/config.txt on the SD Card, with the following new line to this file.
Code Block |
---|
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.
Code Block |
---|
amixer cset numid=3 1 |
Now modify the volume db Range that Shairport uses by changing the configuration file:
Code Block |
---|
sudo vi /usr/local/etc/shairport-sync.conf |
Find
Code Block |
---|
// volume_range_db = 60 JN11bj86;Copy |
Replace with
Code Block |
---|
volume_range_db = ││ │ └─aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa┘└─eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee┘ |
Edit the gpsd configuration file:
Code Block |
---|
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" |
30; |
Finally, reboot OpenFJ:
Code Block |
---|
sudo reboot |
GPS NMEA
Plug in the Garmin 296 GPS with a USB cable.
Does the RPI see the UPS?
Code Block |
---|
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
Code Block |
---|
sudo apt-get install gpsd gpsd-clients |
Deactivate gpsd
Code Block |
---|
sudo systemctl enablestop gpsd.socket sudo systemctl startdisable gpsd.socket |
location
gpspipe -r
gpsbabel
foxtrotgps
gpsmon
time
sudo apg-get install ntp
sudo vi /etc/ntpsec/ntp.conf
ntpq -p
Routing
Start gpsd manually
Code Block |
---|
sudo gpsd /dev/ttyUSB0 -F /var/run/gpsd.sock |
Test (this may take several minutes to update, depending on GPS signal)
Code Block |
---|
cgps -s ┌─ssssssssssssssssssssssssssssssssssssssssss┐┌─aaaaaaaaaaaaaaaaaSeen 0/Used 0┐ │ Time: 2023-11-22T16:36:14.000Z (18)││GNSS PRN Elev Azim SNR Use│ │ Latitude: 41.d88888840120225 N 888888ba 88 8b ││ d8 88 │ │ 88Longitude: 8b a88aaaa8P' .d8888b. .d8888b. 88d888b2.15600508 88aaaaa88aE a88aaaa8P 88 8b. 88 ││ 88 Y8ooooo. 88 88 88 88 88 88 88 88. .88 88│ 88.│ Alt .88 88(HAE, MSL): 88 88 dPn/a, dP 88888P8n/a 88888P 88Y888P ││ 88 88 dP │ │ Speed: 88 0.07 km/h ││ dP version 3.0.2 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.2 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 Get:4 http://ftp.debian.org/debian buster-backports InRelease [51.4 kB] Hit:5 http://archive.raspberrypi.com/debian bookworm InRelease Hit:6 https://www.kismetwireless.net/repos/apt/release/bookworm bookworm InRelease Get:7 http://ftp.debian.org/debian buster-backports/main arm64 Packages [475 kB] Get:8 http://ftp.debian.org/debian buster-backports/main armhf Packages [471 kB] Get:9 http://ftp.debian.org/debian buster-backports/main Translation-en [410 kB] Fetched 1,408 kB in 4s (351 kB/s) Reading package lists... W: https://www.kismetwireless.net/repos/apt/release/bookworm/dists/bookworm/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details. 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~deb12u2). 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 dos2unix fio fonts-piboto grim gtk2-engines-clearlookspix gtk2-engines-pixbuf gtk2-engines-pixflat gui-pkinst ibverbs-providers libaio1 libaml0 libatkmm-1.6-1v5 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 printer-driver-escpr 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 120 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. 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 Synchronizing state of hostapd.service with SysV service script with /lib/systemd/systemd-sysv-install. Executing: /lib/systemd/systemd-sysv-install enable hostapd Created symlink /etc/systemd/system/multi-user.target.wants/hostapd.service → /lib/systemd/system/hostapd.service. [ ✓ 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 [ ✓ ok ] RaspAP Install: Configure ad blocking Install ad blocking and enable list management? [Y/n]: n [ ✓ ok ] (Skipped) 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 dos2unix fio fonts-piboto grim gtk2-engines-clearlookspix gtk2-engines-pixbuf gtk2-engines-pixflat gui-pkinst ibverbs-providers libaio1 libaml0 libatkmm-1.6-1v5 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 printer-driver-escpr 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 120 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]: n [ ✓ ok ] (Skipped) 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/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:
Code Block |
---|
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
Code Block |
---|
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
Code Block |
---|
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:
Code Block |
---|
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:
Code Block |
---|
sudo usermod -aG kismet pi sudo usermod -aG kismet mtb sudo reboot groups |
Device Support
Check for device support:
Code Block |
---|
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.
Code Block |
---|
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.
Code Block |
---|
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
Code Block |
---|
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
Code Block |
---|
sudo vi /etc/kismet/kismet_site.conf source=mon1 source=hci0 |
Start Kismet
Code Block |
---|
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