WiFi Disconnected 'Association Expired'

My first ESP32 project, simply connecting an ESP32-CAM.

My Home Assistant is HAOS on a RasPi 4 - but for this I am using an intel PC with Ubuntu 21.10 and esphome version: 2022.3.2

Ran “esphome wizard ESP32-CAM.yaml”. Following other suggestions I have added a static IP and now have:

esphome:
  name: esp32-cam

esp32:
  board: esp32cam
  framework:
    type: arduino

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: "password"

ota:
  password: "password"

wifi:
  ssid: "erykah"
  password: "wifi password"
  power_save_mode: none

  # Optional manual IP
  manual_ip:
    static_ip: 192.168.1.123
    gateway: 192.168.1.1
    subnet: 255.255.255.0

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Esp32-Cam Fallback Hotspot"
    password: "password"

captive_portal:

Running “esphome -v run ESP32-CAM.yaml”, I get

========================================================================== [SUCCESS] Took 3.59 seconds ==========================================================================
INFO Successfully compiled program.
DEBUG Running:  esptool.py --before default_reset --after hard_reset --baud 460800 --port /dev/ttyUSB0 --chip esp32 write_flash -z --flash_size detect 0x10000 /home/don/.esphome/build/esp32-cam/.pioenvs/esp32-cam/firmware.bin 0x1000 /home/don/.platformio/packages/framework-arduinoespressif32/tools/sdk/bin/bootloader_dio_40m.bin 0x8000 /home/don/.esphome/build/esp32-cam/.pioenvs/esp32-cam/partitions.bin 0xe000 /home/don/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin
esptool.py v3.2
Serial port /dev/ttyUSB0
Connecting.....
Chip is ESP32-D0WD (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: a4:e5:7c:d5:4a:14
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash will be erased from 0x00010000 to 0x000fafff...
Flash will be erased from 0x00001000 to 0x00005fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x0000e000 to 0x0000ffff...
Compressed 959680 bytes to 533111...
Wrote 959680 bytes (533111 compressed) at 0x00010000 in 13.1 seconds (effective 584.9 kbit/s)...
Hash of data verified.
Compressed 17104 bytes to 11191...
Wrote 17104 bytes (11191 compressed) at 0x00001000 in 0.6 seconds (effective 236.2 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 144...
Wrote 3072 bytes (144 compressed) at 0x00008000 in 0.1 seconds (effective 401.5 kbit/s)...
Hash of data verified.
Compressed 8192 bytes to 47...
Wrote 8192 bytes (47 compressed) at 0x0000e000 in 0.1 seconds (effective 630.9 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
INFO Successfully uploaded program.
INFO Starting log output from /dev/ttyUSB0 with baud rate 115200

[17:32:58]ets Jun  8 2016 00:22:57
[17:32:58]
[17:32:58]rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[17:32:58]configsip: 0, SPIWP:0xee
[17:32:58]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[17:32:58]mode:DIO, clock div:2
[17:32:58]load:0x3fff0018,len:4
[17:32:58]load:0x3fff001c,len:1044
[17:32:58]load:0x40078000,len:10124
[17:32:58]load:0x40080400,len:5828
[17:32:58]entry 0x400806a8
[17:32:58]ets Jun  8 2016 00:22:57
[17:32:58]
[17:32:58]rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[17:32:58]configsip: 0, SPIWP:0xee
[17:32:58]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[17:32:58]mode:DIO, clock div:2
[17:32:58]load:0x3fff0018,len:4
[17:32:58]load:0x3fff001c,len:1044
[17:32:58]load:0x40078000,len:10124
[17:32:58]load:0x40080400,len:5828
[17:32:58]entry 0x400806a8
[17:33:07]ets Jun  8 2016 00:22:57
[17:33:07]
[17:33:07]rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[17:33:07]configsip: 0, SPIWP:0xee
[17:33:07]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[17:33:07]mode:DIO, clock div:2
[17:33:07]load:0x3fff0018,len:4
[17:33:07]load:0x3fff001c,len:1044
[17:33:07]load:0x40078000,len:10124
[17:33:07]load:0x40080400,len:5828
[17:33:07]entry 0x400806a8
[17:33:09]\xff[I][logger:214]: Log initialized
[17:33:09][C][ota:461]: There have been 1 suspected unsuccessful boot attempts.
[17:33:09][D][esp32.preferences:114]: Saving preferences to flash...
[17:33:09][I][app:029]: Running through setup()...
[17:33:09][C][wifi:037]: Setting up WiFi...
[17:33:09][D][wifi:373]: Starting scan...
[17:33:11][D][wifi:388]: Found networks:
[17:33:11][I][wifi:432]: - 'erykah' (64:66:B3:ED:08:C4) ▂▄▆█
[17:33:11][D][wifi:433]:     Channel: 1
[17:33:11][D][wifi:434]:     RSSI: -84 dB
[17:33:11][D][wifi:437]: - 'TelstraBA7ECC' (D4:35:1D:BA:7E:CC) ▂▄▆█
[17:33:11][D][wifi:437]: - 'Belong325DEE' (48:D2:4F:32:5D:F4) ▂▄▆█
[17:33:11][D][wifi:437]: - 'aitkenhome' (B0:39:56:C2:A6:9A) ▂▄▆█
[17:33:11][D][wifi:437]: - 'WiFi-5581' (10:27:F5:48:55:81) ▂▄▆█
[17:33:11][D][wifi:437]: - 'Vodafone2.4G-26526' (A4:91:B1:22:65:27) ▂▄▆█
[17:33:11][D][wifi:437]: - 'TPLINK_EXT' (F8:CA:59:39:44:29) ▂▄▆█
[17:33:11][D][wifi:437]: - 'Telstra16CF21' (D4:35:1D:16:CF:21) ▂▄▆█
[17:33:11][D][wifi:437]: - '' (FA:8F:CA:8A:3D:EF) ▂▄▆█
[17:33:11][D][wifi:437]: - 'Vodafone-2.4' (F8:CA:59:CC:C7:D0) ▂▄▆█
[17:33:11][D][wifi:437]: - '' (72:32:B1:FD:85:29) ▂▄▆█
[17:33:11][I][wifi:248]: WiFi Connecting to 'erykah'...
[17:33:13][W][wifi_esp32:495]: Event: Disconnected ssid='erykah' bssid=64:66:B3:ED:08:C4 reason='Association Expired'
[17:33:13][W][wifi:557]: WiFi Unknown connection status 0
[17:33:13][W][wifi:557]: WiFi Unknown connection status 0
[17:33:13][W][wifi:557]: WiFi Unknown connection status 0
[17:33:13][W][wifi:557]: WiFi Unknown connection status 0
[17:33:13][W][wifi:557]: WiFi Unknown connection status 0
[17:33:13][W][wifi:557]: WiFi Unknown connection status 0
[17:33:13][W][wifi:557]: WiFi Unknown connection status 0
[17:33:13][W][wifi:557]: WiFi Unknown connection status 0
[17:33:13][W][wifi:557]: WiFi Unknown connection status 0
[17:33:13][W][wifi:557]: WiFi Unknown connection status 0
[17:33:13][W][wifi:557]: WiFi Unknown connection status 0
[17:33:13][W][wifi:557]: WiFi Unknown connection status 0
[17:33:13][W][wifi:557]: WiFi Unknown connection status 0
[17:33:13][W][wifi:557]: WiFi Unknown connection status 0

It has compiled and downloaded. After reboot it seems to detect my wi-fi network - but immediately rejects it as “Association Expired”.

It looks from the github issues that “WiFi Unknown connection status” is a problem (or group of problems) which has been around a while.