Go to file
IrvingGao dc8ba69b8d update check wifi connetction 2024-05-25 00:24:51 +08:00
templates update 2024-05-19 20:30:23 +08:00
README.md update readme 2024-05-25 00:22:20 +08:00
start_hotpots.sh update 2024-05-21 01:42:24 +08:00
wifi_manager.py update check wifi connetction 2024-05-25 00:24:51 +08:00

README.md

Linux嵌入板卡自发热点连接无线网络

介绍

Linux嵌入板卡发出热点供客户端连接客户端通过浏览器访问热点连接到Linux嵌入板卡的热点并进行交互。

环境准备

(1) 安装依赖项:

sudo apt-get update
sudo apt-get install hostapd dnsmasq

(2) 克隆项目到本地并安装依赖:

// 克隆项目到本地 https or ssh
git clone http://43.132.157.186:3000/gaohz/wifi_hotpot.git
cd wifi_hotpot

(3) 安装Python端环境依赖

sudo pip install flask psutil

(4) 配置开机自启动服务项:

  • 编辑
sudo vim /etc/systemd/system/wifi_hotspot.service
  • 内容:
[Unit]
Description=WiFi Hotspot Wrapper
After=network.target
Wants=network.target

[Service]
Type=oneshot
ExecStart=python3 /home/orangepi/wifi_hotpot/wifi_manager.py
WorkingDirectory=/home/orangepi/wifi_hotpot
User=root

[Install]
WantedBy=default.target
  • 配置
sudo systemctl daemon-reload
sudo systemctl enable wifi_hotspot.service
# sudo systemctl disable wifi_hotspot.service
  • 开始(测试)
sudo systemctl start wifi_hotspot.service
  • 查看输出
sudo systemctl status wifi_hotspot.service

(5) 配置热点信息:

  • 手动连接http://192.168.12.1/

  • 连接成功后,输入用户名密码,即可进入交互界面。