Rexdf

The devil is in the Details.

树莓派笔记

| Comments

一些碎片笔记,主要是Debian的网络相关。

1. Upgrade Raspbian Stretch to Buster

Debian的升级不像Ubuntu那样有一个do-release-upgrade

基本思路是,改源然后upgrade就好。

$ sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list
$ sudo sed -i 's/stretch/buster/g' /etc/apt/sources.list.d/raspi.list
$ grep -lnr stretch /etc/apt
$ sudo apt-get remove apt-listchanges
sudo apt-get update && sudo apt-get full-upgrade -y && sudo apt-get autoremove -y --purge && sudo apt-get autoclean
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 04EE7237B7D453EC 648ACFD622F3D138 EF0F382A1A7B6500 DCC9EFBF77E11517

2. 首次安装

这里下载最新的镜像zip,然后解压得到img文件。

lsblk -p

umount /dev/sda1

用盘符而不是分区

sudo dd bs=4M if=2020-08-20-raspios-buster-armhf-full.img of=/dev/sdX conv=fsync

sudo eject /dev/sda

一个tips,wifi的国家代码会影响到wifi的可用频段,比如5G连不上。

country=AU
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
	ssid="MyWiFiNetwork"
	psk="aVeryStrongPassword"
	key_mgmt=WPA-PSK
}

3. 网络的一些命令

iwlist channel

https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md

iw

https://www.cnblogs.com/liuliu-word/p/9646060.html

https://blog.csdn.net/u010164190/article/details/68942070

wifi自动睡眠

因为进行了几次 rpi-update 进行了固件升级,导致的问题。wifi一会儿就自动断网了。

iwconifg
sudo iw wlan0 set power_save off
iwconfig

主要是看到Power Management:off就好了

Ad-hoc networking

https://wiki.archlinux.org/index.php/Ad-hoc_networking

https://www.raspberrypi.org/documentation/configuration/wireless/access-point-routed.md

https://github.com/simondlevy/RPiAdHocWiFi

Comments