Skip to end of metadata
Go to start of metadata

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

Compare with Current View Page History

« Previous Version 5 Next »

RPI 3B (to start with)

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

Afterwords, update:

sudo apt update

Airtunes

This tutorial  involves configuring the the open-source AirPlay receiver called Shairport Sync. Most of the contents found in in this section were directly lifted from here.

This software allows the Raspberry Pi to act as an AirPlay receiver by implementing Apple’s proprietary protocols so that it can stream music, from the output audio jack to the auxiliary input of the FJ’s amplifier.

This setup will allow you to play music from any AirPlay-enabled device to your Raspberry Pi meaning you can use any iPhone and some Android products with a compatible app installed.

  1. First. we need to install several different packages, run the following commands on your Raspberry Pi to install all of the packages that we need.

sudo apt install autoconf libtool libdaemon-dev libasound2-dev libpopt-dev libconfig-dev
sudo apt install avahi-daemon libavahi-client-dev
sudo apt install libssl-dev 
  1. We will now clone the shairport-sync source to OpenFJ.

cd ~
git clone https://github.com/mikebrady/shairport-sync.git

We can now build and install the Shairport software.

cd shairport-sync
autoreconf -i -f
./configure --with-alsa --with-avahi --with-ssl=openssl --with-systemd --with-metadata

The autoreconf command setups the basic config file. The configure command further sets up the build system, telling it to utilize the ALSA audio backend, the Avahi network and set it to use OpenSSL for encryption.

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

make
sudo make install
  1. To enable the Shairport Sync software to start automatically at system startup:

sudo systemctl enable shairport-sync
sudo service shairport-sync start 

On an AirPlay-enabled device Openfj should appear in the devices list.

  1. There are several different things we can do to improve the sound quality. The first of these is to change update the RPI firmware to a newer version of the audio driver.

sudo rpi-update

 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
 *** Performing self-update
 *** Relaunching after update
 *** Raspberry Pi firmware updater by Hexxeh, enhanced by AndrewS and Dom
FW_REV:8e2a862c9c7a0cc5cd505c8f89761d723af8768c
 *** We're running for the first time
 *** Backing up files (this will take a few minutes)
 *** Backing up firmware
 *** Backing up modules 6.1.0-rpi4-rpi-v8
WANT_32BIT:0 WANT_64BIT:1 WANT_PI4:1 WANT_PI5:1
#############################################################
WARNING: This update bumps to rpi-6.1.y linux tree
See: https://forums.raspberrypi.com/viewtopic.php?t=344246

'rpi-update' should only be used if there is a specific
reason to do so - for example, a request by a Raspberry Pi
engineer or if you want to help the testing effort
and are comfortable with restoring if there are regressions.

DO NOT use 'rpi-update' as part of a regular update process.
##############################################################
Would you like to proceed? (y/N)
 *** Downloading specific firmware revision (this will take a few minutes)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
 26  144M   26 37.5M    0     0  5043k      0  0:00:29  0:00:07  0:00:22 6101k
100  144M  100  144M    0     0  5514k      0  0:00:26  0:00:26 --:--:-- 4939k
 *** Updating firmware
 *** Updating kernel modules
 *** depmod 6.1.63-v8-16k+
 *** depmod 6.1.63-v8+
 *** Updating VideoCore libraries
 *** Using SoftFP libraries
 *** Updating SDK
 *** Running ldconfig
 *** Storing current firmware revision
 *** Deleting downloaded files
 *** Syncing changes to disk
 *** If no errors appeared, your firmware was successfully updated to 8e2a862c9c7a0cc5cd505c8f89761d723af8768c
 *** A reboot is needed to activate the new firmware
  1. Once the firmware update has completed, turn off the RPI and remove the SD Card, and mount into a reader connected to a computerto modify the RPI /boot/config.txt on the SD Card, with the following new line to this file.

audio_pwm_mode=2
  1. Insure the analog jack is the main audio out and not the HDMI output.
    We can utilize the following command in the Raspberry Pi’s terminal to do this.

amixer cset numid=3 1
  1. Now modify the volume db Range that Shairport uses by changing the configuration file:

sudo vi /usr/local/etc/shairport-sync.conf

Find

//      volume_range_db = 60 ;Copy

Replace with

        volume_range_db = 30;
  1. Finally, reboot OpenFJ:

sudo reboot

GPS NMEA

  1. Plug in the Garmin 296 GPS with a USB cable.

Does the RPI see the UPS?

mtb@openfj:~ $ lsusb
Bus 001 Device 004: ID 091e:0003 Garmin International GPS (various models)
Bus 001 Device 005: ID 0424:7800 Microchip Technology, Inc. (formerly SMSC) 
Bus 001 Device 003: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Install gpsd

sudo apt-get install gpsd gpsd-clients  

Deactivate gpsd

sudo systemctl stop gpsd.socket
sudo systemctl disable gpsd.socket

Start gpsd manually

sudo gpsd /dev/ttyUSB0 -F /var/run/gpsd.sock

Test (this may take several minutes to update, depending on GPS signal)

cgps -s

