[Share Experiences] deepin23b3 使用create_ap 创建ap热点记录
Tofloor
poster avatar
deepin
2024-04-01 17:57
Author

安装 create_ap

参考 https://wiki.deepin.org/zh/%E5%BE%85%E5%88%86%E7%B1%BB/03_%E6%8C%89%E7%9F%A5%E8%AF%86%E7%82%B9%E7%AD%89%E7%BA%A7%E5%88%92%E5%88%86/02_%E6%B7%B1%E5%85%A5/01_WIFI%E7%9B%B8%E5%85%B3/Deepin%E7%94%A8Create_ap%E5%BB%BA%E7%83%AD%E7%82%B9

一路确认,安装过程略

一些问题

启动时报错:

ERROR: Your adapter can not transmit to channel 149, frequency band 5GHz.

解决:进入设置>网络,关闭无线网络,然后执行命令开启热点

快捷脚本

#!/bin/bash
arg="$1"
if [ -z "$arg" ]; then
  arg="start"
fi
echo "arg=$arg"

logFile=/var/log/wifi.log
wifi_name="ChinaNet-binC"
wifi_password="12345678"

case $arg in
start)
  echo "start create_ap"
  sudo bash -c "nohup create_ap wlo1 enp44s0 '$wifi_name' '$wifi_password' >'$logFile' 2>&1 &"
  exec tail -f "$logFile"
  ;;
stop)
  echo "stop create_ap"
  sudo create_ap --stop wlo1
  ;;
log)
  echo "log create_ap"
  exec tail -f "$logFile"
  ;;
? | help)
  echo "Usage: $0 [start|stop|log]"
  ;;
esac
#sudo create_ap wlo1 enp44s0 ChinaNet-binC 12345678
#sudo create_ap --stop wlo1
Reply Favorite View the author
All Replies

No replies yet