树莓派 Linux 持续ping网关防止wifi掉线 nano /etc/systemd/system/network-ping-gateway.service 添加以下内容 # Save in /etc/systemd/system/network-ping-gateway.service [Unit] Description=Ping default network gateway service After=network-online.target [Service] ExecStart=/bin/bash -c 'read _ _ gateway _ < <(ip route list match 0/0); ping "$gateway"' Type=simple [Install] WantedBy=multi-user.target 执行 systemctl enable network-ping-gateway
树莓派 树莓派启动优化 关闭蓝牙 编辑/boot/config.txt添加 dtoverlay=disable-bt 或pi3B+对应选项 关闭蓝牙串口服务 sudo systemctl disable hciuart 关闭avahi sudo systemctl disable avahi-daemon 关闭启动时彩虹屏幕 编辑/boot/config.txt添加 # Disable the rainbow splash screen disable_splash=1
linux 树莓派4 OTG 以太网设置 编辑/boot/config.txt增加 dtoverlay=dwc2,dr_mode=peripheral 编辑/boot/cmdline.txt增加 modules-load=dwc2,g_ether 编辑/etc/modprobe.d/g_ether.conf写入 options g_ether use_eem=0 dev_addr=1a:55:89:a2:69:41 host_addr=1a:55:89:a2:69:42 idVendor=0x04b3 idProduct=0x4010
linux 树莓派Kiosk(展台模式)设置 安装Raspbian Buster lite 启用SSH boot分区下新建名称为ssh的空文本 添加WiFi信息 boot分区下新建wpa_supplicant.conf country=CN ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ ssid="NETWORK-NAME" psk="NETWORK-PASSWORD" } 设置自动启动 sudo raspi-config 菜单中选择 Boot Options Desktop CLI Console Autologin 更换自动登录用户 nano /etc/systemd/system/getty@tty1.service.d/autologin.conf 替换