树莓派 usb wifi 开启热点

使用树莓派外接了一个 usb 随身wifi,用来做热点,但配置后发现 hostapd 启动异常,而树莓派 4B 自带的wifi模块却可以正常启动。

Oct 31 22:37:16 raspberrypi hostapd[5199]: Configuration file: /etc/hostapd/hostapd.conf
Oct 31 22:37:16 raspberrypi hostapd[5199]: nl80211: Could not configure driver mode
Oct 31 22:37:16 raspberrypi hostapd[5199]: nl80211: deinit ifname=wlan1 disabled_11b_rates=0
Oct 31 22:37:16 raspberrypi hostapd[5199]: nl80211 driver initialization failed.
Oct 31 22:37:16 raspberrypi hostapd[5199]: wlan1: interface state UNINITIALIZED->DISABLED
Oct 31 22:37:16 raspberrypi hostapd[5199]: wlan1: AP-DISABLED
Oct 31 22:37:16 raspberrypi hostapd[5199]: wlan1: CTRL-EVENT-TERMINATING
Oct 31 22:37:16 raspberrypi hostapd[5199]: hostapd_free_hapd_data: Interface wlan1 wasn't started
Oct 31 22:37:16 raspberrypi systemd[1]: hostapd.service: Control process exited, code=exited, status=1/FAILURE
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- An ExecStart= process belonging to unit hostapd.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 1.
Oct 31 22:37:16 raspberrypi systemd[1]: hostapd.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit hostapd.service has entered the 'failed' state with result 'exit-code'.
Oct 31 22:37:16 raspberrypi systemd[1]: Failed to start Advanced IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/EAP Authenticator.

感觉是树莓派本身自带的驱动不支持 master 模式。我使用的是小米随身 wifi,芯片是 mt7601,360随身wifi2代、小度wifi 也都一样。


树莓派新内核无法编译 mt7601u-ap,暂时没找到解决方法,下面的文字忽略。

看来是需要自己下载驱动源码,编译安装了。。

详细安装过程可参考: https://blog.csdn.net/sxyandapp/article/details/79542730

如发现类似报错 make[2]: *** /lib/modules/5.10.52-v7l+/build: No such file or directory. Stop.
参考: https://github.com/gnab/rtl8812au/issues/147

如发现raspbian No rule to make target \'arch/arm/tools/syscall.tbl\', needed by \'arch/arm/include/generated/uapi/asm/unistd-common.h\'. Stop 的错误,可以按说明方式安装 rpi-source (注意在运行时,可能会raw.githubusercontent.com无法访问,需要自己搭梯子了),https://github.com/RPi-Distro/rpi-source

原创文章,作者:ifee,如若转载,请注明出处:https://www.ifee.win/blog/2021/10/31/%e6%a0%91%e8%8e%93%e6%b4%be-usb-wifi-%e5%bc%80%e5%90%af%e7%83%ad%e7%82%b9/

发表评论

您的电子邮箱地址不会被公开。 必填项已用*标注