无线网卡 rtl8188eu Linux 驱动安装
查一下
root@kuman:~# lsusb Bus 002 Device 002: ID 8087:8000 Intel Corp. Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 8087:8008 Intel Corp. Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 005: ID 0624:0249 Avocent Corp. Bus 003 Device 004: ID 413c:a001 Dell Computer Corp. Hub Bus 003 Device 003: ID 04d9:1503 Holtek Semiconductor, Inc. Shortboard Lefty Bus 003 Device 002: ID 0bda:8179 Realtek Semiconductor Corp. Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@kuman:~# lsusb -v -d 0bda:8179 Bus 003 Device 006: ID 0bda:8179 Realtek Semiconductor Corp. Device Descriptor: bLength 18 bDescriptorType 1 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 idVendor 0x0bda Realtek Semiconductor Corp. idProduct 0x8179 bcdDevice 0.00 iManufacturer 1 Realtek iProduct 2 802.11n NIC iSerial 3 00E04C0001 bNumConfigurations 1 Configuration Descriptor: bLength 9 bDescriptorType 2 wTotalLength 39 bNumInterfaces 1 bConfigurationValue 1 iConfiguration 0 bmAttributes 0xa0 (Bus Powered) Remote Wakeup MaxPower 500mA Interface Descriptor: bLength 9 bDescriptorType 4 bInterfaceNumber 0 bAlternateSetting 0 bNumEndpoints 3 bInterfaceClass 255 Vendor Specific Class bInterfaceSubClass 255 Vendor Specific Subclass bInterfaceProtocol 255 Vendor Specific Protocol iInterface 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x81 EP 1 IN bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x02 EP 2 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Endpoint Descriptor: bLength 7 bDescriptorType 5 bEndpointAddress 0x03 EP 3 OUT bmAttributes 2 Transfer Type Bulk Synch Type None Usage Type Data wMaxPacketSize 0x0200 1x 512 bytes bInterval 0 Device Qualifier (for other device speed): bLength 10 bDescriptorType 6 bcdUSB 2.00 bDeviceClass 0 (Defined at Interface level) bDeviceSubClass 0 bDeviceProtocol 0 bMaxPacketSize0 64 bNumConfigurations 1 Device Status: 0x0002 (Bus Powered) Remote Wakeup Enabled
确定网卡型号
Driver | USB ID |
---|---|
RTL8188CUS | 0bda:8176 |
RTL8192CU | 0bda:8178 |
RTL8723AU | 0bda:b720 |
RTL8188EU | 0bda:8179 |
RTL8192EU | 0bda:818b |
RTL8812AU | 0bda:8812 |
RTL8723BU | 0bda:b720 |
下载网卡驱动
https://github.com/lwfinger/rtl8188eu
编译安装
root@kuman:/rtl8188eu-master# apt-get install make Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: make-doc The following NEW packages will be installed: make 0 upgraded, 1 newly installed, 0 to remove and 244 not upgraded. Need to get 119 kB of archives. After this operation, 328 kB of additional disk space will be used. Get:1 http://cn.archive.ubuntu.com/ubuntu/ trusty/main make amd64 3.81-8.2ubuntu3 [119 kB] Fetched 119 kB in 5s (23.0 kB/s) perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "en_US:en:en_US:en", LC_ALL = (unset), LC_TIME = "en_US", LC_MONETARY = "en_US", LC_ADDRESS = "en_US", LC_TELEPHONE = "en_US", LC_NAME = "en_US", LC_MEASUREMENT = "en_US", LC_IDENTIFICATION = "en_US", LC_NUMERIC = "en_US", LC_PAPER = "en_US", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). locale: Cannot set LC_ALL to default locale: No such file or directory Selecting previously unselected package make. (Reading database ... 151860 files and directories currently installed.) Preparing to unpack .../make_3.81-8.2ubuntu3_amd64.deb ... Unpacking make (3.81-8.2ubuntu3) ... Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Setting up make (3.81-8.2ubuntu3) ...
编译
root@kuman:/rtl8188eu-master# make make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/3.13.0-24-generic/build M=/rtl8188eu-master modules make[1]: Entering directory `/usr/src/linux-headers-3.13.0-24-generic' CC [M] /rtl8188eu-master/core/rtw_ap.o CC [M] /rtl8188eu-master/core/rtw_br_ext.o CC [M] /rtl8188eu-master/core/rtw_cmd.o CC [M] /rtl8188eu-master/core/rtw_debug.o CC [M] /rtl8188eu-master/core/rtw_efuse.o CC [M] /rtl8188eu-master/core/rtw_ieee80211.o CC [M] /rtl8188eu-master/core/rtw_io.o CC [M] /rtl8188eu-master/core/rtw_ioctl_set.o CC [M] /rtl8188eu-master/core/rtw_iol.o CC [M] /rtl8188eu-master/core/rtw_led.o CC [M] /rtl8188eu-master/core/rtw_mlme.o CC [M] /rtl8188eu-master/core/rtw_mlme_ext.o CC [M] /rtl8188eu-master/core/rtw_mp.o CC [M] /rtl8188eu-master/core/rtw_mp_ioctl.o CC [M] /rtl8188eu-master/core/rtw_pwrctrl.o CC [M] /rtl8188eu-master/core/rtw_p2p.o CC [M] /rtl8188eu-master/core/rtw_recv.o CC [M] /rtl8188eu-master/core/rtw_rf.o CC [M] /rtl8188eu-master/core/rtw_security.o CC [M] /rtl8188eu-master/core/rtw_sreset.o CC [M] /rtl8188eu-master/core/rtw_sta_mgt.o CC [M] /rtl8188eu-master/core/rtw_wlan_util.o CC [M] /rtl8188eu-master/core/rtw_xmit.o CC [M] /rtl8188eu-master/hal/HalHWImg8188E_MAC.o CC [M] /rtl8188eu-master/hal/HalHWImg8188E_BB.o CC [M] /rtl8188eu-master/hal/HalHWImg8188E_RF.o CC [M] /rtl8188eu-master/hal/HalPhyRf.o CC [M] /rtl8188eu-master/hal/HalPhyRf_8188e.o CC [M] /rtl8188eu-master/hal/HalPwrSeqCmd.o CC [M] /rtl8188eu-master/hal/Hal8188EPwrSeq.o CC [M] /rtl8188eu-master/hal/Hal8188ERateAdaptive.o CC [M] /rtl8188eu-master/hal/hal_intf.o CC [M] /rtl8188eu-master/hal/hal_com.o CC [M] /rtl8188eu-master/hal/odm.o CC [M] /rtl8188eu-master/hal/odm_debug.o CC [M] /rtl8188eu-master/hal/odm_interface.o CC [M] /rtl8188eu-master/hal/odm_HWConfig.o CC [M] /rtl8188eu-master/hal/odm_RegConfig8188E.o CC [M] /rtl8188eu-master/hal/odm_RTL8188E.o CC [M] /rtl8188eu-master/hal/rtl8188e_cmd.o CC [M] /rtl8188eu-master/hal/rtl8188e_dm.o CC [M] /rtl8188eu-master/hal/rtl8188e_hal_init.o CC [M] /rtl8188eu-master/hal/rtl8188e_mp.o CC [M] /rtl8188eu-master/hal/rtl8188e_phycfg.o CC [M] /rtl8188eu-master/hal/rtl8188e_rf6052.o CC [M] /rtl8188eu-master/hal/rtl8188e_rxdesc.o CC [M] /rtl8188eu-master/hal/rtl8188e_sreset.o CC [M] /rtl8188eu-master/hal/rtl8188e_xmit.o CC [M] /rtl8188eu-master/hal/rtl8188eu_led.o CC [M] /rtl8188eu-master/hal/rtl8188eu_recv.o CC [M] /rtl8188eu-master/hal/rtl8188eu_xmit.o CC [M] /rtl8188eu-master/hal/usb_halinit.o CC [M] /rtl8188eu-master/hal/usb_ops_linux.o CC [M] /rtl8188eu-master/os_dep/ioctl_linux.o CC [M] /rtl8188eu-master/os_dep/mlme_linux.o CC [M] /rtl8188eu-master/os_dep/os_intfs.o /rtl8188eu-master/os_dep/os_intfs.c:701:2: warning: initialization from incompatible pointer type [enabled by default] .ndo_select_queue = rtw_select_queue, ^ /rtl8188eu-master/os_dep/os_intfs.c:701:2: warning: (near initialization for ‘rtw_netdev_ops.ndo_select_queue’) [enabled by default] CC [M] /rtl8188eu-master/os_dep/osdep_service.o CC [M] /rtl8188eu-master/os_dep/recv_linux.o CC [M] /rtl8188eu-master/os_dep/rtw_android.o CC [M] /rtl8188eu-master/os_dep/usb_intf.o CC [M] /rtl8188eu-master/os_dep/usb_ops_linux.o CC [M] /rtl8188eu-master/os_dep/xmit_linux.o LD [M] /rtl8188eu-master/8188eu.o Building modules, stage 2. MODPOST 1 modules CC /rtl8188eu-master/8188eu.mod.o LD [M] /rtl8188eu-master/8188eu.ko make[1]: Leaving directory `/usr/src/linux-headers-3.13.0-24-generic'
安装
root@kuman:/rtl8188eu-master# sudo make install install -p -m 644 8188eu.ko /lib/modules/3.13.0-24-generic/kernel/drivers/net/wireless cp rtl8188eufw.bin /lib/firmware/. /sbin/depmod -a 3.13.0-24-generic mkdir -p /lib/firmware/rtlwifi cp rtl8188eufw.bin /lib/firmware/rtlwifi/.
加载模块,重启服务器
root@kuman:/rtl8188eu-master# sudo insmod 8188eu.ko root@kuman:/rtl8188eu-master# sudo reboot
查看一下网卡
root@kuman:~# ifconfig -a em1 Link encap:Ethernet HWaddr f4:8e:38:be:d6:c0 inet addr:192.168.2.7 Bcast:192.168.2.255 Mask:255.255.255.0 inet6 addr: fe80::f68e:38ff:febe:d6c0/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1017 errors:0 dropped:0 overruns:0 frame:0 TX packets:313 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:83607 (83.6 KB) TX bytes:68246 (68.2 KB) Interrupt:16 em2 Link encap:Ethernet HWaddr f4:8e:38:be:d6:c2 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Interrupt:17 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:10936 errors:0 dropped:0 overruns:0 frame:0 TX packets:10936 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:8915715 (8.9 MB) TX bytes:8915715 (8.9 MB) wlan3 Link encap:Ethernet HWaddr 08:57:00:1c:33:b2 BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)