1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

roles/firmware for WiFi hotspot: Update in-line docs

This commit is contained in:
root 2023-02-25 15:41:08 -05:00
parent 4831fd6d7e
commit d09046b501
6 changed files with 30 additions and 23 deletions

View file

@ -1,9 +1,12 @@
# 2023-02-24: MONITOR FIRMWARE UPDATES in 3 places especially:
# 2023-02-25: MONITOR FIRMWARE UPDATES in 3 places especially...
#
# 1. apt changelog firmware-brcm80211
# https://github.com/RPi-Distro/firmware-nonfree
# http://archive.raspberrypi.org/debian/dists/bullseye/main/binary-arm64/Packages
# http://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree/firmware-brcm80211_*
# https://github.com/RPi-Distro/firmware-nonfree -> debian/config/brcm80211 (brcm, cypress)
# http://archive.raspberrypi.org/debian/dists/bullseye/main/binary-arm64/Packages (1.1MB text file, look inside for summary of latest firmware-brcm80211)
# http://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree/ -> firmware-brcm80211_* e.g.:
# https://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree/firmware-brcm80211_20190114-1+rpt11_all.deb from 2021-01-25
# https://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree/firmware-brcm80211_20210315-3+rpt4_all.deb from 2021-12-06
# http://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree/firmware-brcm80211_20221012-1~bpo11+1+rpt1_all.deb from 2022-11-17
# 2. apt changelog linux-firmware-raspi
# https://packages.ubuntu.com/search?keywords=linux-firmware-raspi
# 3. https://github.com/moodlebox/moodlebox/blob/main/roles/accesspoint/tasks/main.yml

View file

@ -81,7 +81,7 @@
- { src: 'iiab-check-firmware.service', dest: '/etc/systemd/system/', mode: '0644' }
- { src: 'iiab-firmware-warn.sh', dest: '/etc/profile.d/', mode: '0644' }
- name: Enable & (Re)Start iiab-check-firmware.service (also runs on each boot)
- name: Enable & (Re)Start iiab-check-firmware.service (also runs on each boot) -- creating our 2-or-4 key simlink chains e.g. /lib/firmware/cypress/X.{bin|blob} -> /lib/firmware/cypress/X.{bin|blob}.iiab -> CHOSEN-FIRMWARE-FILE-OR-LINK
systemd:
name: iiab-check-firmware.service
daemon_reload: yes

View file

@ -3,18 +3,22 @@
# client devices that can access your Raspberry Pi's internal WiFi hotspot.
# If IIAB's already installed, you should then run 'cd /opt/iiab/iiab' and
# then 'sudo ./runrole firmware' (do run iiab-check-firmware for more tips!)
# BACKGROUND AS OF 2022-01-10:
# https://github.com/iiab/iiab/issues/823#issuecomment-662285202
# https://github.com/iiab/iiab/issues/2853#issuecomment-957836892
# https://github.com/iiab/iiab/pull/3103
# https://github.com/RPi-Distro/firmware-nonfree/tree/bullseye/debian/config/brcm80211 (brcm, cypress)
# https://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree/firmware-brcm80211_20190114-1+rpt11_all.deb from 2021-01-25
# https://archive.raspberrypi.org/debian/pool/main/f/firmware-nonfree/firmware-brcm80211_20210315-3+rpt4_all.deb from 2021-12-06
# then 'sudo ./runrole firmware' (DO RUN iiab-check-firmware FOR MORE TIPS!)
# 2018-2023 Background & Progress:
#
# Raspberry Pi 3 used to support 32 WiFi connections but is now limited to [4-10]
# https://github.com/iiab/iiab/issues/823#issuecomment-662285202
# Opinions about Pi 4B/3B+ WiFi features [practical AP firmware for schools!]
# https://github.com/iiab/iiab/issues/2853#issuecomment-957836892
# RPi WiFi hotspot firmware reliability fix, incl new/better choices for 3B+ & 4
# https://github.com/iiab/iiab/pull/3103
# Set WiFi firmware in /lib/firmware/cypress due to RasPiOS & Ubuntu changes
# https://github.com/iiab/iiab/pull/3482
# RISK: What USB 3.0 stick/drive patterns degrade a Raspberry Pi's 2.4GHz WiFi?
# https://github.com/iiab/iiab/issues/2638
# https://github.com/iiab/iiab/issues/2638
# ► SEE "MONITOR FIRMWARE UPDATES in 3 places especially" in tasks/download.yml ◄
- name: Install firmware (for RPi internal WiFi)
include_tasks: install.yml

View file

