0%

在树莓派3B上开启Wi-Fi热点

树莓派上开启热点,可以将树莓派当作无线路由器

  1. 准备: 树莓派3B,使用网线连接树莓派。
  2. 使用git下载github上的一个用于创建WIFI热点的开源项目,然后安装:
    git clone https://github.com/oblique/create_ap.git
    cd create_ap
    sudo make install
  3. 安装依赖:
    sudo apt-get install util-linux procps hostapd iproute2 iw haveged dnsmasq
  4. 开启热点:
    sudo create_ap wlan0 eth0 MyAccessPoint MyPassPhrase --daemon
    其中MyAccessPoint为热点名称,MyPassPhrase为wifi密码,请自行修改。如果不需要wifi密码,则不填写MyPassPhrase参数。 --daemon参数表示在后台运行。
  5. 如果不想每次运行都输入热点名称和密码,可以修改配置文件/etc/create_ap.conf。其中SSID字段为热点名称,PASSPHRASE字段为密码。
  6. 设置热点开机启动: sudo systemctl enable create_ap