Yapay zekâ tarafından English dilinden çevrildi ·
Ekran kararması bunu yapmaz. Pi’nin Broadcom çipinde klasik Wi-Fi güç tasarrufu var; bir pompa odasındaki Pi 3B+ ile aynı sorunu yaşamıştım. Pi uyumuyor, Wi-Fi uyuyor ve gelen paketler gecikiyor ya da kayboluyor. paho istemcin her 60 sn’de bir ping gönderiyor, yanıt zamanında dönmüyor, Hermetry keepalive süresi içinde hiçbir şey görmüyor ve oturumu kapatıyor; bu yüzden keepalive_timeout. SSH bağlantın radyoyu uyandırıyor, bu yüzden her şey o anda geri geliyor.
Kontrol et:
iw wlan0 get power_save
Power save: on
Bookworm’da NetworkManager ile kalıcı olarak kapatmak için:
sudo tee /etc/NetworkManager/conf.d/wifi-powersave.conf <<EOF
[connection]
wifi.powersave = 2
EOF
sudo systemctl restart NetworkManager
(2 kapalı anlamına gelir.) dhcpcd kullanan eski bir imajdaysan, iw wlan0 set power_save off komutunu ağ ayağa kalktıktan sonra çalışan bir betiğe koy.
Ayrıca istemcinin kendi kendine yeniden bağlanmasını sağla: client.reconnect_delay_set(1, 120) ve loop_forever ya da loop_start kullan; böylece kısa bir kopma kendiliğinden düzelir.
Screen blanking won’t do it. Classic Wi-Fi power saving on the Pi’s Broadcom chip, I had the same with a Pi 3B+ in a pump house. The Pi doesn’t sleep, the Wi-Fi does, and incoming packets get delayed or lost. Your paho client sends a ping every 60 s, the answer doesn’t come back in time, Hermetry sees nothing within the keepalive and closes the session, hence keepalive_timeout. Your SSH wakes the radio up, which is why everything comes back then.
Check it:
iw wlan0 get power_save
Power save: on
Turn it off for good on Bookworm with NetworkManager:
sudo tee /etc/NetworkManager/conf.d/wifi-powersave.conf <<EOF
[connection]
wifi.powersave = 2
EOF
sudo systemctl restart NetworkManager
(2 means disabled.) If you’re on an older image with dhcpcd, put iw wlan0 set power_save off in a script that runs after the network is up.
Also make your client reconnect on its own: client.reconnect_delay_set(1, 120) and loop_forever or loop_start, so a short drop fixes itself.

