🪶山间笔记hillside notes

COMFAST CF-WU810N 网卡驱动Linux编译并设置ap

2 分钟阅读 · 558 字5 次浏览编辑

COMFAST CF-WU810N网卡驱动Linux编译并设置ap

一、RTL8188EUS驱动编译

1.1 设备检查

[root@localhost create_ap-0.4.6]# lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 0bda:8179 Realtek Semiconductor Corp. RTL8188EUS 802.11n Wireless Network Adapter
# 可以查看到此无线的对应网卡芯片为RTL8188EUS

1.2 驱动下载

https://github.com/AdminMaxBomz/rtl8188eus # 经测试此驱动可在centos7.9上编译成功并设置ap

git clone https://github.com/AdminMaxBomz/rtl8188eus

1.3 编译环境安装

yum -y install make gcc kernel-headers kernel-devel

1.4 驱动编译

cd rtl8188eus
make && make install

1.5 驱动加载

编译安装完成后需重启系统将自动加载模块。如不想重启可使用insmod <path/8188eu.ko>指定路径加载或者使用modprobe 8188eu加载。 驱动编译完成后在其他host上可以将8188eu.ko拷过去然后执行以下命令即可

install -p -m 644 8188eu.ko  /lib/modules/3.10.0-1160.el7.x86_64/kernel/drivers/net/wireless/
/sbin/depmod -a 3.10.0-1160.el7.x86_64

1.6 查看网卡

ifconfig
# 即可查看到对应无线网卡,如没有的话尝试ifconfig -a查看网卡是否激活
ifconfig 网卡名 up
进行激活

二、创建ap

2.1 相关软件安装

yum -y install hostapd dnsmasq wireless-tools

软件说明:hostap 用于创建ap dnsmasq 提供dhcp和dns功能 wireless-tools 无线管理工具

2.2 create_ap安装

https://github.com/oblique/create_ap

git clone https://github.com/oblique/create_ap

cd create_ap
make install 

2.3 开启网卡master模式

iwconfig wlan0 mode master
默认为auto修改为master
查看网卡模式是否修改成功
iwconfig wlan0
wlan0     IEEE 802.11bgn  ESSID:"gstarr_2d6558"  Nickname:"<WIFI@REALTEK>"
          Mode:Master  Frequency:2.412 GHz  Access Point: E0:E1:A9:91:C8:AE   
          Bit Rate:72.2 Mb/s   Sensitivity:0/0

2.4 创建ap

在make install 时已经创建好systemctl的配置文件 进行修改

[root@localhost ~]# cat /usr/lib/systemd/system/create_ap.service 
[Unit]
Description=Create AP Service
After=network.target

[Service]
Type=simple
ExecStart=/usr/bin/create_ap --ieee80211n --ht_capab '[HT40+]' wlan0 eth4 gstarr_2d6558 12345678
KillSignal=SIGINT
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target
[root@localhost ~]# systemctl start create_ap

启动参数解释/usr/bin/create_ap --ieee80211n --ht_capab '[HT40+]' wlan0 eth4 gstarr_2d6558 12345678 --ieee80211n 为启用 IEEE 802.11n wlan0 无线网卡名称 eth4 可供外网的网卡 gstarr_2d6558 ssid ap热点名称 12345678 密码

相关笔记

1 分钟阅读93 字

Typecho 新版本打开后台404问题

Nginx服务器点击前台链接或者后台登录时出现 404, not found 官方给的解决方式是一般的出现这种情况时, nginx.conf 里的 location 设置都是类似这样 要支持pathinfo,要改成 在某些老版本的php里面

继续阅读