一。树莓派破解
断开蓝牙连接,打开串口连接:
1.config.txt最后一行加上:
dtoverlay=pi3-miniuart-bt 保存
2.cmdline.txt所有内容替换成:
dwc_otg.lpm_enable=0 console=tty1 console=serial0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
二。树莓派串口登录,并入网
1.使用nano编辑器(vi 没更新且不方便):sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
2.在下方加:
network={
ssid="你的无线网名字"
psk="密码"
key_mgmt=WPA-PSK//加密方式,可删掉
}
注:ctr o ,enter 保存 ctr x 退出。
sudo reboot 重新上电生效
3.ifcopnfig 查看树莓派此时的IP
4.固定树莓派IP:
sudo nano /etc/rc.local: 进入配置文件
ifconfig wlan0 192.168.xx.xx:在最后加上树莓派IP
sudo reboot :重新上电生效
三。打开ssh登录模式,使用ssh方式登录树莓派
1.sudo raspi-config
2.选择interfacing options
3.选择ssh,打开ssh
四。使用软件工具S-RTC登录树莓派
选择快速连接,选择ssh方式,输入树莓派固定的IP,输入树莓派用户名,确认,弹出用户名和密码,输入后勾选记住,确认完成。
五。更改源,树莓派默认使用国外的源,所以我们一般访问不到,需要改成自己的源。
1.sudo nano /etc/apt/sources.list
2.使用#号注释掉第一行:加上:deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi 保存退出
3.sudo apt-get update 更新源
4.sudo apt-get install vim 更新vim
总结自陈立臣老师的课,用于快速刷机。