EP-DB1608无线网卡安装linux驱动

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了EP-DB1608无线网卡安装linux驱动相关的知识,希望对你有一定的参考价值。


OS环境: Centos-7.2-x86_64

无线网卡:EP-DB1608

技术分享


1.系统环境准备

#关闭selinux

sed -i ‘s/SELINUX=enforcing/SELINUX=disabled/‘ /etc/selinux/config

setenforce 0


#安装一大堆库

yum -y install libtool zlib* glib*


2.进入安装

[[email protected] linux]# ls

android_ref_codes_JB_4.2  document  install.sh  readme.txt        WiFi_Direct_User_Interface  wpa_supplicant_hostapd

android_ref_codes_KK_4.4  driver    mp_tools    ReleaseNotes.pdf  wireless_tools

[[email protected] linux]# chmod +x install.sh

[[email protected] linux]# ./install.sh

... ...

make: *** /lib/modules/3.10.0-327.el7.x86_64/build: 没有那个文件或目录

... ...


解决思路:

切换到其目录下:

[[email protected] linux]# cd /lib/modules/3.10.0-

3.10.0-327.el7.x86_64/     3.10.0-514.2.2.el7.x86_64/

[[email protected] linux]# cd /lib/modules/3.10.0-514.2.2.el7.x86_64/

[[email protected] 3.10.0-514.2.2.el7.x86_64]# ls

build   modules.alias      modules.builtin      modules.dep.bin  modules.modesetting  modules.softdep      source   weak-updates

extra   modules.alias.bin  modules.builtin.bin  modules.devname  modules.networking   modules.symbols      updates

kernel  modules.block      modules.dep          modules.drm      modules.order        modules.symbols.bin  vdso

[[email protected] 3.10.0-514.2.2.el7.x86_64]# ls -lhd build

lrwxrwxrwx 1 root root 42 12月 28 10:19 build -> /usr/src/kernels/3.10.0-514.2.2.el7.x86_64


解决办法:

[[email protected] linux]# ln -s /usr/src/kernels/3.10.0-514.2.2.el7.x86_64 /lib/modules/3.10.0-327.el7.x86_64/build


然后再次执行

[[email protected] linux]# ./install.sh

一切顺利,然后查看网卡,这里节省篇幅,就不显示全部了,

[[email protected] linux]# ip link

... ...

11: enp0s20u2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DORMANT qlen 1000

link/ether e8:4e:06:40:cc:10 brd ff:ff:ff:ff:ff:ff

... ...


假如是上面图片里型号的网卡,可以对比一下网卡的MAC地址(e8:4e:06)这个是每个厂商唯一的标识由专门的组织去规划,然后你就可以确认这个是你需要的无线网卡啦,我一开始也不知道这样装完就好了,直到我装第二遍。。。 。。。



3.扫描周围的wifi信号

再次进入到光盘提供的驱动目录下

[[email protected] linux]# ls

android_ref_codes_JB_4.2  document  install.sh  readme.txt        WiFi_Direct_User_Interface  wpa_supplicant_hostapd

android_ref_codes_KK_4.4  driver    mp_tools    ReleaseNotes.pdf  wireless_tools

[[email protected] linux]# cd wireless_tools/

[[email protected] wireless_tools]# ls

wireless_tools.30.rtl.tar.gz

[[email protected] wireless_tools]# tar -xf wireless_tools.30.rtl.tar.gz

[[email protected] wireless_tools]# cd wireless_tools.30.rtl/

[[email protected] wireless_tools.30.rtl]# make && make install


注意下面红色的字体


... ...

install -m 755 -d /usr/local/lib

install -m 644 libiw.a /usr/local/lib

install -m 755 -d /usr/local/sbin

install -m 755 iwconfig iwlist iwpriv iwspy iwgetid iwevent ifrename /usr/local/sbin

install -m 755 -d /usr/local/include

install -m 644 iwlib.h /usr/local/include

install -m 644 wireless.h /usr/local/include

for lang in . cs fr.*; do \

install -m 755 -d /usr/local/man/$lang/man8/; \

install -m 644 $lang/iwconfig.8 iwlist.8 iwpriv.8 iwspy.8 iwgetid.8 iwevent.8 ifrename.8 /usr/local/man/$lang/man8/; \

install -m 755 -d /usr/local/man/$lang/man7/; \

install -m 644 $lang/wireless.7 /usr/local/man/$lang/man7/; \

install -m 755 -d /usr/local/man/$lang/man5/; \

install -m 644 $lang/iftab.5 /usr/local/man/$lang/man5/; \

done


记得返回下执行结果

[[email protected] wireless_tools.30.rtl]# echo $?

结果为    0     表示正确


[[email protected] wireless_tools.30.rtl]# cd /usr/local/sbin/

[[email protected] sbin]# ll

