美文网首页
在树莓派上开启AP路由器并设置开关

在树莓派上开启AP路由器并设置开关

作者: GeniusWong | 来源:发表于2020-12-19 00:10 被阅读0次

一、采用了下面这个开源工程
https://github.com/oblique/create_ap

二、下载代码

sudo git clone https://github.com/oblique/create_ap
cd create_ap
sudo make install

运行完后,输入 create_ap -h 命令,有内容就说明安装成功了

三、安装依赖的库

sudo apt-get install util-linux procps hostapd iproute2 iw haveged dnsmasq

util-linux 是一个开放源码的软件包,是一个对任何 Linux 系统的基本工具套件其它的库都是干什么的有兴趣可以查一下

建议安装一下网络管理器

安装 NetworkManager 管理工具(可选) , 以支持nmcli命令,(其实用 network-manager 是可以开启Ap的,但是过程有点麻烦,只是使用 create_ap 更方便了)

sudo apt-get install -y network-manager

四、创建WiFi
创建wifi

sudo create_ap wlan0 eth0 热点名 密码
这里如果报错,要么是wifi没有打开,要么就是wifi正在连着其它路由器;点击wifi图标,看看正在连着哪个wifi,点一下关掉就行了。

关闭wifi

create_ap --stop wlan0

文中部分内容源自:
https://blog.csdn.net/chencaw/article/details/102856465
https://www.cnblogs.com/lifexy/p/10180653.html

相关文章

网友评论

      本文标题:在树莓派上开启AP路由器并设置开关

      本文链接:https://www.haomeiwen.com/subject/exlqnktx.html