Access Point on Raspberry Pi OS - esp32 won't connect

Hello,

I will try to configure Access Point on Raspberry. But my esp won’t connect. There’s a problem with “Power Management”

It looks OK when:
On Raspberry set: nmcli con modify $CONN_NAME 802-11-wireless.powersave 3
And on esp:

wifi:
  power_save_mode: NONE

Of course the phone and laptop connect without problems.

But when i want to use bluetooth

  power_save_mode NONE is incompatible with esp32_ble_tracker. Please remove the power save mode. See also https://github.com/esphome/issues/issues/2141#issuecomment-865688582.

This is my Wifi configuration:

#!/bin/bash
CONN_NAME="RPIHotspot"
AP_SSID="RPI"
AP_PASS="RPItestRPI"
AP_IFACE="wlan0"
nmcli con delete $CONN_NAME
nmcli con add type wifi ifname $AP_IFACE mode ap con-name $CONN_NAME ssid $AP_SSID
nmcli con modify $CONN_NAME wifi.band bg
nmcli con modify $CONN_NAME autoconnect yes
nmcli con modify $CONN_NAME wifi-sec.key-mgmt wpa-psk
nmcli con modify $CONN_NAME wifi-sec.psk $AP_PASS
nmcli con modify $CONN_NAME ipv4.method shared
nmcli con modify $CONN_NAME ipv6.method disabled
# Disable: 2 - NM actively disables power save
# Enable: 3 - NM actively enables power save
# Ignore: 1 - NM ignores power save settings
# Default: 0 - NM uses the globally configured value (in NM)
nmcli con modify $CONN_NAME 802-11-wireless.powersave 3

Does anyone know how to solve the problem?

Was there a reason for having the power_save_mode within your YAML? It isn’t a requirement, what happens if you remove?

Just follow the instructions.

without power_save_mode i have 80-90% packet loss to esp32

  • NONE (least power saving, Default for ESP8266)
  • LIGHT (Default for ESP32)
  • HIGH (most power saving)

I think you’d be better investigating your packet loss issues. You haven’t posted your full yaml which would help but I don’t suppose you are trying to implement BLE tracker are you and have the following in your config?

esp32_ble_tracker:
  scan_parameters:
    interval: 1100ms
    window: 1100ms

If so remove the lines with interval and window from your file, 1100 is for wired Ethernet.

Otherwise show us your YAML

Andy