总用量 3172

-rwxr-xr-x 1 root root   57928 12月 28 11:17 ifrename

-rwxr-xr-x 1 root root   50864 12月 28 11:17 iwconfig

-rwxr-xr-x 1 root root   42456 12月 28 11:17 iwevent

-rwxr-xr-x 1 root root   37912 12月 28 11:17 iwgetid

-rwxr-xr-x 1 root root   55816 12月 28 11:17 iwlist

-rwxr-xr-x 1 root root   37688 12月 28 11:17 iwpriv

-rwxr-xr-x 1 root root   37664 12月 28 11:17 iwspy


扫描周围wifi信号

[[email protected] linux]# iwlist enp0s20u6 scanning

enp0s20u6  Scan completed :

Cell 01 - Address: 00:06:F4:BD:6E:F1

ESSID:"sspaas.com"

Protocol:IEEE 802.11bgn

Mode:Master

Frequency:2.412 GHz (Channel 1)

Encryption key:on

Bit Rates:130 Mb/s

Extra:wpa_ie=dd180050f20101000050f20401000050f20401000050f2020000

IE: WPA Version 1

Group Cipher : CCMP

Pairwise Ciphers (1) : CCMP

Authentication Suites (1) : PSK

Extra:

IE: IEEE 802.11i/WPA2 Version 1

Group Cipher : CCMP

Pairwise Ciphers (1) : CCMP

Authentication Suites (1) : PSK

Quality=100/100  Signal level=100/100

Extra:fm=0003

... ...


这一步仅仅是扫描而已,并没有去连接



4.连接扫描到的wifi

[[email protected] linux]# cd wpa_supplicant_hostapd/

[[email protected] wpa_supplicant_hostapd]# ls

p2p_hostapd.conf     wpa_0_8.conf                                        wpa_supplicant_hostapd-0.8_rtw_r7475.20130812

rtl_hostapd_2G.conf  wpa_supplicant_8_jb_4.2_rtw_r8680.20130821.tar.gz   wpa_supplicant_hostapd-0.8_rtw_r7475.20130812.tar.gz

rtl_hostapd_5G.conf  wpa_supplicant_8_kk_4.4_rtw_r11967.20140818.tar.gz

[[email protected] wpa_supplicant_hostapd]# tar -xf wpa_supplicant_hostapd-0.8_rtw_r7475.20130812.tar.gz

[[email protected] wpa_supplicant]# cd wpa_supplicant_hostapd-0.8_rtw_r7475.20130812/wpa_supplicant/

[[email protected] wpa_supplicant]# make && make install

[[email protected] wpa_supplicant]# echo $?

连接wifi


[[email protected] wpa_supplicant]# wpa_passphrase sspaas.com >> /etc/wpa_supplicant/wpa_supplicant.conf    回车   然后再输入密码

88888888


[[email protected] wpa_supplicant]# cat /etc/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=/var/run/wpa_supplicant

ctrl_interface_group=wheel

# reading passphrase from stdin

network={

ssid="sspaas.com"

#psk="88888888"

psk=c88b2e4bc1a75fe6accbe5713acd3410c61d71fc02572083d7b7510d9f325772

}

现在驱动和秘钥文件全部都形成了,就可以进行wifi连接啦!!!



[[email protected] wpa_supplicant]#wpa_supplicant -i enp0s20u2 -c /etc/wpa_supplicant/wpa_supplicant.conf -D wext -B



wpa_supplicant    参数含义:

-i 指明网卡

-c 指明秘钥存放位置

-D 指明驱动类型为通用型

-B 放到后台运行

只做到这,还不够,一重启系统,就需要重新执行上面的命令啦,所以只要将上面的命令存放到/etc/rc.local 中就ok啦,以后每次重新启动系统就可以自动上网啦



底下给一点儿注意的事项:

这个网卡的驱动模块在这个目录下

/usr/lib/modules/3.10.0-327.el7.x86_64/kernel/drivers/net/wireless/8821au.ko

查看系统已经加载的驱动模块

[[email protected] wireless]# lsmod  | grep 8821

8821au               1968224  0



参考博文:http://jiangkun08.blog.51cto.com/6266992/1284327




本文出自 “RSLinux” 博客,请务必保留此出处http://readshlinux.blog.51cto.com/9322509/1887187

以上是关于EP-DB1608无线网卡安装linux驱动的主要内容,如果未能解决你的问题,请参考以下文章

在linux安装无线网卡驱动的问题

如何在VMware中kail linux安装无线网卡?

linux下无线网卡如何驱动

linux安装usb无线网卡驱动问题,deepin linux不能识别usb无线网卡,在起点操作系

CDlinux怎么安装USB无线网卡驱动(科磊NW360)??

(pc安装)安卓x86,如何安装无线网卡驱动linux版