┌─ssssssssssssssssssssssssssssssssssssssssss┐┌─aaaaaaaaaaaaaaaaaSeen  0/Used  0┐
│ Time:        2023-11-22T16:36:14.000Z (18)││GNSS   PRN  Elev   Azim   SNR Use│
│ Latitude:         41.40120225 N           ││                                 │
│ Longitude:         2.15600508 E           ││                                 │
│ Alt (HAE, MSL):        n/a,       n/a     ││                                 │
│ Speed:             0.07 km/h              ││                                 │
│ Track (true, var):   184.0,   1.0     deg ││                                 │
│ Climb:           n/a                      ││                                 │
│ Status:         2D FIX (5 secs)           ││                                 │
│ Long Err  (XDOP, EPX):  n/a ,  n/a        ││                                 │
│ Lat Err   (YDOP, EPY):  n/a ,  n/a        ││                                 │
│ Alt Err   (VDOP, EPV):  n/a , +/- 75.5 m  ││                                 │
│ 2D Err    (HDOP, CEP):  n/a , +/- 53.2 m  ││                                 │
│ 3D Err    (PDOP, SEP):  n/a , +/- 92.4 m  ││                                 │
│ Time Err  (TDOP):       n/a               ││                                 │
│ Geo Err   (GDOP):       n/a               ││                                 │
│ ECEF X, VX:              n/a    n/a       ││                                 │
│ ECEF Y, VY:              n/a    n/a       ││                                 │
│ ECEF Z, VZ:              n/a    n/a       ││                                 │
│ Speed Err (EPS):        n/a               ││                                 │
│ Track Err (EPD):        n/a               ││                                 │
│ Time offset:            0.025000578 s     ││                                 │
│ Grid Square:            JN11bj86          ││                                 │
└─aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa┘└─eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee┘

Edit the gpsd configuration file:

mtb@openfj:~ $ cat /etc/default/gpsd 

# Devices gpsd should collect to at boot time.
# They need to be read/writeable, either by user gpsd or the group dialout.
DEVICES=""

# Other options you want to pass to gpsd
START_DAEMON="true"
GPSD_OPTIONS="/dev/ttyUSB0"

# Automatically hot add/remove USB GPS devices via gpsdctl
USBAUTO="true"
GPSD_SOCKET="/var/run/gpsd.sock"

Enable the gpsd service

sudo systemctl enable gpsd.socket
sudo systemctl start gpsd.socket

location

gpspipe -r

gpsbabel

foxtrotgps

gpsmon

time

sudo apg-get install ntp

sudo vi /etc/ntpsec/ntp.conf

ntpq -p

Routing

mtb@OpenFJ:~ $ sudo 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.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/

LTE modem

https://imi-link.com/portfolio/im920d-4g-wifi-dongle/

OpenFJ static network configuration

sudo nmcli con mod "Wired connection 2" ipv4.gateway 192.168.100.1
sudo nmcli con mod "Wired connection 2" ipv4.dns "192.168.100.1"
sudo nmcli con mod "Wired connection 2" ipv4.dns "8.8.8.8"
sudo nmcli c down "Wired connection 2" && sudo nmcli c up "Wired connection 2"
  
nmcli -p connection show "Wired connection 2"

===============================================================================
                Connection profile details (Wired connection 2)
