
一般将树莓派作为WIFI热点使用会用到板载的有线网口接入互联网,然后配置内置或外接一块无线网卡为WIFI热点。树莓派4B上已有了有线网口和无线网卡。
创建WiFi热点使用的GitHub上一个开源项目:
https://github.com/oblique/create_ap
#将代码copy到本地,安装
git clone https://github.com/oblique/create_ap
cd create_ap
make install
#安装依赖的库
apt-get install util-linux procps hostapd iproute2 iw haveged dnsmasq
#创建WiFi热点(GitHub上有多种方式创建,可以查找自己需要的那种)
sudo create_ap wlan0eth0 热点名 密码
#开机启动
# 将sudo create_ap wlan0eth0 热点名 密码 添加到/etc/rc.local当中,即可开机启动