OpenWRT小米路由器Mini – 不支持所上传的文件格式请确认选择的文件无误

今天尝试给小米路由器mini(MT7620a)上的自编译openwrt刷入原版镜像,后台升级出现上述错误。

遂尝试sysupgrade,依然无法刷入:

Device xiaomi,miwifi-mini not supported by this image
Supported devices: miwifi-mini
Image check ‘fwtool_check_image’ failed.

解决方案也很简单。编辑/lib/upgrade/fwtool.sh

将46行的device="$(cat /tmp/sysinfo/board_name)"修改为device="miwifi-mini"即可。

解决Unbound报错unknown keyword ‘tls-*’

在配置Unbound时遇到如下错误:

/etc/unbound/unbound.conf:16: error: unknown keyword 'tls-service-key' 
/etc/unbound/unbound.conf:16: error: stray ':' 
/etc/unbound/unbound.conf:16: error: stray '"' 
/etc/unbound/unbound.conf:16: error: unknown keyword 'key.pem' 
/etc/unbound/unbound.conf:16: error: stray '"' 
/etc/unbound/unbound.conf:17: error: unknown keyword 'tls-service-pem' 
/etc/unbound/unbound.conf:17: error: stray ':' 
/etc/unbound/unbound.conf:17: error: stray '"' 
/etc/unbound/unbound.conf:17: error: unknown keyword 'fullchain.pem' 
/etc/unbound/unbound.conf:17: error: stray '"' 
/etc/unbound/unbound.conf:18: error: unknown keyword 'tls-port' 
/etc/unbound/unbound.conf:18: error: stray ':' 
/etc/unbound/unbound.conf:18: error: unknown keyword '853' 
read /etc/unbound/unbound.conf failed: 13 errors in configuration file [1579421749] unbound[17698:0] fatal error: Could not read config file: /etc/unbound/unbound.conf

搜寻后得知是官方文档有变更,将tls全部改为ssl即可。

树莓派WiFi设置静态IP

ifconfig查看网络接口:

此处选择wlan0

编辑/etc/network/interfaces

修改或添加以下内容:

auto wlan0
 iface wlan0 inet manual
 wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

注意不能写成iface wlan0 inet dhcp,否则dhcpcd不会生效。

编辑/etc/dhcpcd.conf

在文件末尾添加以下内容:

interface wlan0
 static ip_address=192.168.1.100/24
 static routers=192.168.1.1
 static domain_name_servers=192.168.1.1

修改wlan0为你的网络接口,ip_address为你的IP地址,routers为你的网关,domain_name_servers为你的dns。

完成后重启系统即可。