发自简书
1、格式化SD卡

2、写入镜像

3、开启 SSH 服务
如果通过 ssh 连接树莓派出现 Access denied 这个提示则说明 ssh 服务没有开启。要手动开启的话,和 WiFi 配置相似,同样在 boot 分区新建一个文件,空白的即可,文件命名为 ssh。注意要小写且不要有任何扩展名。

4、WiFi 网络配置
将刷好 Raspbian 系统的 SD 卡用电脑读取。在 boot 分区,也就是树莓派的 /boot 目录下新建 wpa_supplicant.conf 文件,按照下面的参考格式填入内容并保存 wpa_supplicant.conf 文件。
country=CN
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="wifi_name"
psk="wifi_password"
key_mgmt=WPA-PSK
priority=1
scan_ssid=1
}
network={
ssid="WiFi-B"
psk="12345678"
key_mgmt=WPA-PSK
priority=2
scan_ssid=1
}

5、xshell
xshell要破解,可以写一个脚本,改变系统时间,打开ssh,5秒后再改回去。
set nowdate=%date:~0,4%/%date:~5,2%/%date:~8,2% %date:~11,4%
echo %nowdate%
date 2019/8/11 周日
start "" "C:\Program Files (x86)\NetSarang\Xshell 6\Xshell.exe"
ping -n 5 127.0.0.1 > nul
date %nowdate%
这里start命令把加引号的路径当作标题,任意指定一个标题后再加路径。

树莓派的IP得先找到,先ping一下树莓派


用户名pi
密码raspberry


网友评论