# Plz set 'rpi3bplus_rpi4_wifi_firmware' and 'rpizerow_rpi3_wifi_firmware' in
# /etc/iiab/local_vars.yml to increase (or modify) the number of student WiFi
# 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!)

# 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

# ► SEE "MONITOR FIRMWARE UPDATES in 3 places especially" in tasks/download.yml ◄

- name: Install firmware (for RPi internal WiFi)
  include_tasks: install.yml
  when: firmware_installed is undefined

# Two variables are placed in /etc/iiab/iiab_state.yml:
#
# - firmware_downloaded (set in download.yml) is used in install.yml
#
# - firmware_installed (set in install.yml) isn't acted upon programmatically.
#   It serves as a very helpful rapid reminder in iiab_state.yml in the same
#   way as roles like: sshd, iiab-admin, pylibs, www_base, www_options.
