如何解决树莓派 SSH 待机一段时间后自动断开 bug All In One
raspberry pi 3 close wlan power management ✅
$ iwconfig
# Command to read the current power saving mode (Stretch)
$ sudo iw wlan0 get `power_save`
# Command to `power_save off`
$ sudo iw wlan0 set power_save off
# To make this permanent add the following line to `/etc/rc.local`
$ cat /etc/rc.local
# sudo 必须 ✅
$ sudo vim /etc/rc.local
# add below line
/sbin/iw dev wlan0 set power_save off
https://www.weigu.lu/sb-computer/raspi_tips_tricks/index.html#link_4
Raspberry Pi 关闭 WLAN 电池管理
防止 SSH 一段时间后自动断开连接
# view power management status
$ iwconfig
# edit config
$ sudo vim /etc/rc.local
# or
$ sudo nano /etc/rc.local
# add below line code before `exit 0`
iwconfig wlan0 power off
$ sudo reboot
# or
$ sudo shutdown -r now
# check power management status, again
$ iwconfig
同一个 WIFI 局域网无法互相 ping 通 ❌
SSH server 默认关闭了 ❓
# 显示器,开机后,在树莓派配置中将SSH开启即可。
$ sudo service ssh start
$ sudo service ssh status
# 配置自动开启 SSH ✅
$ sudo vim /etc/rc.local
# add below line
sudo service ssh start
raspberry pi ssh Host is down
https://raspberrypi.stackexchange.com/questions/41595/why-cant-i-ssh-to-raspbian-anymore
https://stackoverflow.com/questions/41318597/ssh-connection-refused-on-raspberry-pi
https://www.raspberrypi.com/documentation/computers/remote-access.html
solutions
- 关闭无线网卡电源管理
bug ❌
$ ls /sys/class/net/
# eth0 lo wlan0
$ ls /sys/class/net/wlan0/device/driver/module/drivers
# usb:rtl8192cu
# 8192cu
$ cat /sys/module/8192cu/parameters/rtw_power_mgnt
# 1
# 1 说明你的无线网卡的电源处于管理之下,为了`省电`会在不必要的时候关闭无线网卡
# 关闭电源管理
$ sudo touch /etc/modprobe.d/8192cu.conf
# vim / vscode
# Disable power management, 设置成 0
options 8192cu rtw_power_mgnt=0
# 立即重启 树莓派
$ sudo shutdown -r now
# 检查一下是否无线电源管理已经关闭
$ cat /sys/module/8192cu/parameters/rtw_power_mgnt
# 0
# 0 已经关闭电源管理了
树莓派3 关闭电源管理
✅ ???
# 查看 电源管理 状态
$ iwconfig
$ cat /etc/network/interfaces
$ vim /etc/network/interfaces
# 目标wlan里加一句
wireless-power off
# 重启
$ sudo reboot
# 或
$ sudo shutdown -r now
https://myblog.galaxymaxmetal.xyz/archives/64
https://www.cnblogs.com/cloudrivers/p/11496408.html
❌
https://gist.github.com/hofmannsven/9132419?permalink_comment_id=3159275#disable-power-management
https://www.raspberrypi-spy.co.uk/2015/06/how-to-disable-wifi-power-saving-on-the-raspberry-pi/
树莓派 3 & 截屏软件
# superuser do === sudo
$sudo apt-get ???
https://shumeipai.nxez.com/2019/07/30/how-to-take-a-screenshot-on-the-raspberry-pi.html
refs
https://mitnk.github.io/2016/01/fix-raspberry-pi-2-wifi-ssh-disconnect-issue/
https://askubuntu.com/questions/96333/what-wireless-driver-am-i-using
©xgqfrms 2012-2020
www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!
原创文章,版权所有©️xgqfrms, 禁止转载 ️,侵权必究⚠️!