树莓派3B创建WiFi热点

本文介绍如何使用树莓派创建WiFi热点。通过在树莓派上安装create_ap工具及必要的依赖库,可以轻松实现无线热点功能。文章还提供了开机自启的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

详见GitHub上的一个开源项目:
https://github.com/oblique/create_ap

在树莓派上具体操作步骤为:

1.将代码copy到本地,安装
git clone https://github.com/oblique/create_ap
cd create_ap
sudo make install
2.安装依赖的库
sudo apt-get install util-Linux procps hostapd iproute2 iw haveged dnsmasq

若安装不上,请先执行

sudo apt-get update
3.创建WiFi热点
sudo create_ap wlan0 eth0 热点名 密码

例如:

sudo create_ap wlan0 eth0 yuntai_pi 12345678
4.开机启动

将步骤3中创建WiFi热点的命令添加到/etc/rc.local当中,保存,然后reboot重启


#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
sudo create_ap wlan0 eth0 yuntai_pi 12345678
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
  printf "My IP address is %s\n" "$_IP"
fi

exit 0
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值