===============================================================================
connection.id:                          Wired connection 2
connection.uuid:                        6a579dd4-a352-3105-98b6-f6a819a3f200
connection.stable-id:                   --
connection.type:                        802-3-ethernet
connection.interface-name:              usb0
connection.autoconnect:                 yes
connection.autoconnect-priority:        -999
connection.autoconnect-retries:         -1 (default)
connection.multi-connect:               0 (default)
connection.auth-retries:                -1
connection.timestamp:                   1700673206
connection.read-only:                   no
connection.permissions:                 --
connection.zone:                        --
connection.master:                      --
connection.slave-type:                  --
connection.autoconnect-slaves:          -1 (default)
connection.secondaries:                 --
connection.gateway-ping-timeout:        0
connection.metered:                     unknown
connection.lldp:                        default
connection.mdns:                        -1 (default)
connection.llmnr:                       -1 (default)
connection.dns-over-tls:                -1 (default)
connection.mptcp-flags:                 0x0 (default)
connection.wait-device-timeout:         -1
connection.wait-activation-delay:       -1
-------------------------------------------------------------------------------
802-3-ethernet.port:                    --
802-3-ethernet.speed:                   0
802-3-ethernet.duplex:                  --
802-3-ethernet.auto-negotiate:          no
802-3-ethernet.mac-address:             --
802-3-ethernet.cloned-mac-address:      --
802-3-ethernet.generate-mac-address-mask:--
802-3-ethernet.mac-address-blacklist:   --
802-3-ethernet.mtu:                     auto
802-3-ethernet.s390-subchannels:        --
802-3-ethernet.s390-nettype:            --
802-3-ethernet.s390-options:            --
802-3-ethernet.wake-on-lan:             default
802-3-ethernet.wake-on-lan-password:    --
802-3-ethernet.accept-all-mac-addresses:-1 (default)
-------------------------------------------------------------------------------
ipv4.method:                            manual
ipv4.dns:                               8.8.8.8
ipv4.dns-search:                        --
ipv4.dns-options:                       --
ipv4.dns-priority:                      0
ipv4.addresses:                         192.168.100.69/24
ipv4.gateway:                           192.168.100.1
ipv4.routes:                            --
ipv4.route-metric:                      -1
ipv4.route-table:                       0 (unspec)
ipv4.routing-rules:                     --
ipv4.replace-local-rule:                -1 (default)
ipv4.ignore-auto-routes:                no
ipv4.ignore-auto-dns:                   no
ipv4.dhcp-client-id:                    --
ipv4.dhcp-iaid:                         --
ipv4.dhcp-timeout:                      0 (default)
ipv4.dhcp-send-hostname:                yes
ipv4.dhcp-hostname:                     --
ipv4.dhcp-fqdn:                         --
ipv4.dhcp-hostname-flags:               0x0 (none)
ipv4.never-default:                     no
ipv4.may-fail:                          yes
ipv4.required-timeout:                  -1 (default)
ipv4.dad-timeout:                       -1 (default)
ipv4.dhcp-vendor-class-identifier:      --
ipv4.link-local:                        0 (default)
ipv4.dhcp-reject-servers:               --
ipv4.auto-route-ext-gw:                 -1 (default)
-------------------------------------------------------------------------------
ipv6.method:                            auto
ipv6.dns:                               --
ipv6.dns-search:                        --
ipv6.dns-options:                       --
ipv6.dns-priority:                      0
ipv6.addresses:                         --
ipv6.gateway:                           --
ipv6.routes:                            --
ipv6.route-metric:                      -1
ipv6.route-table:                       0 (unspec)
ipv6.routing-rules:                     --
ipv6.replace-local-rule:                -1 (default)
ipv6.ignore-auto-routes:                no
ipv6.ignore-auto-dns:                   no
ipv6.never-default:                     no
ipv6.may-fail:                          yes
ipv6.required-timeout:                  -1 (default)
ipv6.ip6-privacy:                       -1 (unknown)
ipv6.addr-gen-mode:                     default
ipv6.ra-timeout:                        0 (default)
ipv6.mtu:                               auto
ipv6.dhcp-duid:                         --
ipv6.dhcp-iaid:                         --
ipv6.dhcp-timeout:                      0 (default)
ipv6.dhcp-send-hostname:                yes
ipv6.dhcp-hostname:                     --
ipv6.dhcp-hostname-flags:               0x0 (none)
ipv6.auto-route-ext-gw:                 -1 (default)
ipv6.token:                             --
-------------------------------------------------------------------------------
proxy.method:                           none
proxy.browser-only:                     no
proxy.pac-url:                          --
proxy.pac-script:                       --
-------------------------------------------------------------------------------
===============================================================================
       Active connection details (6a579dd4-a352-3105-98b6-f6a819a3f200)
===============================================================================
GENERAL.NAME:                           Wired connection 2
GENERAL.UUID:                           6a579dd4-a352-3105-98b6-f6a819a3f200
GENERAL.DEVICES:                        usb0
GENERAL.IP-IFACE:                       usb0
GENERAL.STATE:                          activated
GENERAL.DEFAULT:                        yes
GENERAL.DEFAULT6:                       no
GENERAL.SPEC-OBJECT:                    --
GENERAL.VPN:                            no
GENERAL.DBUS-PATH:                      /org/freedesktop/NetworkManager/ActiveConnection/6
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/Settings/6
GENERAL.ZONE:                           --
GENERAL.MASTER-PATH:                    --
-------------------------------------------------------------------------------
IP4.ADDRESS[1]:                         192.168.100.69/24
IP4.GATEWAY:                            192.168.100.1
IP4.ROUTE[1]:                           dst = 192.168.100.0/24, nh = 0.0.0.0, mt = 100
IP4.ROUTE[2]:                           dst = 0.0.0.0/0, nh = 192.168.100.1, mt = 100
IP4.DNS[1]:                             8.8.8.8
-------------------------------------------------------------------------------
IP6.ADDRESS[1]:                         fe80::9b9e:763e:c952:b6b4/64
IP6.GATEWAY:                            --
IP6.ROUTE[1]:                           dst = fe80::/64, nh = ::, mt = 1024
-------------------------------------------------------------------------------

FindMyCar

OBD-II - over bluetooth

Camera Module

ALPR

People counter

360?

Environmental sensors

SDL

pwnagotchi

kismet

From this tutorial,

Install the kismet packages:

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

sudo apt update
sudo apt install kismet

Add a kismet group and add a user:

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

Device Support

Check for device support:

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

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

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

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

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

Configure wireless adapter

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

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

sudo vi /etc/network/interfaces

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

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

sudo reboot

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

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

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

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

Configuring Kismet

Edit the kismet configuration file

sudo vi /etc/kismet/kismet_site.conf

source=mon1
source=hci0

Start Kismet

mtb@OpenFJ:~ $ kismet

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

WIGLE

TPMS

915Mhz sensor

  • No labels