1.执行脚本 ,执行完毕后重启服务器
bash <(curl -sSL https://gitee.com/xjxjin/scripts/raw/main/install_hi3798mv100_wifi.sh)
- 1
2. 继续执行脚本
如果不知道网卡类型,就选择默认,安装完毕后如果为识别出网卡,可以重新安装选择etv 类型
bash <(curl -sSL https://gitee.com/xjxjin/scripts/raw/main/install_hi3798mv100_wifi.sh)
- 1
3.检查网卡驱动安装是否正确
脚本执行完毕后执行 nmcli 在上图中没有wlan0网卡,说明网卡类型不是etv类型,需要重新执行脚本选择ftv类型,
bash <(curl -sSL https://gitee.com/xjxjin/scripts/raw/main/install_hi3798mv100_wifi.sh)
- 1
上图中出现了wlan0 说明驱动安装正确,可以执行命令 查看状态
4.查看网卡安装状态
nmcli device status
- 1
5.连接wifi
nmcli device wifi connect "WiFi名字" password "WiFi密码" ifname wlan0
- 1
6.其他功能,wifi 变热点
1.关闭 wifi (可选)
sudo ifconfig wlan0 down
- 1
2. 修改网卡地址 (可选)
sudo ifconfig wlan0 hw ether 48:e:ec:59:d1:76
- 1
3. 查看 wifi 名称
nmcli connection show
- 1
4.指定 wifi ip (可选)
sudo nmcli connection modify Hotspot ipv4.addresses 192.168.0.1/24 ipv4.method manual
- 1
5. 启动 wifi
sudo nmcli device wifi hotspot ifname wlan0 ssid "xxx" password "xxxx202201"
- 1
6. 将 wifi 流程通过有线网卡转发出去 (可选)
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
- 1
7. 查看热点名称和密码
nmcli dev wifi show-password
- 1
8. 安装 dhcp (可选)
sudo apt -y install dnsmasq
- 1
9.修改配置文件 (可选)
vim /etc/dnsmasq.conf
添加内容
port=5353
interface=wlan0
dhcp-range = 192.168.1.100,192.168.1.200,255.255.255.0
- 1
- 2
- 3
- 4
- 5
10.关闭 wifi (可选)
sudo nmcli connection down Hotspot
- 1
11.启动 wifi (可选)
sudo nmcli connection up Hotspot
- 1
结尾
参考了大佬的脚步,简化了安装步骤
参考来源:
https://bbs.histb.com/d/18-wifi