@ -1,10 +1,10 @@
#!/bin/bash
# 2021-08-18: bash scripts using default_vars.yml &/or local_vars.yml
# 2023-02-25: bash scripts using default_vars.yml &/or local_vars.yml
# https://github.com/iiab/iiab-factory/blob/master/iiab
# https://github.com/iiab/iiab/blob/master/roles/firmware/templates/iiab-check-firmware#L10-14
# https://github.com/iiab/iiab/blob/master/roles/network/templates/gateway/iiab-gen-iptables#L48-L52
# https://github.com/iiab/maps/blob/master/osm-source/pages/viewer/scripts/iiab-install-map-region#L25-L34
# https://github.com/iiab/maps/blob/master/osm-source/pages/viewer/scripts/iiab-install-map-region#L23-L39
# https://github.com/iiab/iiab/blob/master/roles/openvpn/templates/iiab-support READS AND WRITES, INCL NON-BOOLEAN
iiab_var_value() {
@ -16,7 +16,7 @@ iiab_var_value() {
link_fw() {
if [[ $(readlink /lib/firmware/cypress/$1) != $1.iiab ]] ; then
echo
mv /lib/firmware/cypress/$1 /lib/firmware/cypress/$1.$(date +%F-%T)
mv /lib/firmware/cypress/$1 /lib/firmware/cypress/$1.$(date +%F-%T) # i.e. "doubly timestamping" to preserve BOTH last-modif & moving date
ln -s $1.iiab /lib/firmware/cypress/$1
echo -e "\e[1mSymlinked /lib/firmware/cypress/$1 -> $1.iiab\e[0m"
touch /tmp/.fw_modified
@ -36,7 +36,7 @@ fi
if [ -f /tmp/.fw_modified ]; then
bash /etc/profile.d/iiab-firmware-warn.sh
else
echo -e "\n\e[1mWiFi Firmware links in /lib/firmware/cypress appear \e[92mCORRECT\e[0m\e[1m, per iiab/iiab#2853.\e[0m"
echo -e "\n\e[1mWiFi Firmware links in /lib/firmware/cypress appear \e[92mCORRECT\e[0m\e[1m, per iiab/iiab#3482\e[0m"
echo
echo -e "\e[100;1m(No reboot appears necessary!)\e[0m"
echo

View file

@ -34,11 +34,11 @@ IPTABLES=/usr/sbin/iptables
IPTABLES_DATA=/etc/sysconfig/iptables
{% endif %}
# 2021-08-18: bash scripts using default_vars.yml &/or local_vars.yml
# 2023-02-25: bash scripts using default_vars.yml &/or local_vars.yml
# https://github.com/iiab/iiab-factory/blob/master/iiab
# https://github.com/iiab/iiab/blob/master/roles/firmware/templates/iiab-check-firmware#L10-14
# https://github.com/iiab/iiab/blob/master/roles/network/templates/gateway/iiab-gen-iptables#L48-L52
# https://github.com/iiab/maps/blob/master/osm-source/pages/viewer/scripts/iiab-install-map-region#L25-L34
# https://github.com/iiab/maps/blob/master/osm-source/pages/viewer/scripts/iiab-install-map-region#L23-L39
# https://github.com/iiab/iiab/blob/master/roles/openvpn/templates/iiab-support READS AND WRITES, INCL NON-BOOLEAN
# "awk '{print $2}'" almost works, but: (1) Fails to remove outer quotes, and

View file

@ -10,11 +10,11 @@ DEBUG=false # Using /usr/bin/true or /usr/bin/false
PLAYBOOK="install-support.yml"
INVENTORY="ansible_hosts"
# 2021-08-18: bash scripts using default_vars.yml &/or local_vars.yml
# 2023-02-25: bash scripts using default_vars.yml &/or local_vars.yml
# https://github.com/iiab/iiab-factory/blob/master/iiab
# https://github.com/iiab/iiab/blob/master/roles/firmware/templates/iiab-check-firmware#L10-14
# https://github.com/iiab/iiab/blob/master/roles/network/templates/gateway/iiab-gen-iptables#L48-L52
# https://github.com/iiab/maps/blob/master/osm-source/pages/viewer/scripts/iiab-install-map-region#L25-L34
# https://github.com/iiab/maps/blob/master/osm-source/pages/viewer/scripts/iiab-install-map-region#L23-L39
# https://github.com/iiab/iiab/blob/master/roles/openvpn/templates/iiab-support READS AND WRITES, INCL NON-BOOLEAN
# PARSE local_vars.yml JUST AS Ansible & /etc/openvpn/scripts/announcer DO: