menu LittleJake's Blog
color_lens
avatar
Jake Liu
Never Settle
creative commons by-nc-sa
hit
Category
keyboard_arrow_down

© 2024 LittleJake's Blog.

萌ICP备20223020号

openwrt的easymesh插件导致mtkwifi不启动

前言

由于第一次刷写的时候,用的是非闭源的wifi驱动,导致固件更换为闭源驱动的时候出现一堆问题。

刷写好闭源固件后,wifi在开机时不会自动启动。

目测仅适用于开源转闭源的情况。

因此,添加了一个开机脚本/etc/init.d/mtkwifi,并设置开机自启:

#!/bin/sh /etc/rc.common
# Example script
# Copyright (C) 2007 OpenWrt.org

START=90
STOP=10

start() {
        sleep 30
        chmod 0775 /sbin/mtkwifi
        /sbin/mtkwifi up
        # commands to launch application
}

stop() {
        echo donothing
        # commands to kill application
}

而后发现,启动后网络接口会无故重启。

解决问题

查询系统日志发现,网络接口会在easymesh启动的时候接口重启:

Sun Dec 12 01:07:15 2021 daemon.notice netifd: VLAN 'eth0.1' link is down
Sun Dec 12 01:07:15 2021 daemon.notice netifd: VLAN 'eth0.2' link is down
Sun Dec 12 01:07:15 2021 daemon.notice netifd: Network device 'eth0' link is down
Sun Dec 12 01:07:15 2021 daemon.notice netifd: Network device 'lo' link is down

经过思考,easymesh功能对于本人来说没有作用,因此直接将其删除。

解决方法1

转向软件包,移除luci-app-easymesh即可。

解决方法2

将脚本内的START=90设置为高于easymesh启动的START值,并设置sleep延时启动,也应该可以解决。

后记

由于这个问题,没有及时看系统日志,就简单粗暴的在crontab加上了每分钟启动mtkwifi up,导致wifi传输不稳定。

发现这个问题的契机还是路由器启动ping通后,会有一段时间突然不通然后又复通。

Buy me a beer
Jake Liu
Never Settle

Title: openwrt的easymesh插件导致mtkwifi不启动

Author: Jake Liu

Origin:

Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) For any re-post you must give appropriate credit.

文章遵循CC许可 署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0) 转载请注明出处

Tag:OpenWrt, wifi, mt7621, wifi不启动, mtkwifi

评论区

Add a new comment.

Theme