Ubuntu 14.04.2 中的 USB Wifi 卡 TL-WN823N

Ubuntu 14.04.2 中的 USB Wifi 卡 TL-WN823N

我在一台旧的 VAIO 笔记本电脑(型号 PCG-5J2L)上安装了 Ubuntu 14.04.2。它有一个内置的 wifi NIC,但它不适用于 Windows 或 Ubuntu。

我已经把它关掉了。我买了一个 USB wifi 卡 TP Link TL-WN823N 来使用 wifi 连接,但它也不起作用。

我已经阅读了很多关于如何为我的 VAIO Linux 机器安装新驱动程序的网页,因为我读到 ubuntu 有这个 USB wifi NIC(rtl8192cu 模块)的旧驱动程序:

https://github.com/pvaret/rtl8192cu-fixes/blob/master/README.md

但是我的 USB wifi 棒 TP Link TL-WN823N 还不能用。我不是 Linux 专家。

fconfig -a

eth0      Link encap:Ethernet  direcciónHW 00:1a:80:3e:5a:e9  
          Direc. inet:192.168.1.133  Difus.:192.168.1.255  Másc:255.255.255.0
          Dirección inet6: fe80::21a:80ff:fe3e:5ae9/64 Alcance:Enlace
          ACTIVO DIFUSIÓN FUNCIONANDO MULTICAST  MTU:1500  Métrica:1
          Paquetes RX:2880 errores:0 perdidos:0 overruns:0 frame:0
          Paquetes TX:2810 errores:0 perdidos:0 overruns:0 carrier:0
          colisiones:0 long.colaTX:1000 
          Bytes RX:998287 (998.2 KB)  TX bytes:395843 (395.8 KB)

lo        Link encap:Bucle local  
          Direc. inet:127.0.0.1  Másc:255.0.0.0
          Dirección inet6: ::1/128 Alcance:Anfitrión
          ACTIVO BUCLE FUNCIONANDO  MTU:65536  Métrica:1
          Paquetes RX:988 errores:0 perdidos:0 overruns:0 frame:0
          Paquetes TX:988 errores:0 perdidos:0 overruns:0 carrier:0
          colisiones:0 long.colaTX:0 
          Bytes RX:91214 (91.2 KB)  TX bytes:91214 (91.2 KB)

wlan0     Link encap:Ethernet  direcciónHW 00:13:e8:bd:4f:ab  
          DIFUSIÓN MULTICAST  MTU:1500  Métrica:1
          Paquetes RX:0 errores:0 perdidos:0 overruns:0 frame:0
          Paquetes TX:0 errores:0 perdidos:0 overruns:0 carrier:0
          colisiones:0 long.colaTX:1000 
          Bytes RX:0 (0.0 B)  TX bytes:0 (0.0 B)

wlan1     Link encap:Ethernet  direcciónHW 14:cc:20:13:69:df  
          DIFUSIÓN MULTICAST  MTU:1500  Métrica:1
          Paquetes RX:0 errores:0 perdidos:0 overruns:0 frame:0
          Paquetes TX:0 errores:0 perdidos:0 overruns:0 carrier:0
          colisiones:0 long.colaTX:1000 
          Bytes RX:0 (0.0 B)  TX bytes:0 (0.0 B)

lsmod | grep 8192

8192cu                572775  0

lsmod

Module                  Size  Used by

bnep                   18895  2 
rfcomm                 53664  0 
bluetooth             342208  10 bnep,rfcomm
hid_generic            12492  0 
snd_hda_codec_realtek    59259  1 
arc4                   12536  2 
pcmcia                 51828  0 
uvcvideo               71309  0 
videobuf2_vmalloc      13048  1 uvcvideo
videobuf2_memops       13170  1 videobuf2_vmalloc
videobuf2_core         39258  1 uvcvideo
usbhid                 47070  0 
videodev              108503  2 uvcvideo,videobuf2_core
hid                    87604  2 hid_generic,usbhid
coretemp               13195  0 
joydev                 17101  0 
iwl4965               106859  0 
serio_raw              13230  0 
iwlegacy               88016  1 iwl4965
parport_pc             31981  0 
ppdev                  17391  0 
mac80211              546067  2 iwl4965,iwlegacy
snd_hda_intel          42794  3 
snd_hda_codec         164067  2 snd_hda_codec_realtek,snd_hda_intel
yenta_socket           40201  0 
tifm_7xx1              13163  0 
snd_hwdep              13272  1 snd_hda_codec
lpc_ich                16864  0 
pcmcia_rsrc            18319  1 yenta_socket
tifm_core              15133  1 tifm_7xx1
snd_pcm                85501  2 snd_hda_codec,snd_hda_intel
pcmcia_core            22328  3 pcmcia,pcmcia_rsrc,yenta_socket
cfg80211              409394  3 iwl4965,iwlegacy,mac80211
snd_page_alloc         14230  2 snd_pcm,snd_hda_intel
snd_seq_midi           13132  0 
snd_seq_midi_event     14475  1 snd_seq_midi
snd_rawmidi            25135  1 snd_seq_midi
sony_laptop            44359  0 
snd_seq                55383  2 snd_seq_midi_event,snd_seq_midi
i915                  710013  3 
8192cu                572775  0 
video                  18903  1 i915
drm_kms_helper         48868  1 i915
mac_hid                13037  0 
drm                   244037  4 i915,drm_kms_helper
shpchp                 32128  0 
snd_seq_device         14137  3 snd_seq,snd_rawmidi,snd_seq_midi
snd_timer              28584  2 snd_pcm,snd_seq
snd                    60939  16 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_pcm,snd_seq,snd_rawmidi,snd_hda_codec,snd_hda_intel,snd_seq_device,snd_seq_midi
soundcore              12600  1 snd
i2c_algo_bit           13197  1 i915
lp                     13299  0 
parport                40836  3 lp,ppdev,parport_pc
firewire_ohci          35529  0 
psmouse                91357  0 
firewire_core          61867  1 firewire_ohci
r8169                  61562  0 
crc_itu_t              12627  1 firewire_core
mii                    13654  1 r8169
pata_acpi              12886  0 

iwconfig

wlan0     IEEE 802.11abgn  ESSID:off/any  
          Mode:Managed  Access Point: Not-Associated   Tx-Power=off   
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off

lo        no wireless extensions.

eth0      no wireless extensions.

wlan1     unassociated  Nickname:"<WIFI@REALTEK>"
          Mode:Auto  Frequency=2.412 GHz  Access Point: Not-Associated   
          Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

我执行了您的命令并重新启动了我的计算机。USB wifi 棒不工作。
请求的输出是:

lsusb

Bus 002 Device 003: ID 0bda:8178 Realtek Semiconductor Corp. RTL8192CU 802.11n WLAN Adapter
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 192f:0616 Avago Technologies, Pte. ADNS-5700 Optical Mouse Controller (5-button)
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 05ca:1839 Ricoh Co., Ltd Visual Communication Camera VGP-VCC6 [R5U870]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

dmesg | grep 8192

[    0.004163] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.004168] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.197862] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
[    0.197886] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
[    0.197923] TCP: Hash tables configured (established 8192 bind 8192)
[    0.920740] agpgart-intel 0000:00:00.0: detected 8192K stolen memory
[   14.454253] 8192cu: module verification failed: signature and/or  required key missing - tainting kernel
[   14.459120] rtl8192cu driver version=v4.0.2_9000.20130911
[   14.459492] CHIP TYPE: RTL8188C_8192C
[   14.460240] ====> ReadAdapterInfo8192C
[   14.808096] readAdapterInfo_8192CU(): REPLACEMENT = 1
[   14.808099] <==== ReadAdapterInfo8192C in 348 ms
[   14.808944] usbcore: registered new interface driver rtl8192cu

$ sudo rfkill 解除所有阻止

$ sudo rfkill list all 0: phy0: 无线局域网 软阻止:否 硬阻止:是

$ sudo nmcli nm wifi 开启

但什么都没起作用。当我这样做时:

$ sudo ifconfig wlan0 up

我的 USB wifi NIC 开始闪烁。此外,当我执行以下操作时:

$ sudo iwlist wlan0 扫描

wlan0 扫描完成:

      Cell 01 - Address: CA:D7:19:E9:59:60

                ESSID:""

                Protocol:IEEE 802.11bgn

                Mode:Master

                Frequency:2.437 GHz (Channel 6)

                Encryption key:on

                Bit Rates:144 Mb/s

                Quality=20/100  Signal level=96/100  

      Cell 02 - Address: C8:D7:19:E9:59:6E

                ESSID:"tokito"

                Protocol:IEEE 802.11bgn

                Mode:Master

                Frequency:2.437 GHz (Channel 6)

                Encryption key:on

                Bit Rates:300 Mb/s

                Extra:rsn_ie=30140100000fac040100000fac040100000fac020c00

                IE: IEEE 802.11i/WPA2 Version 1

                    Group Cipher : CCMP

                    Pairwise Ciphers (1) : CCMP

                    Authentication Suites (1) : PSK

                IE: Unknown:     DD940050F204104A0001101044000102103B00010310470010EB606877966F6240CA6804FEA3F2B41E10210013436973636F2053797374656D732C20496E632E1023000E4C696E6B737973204541363530301024000645413635303010420008247B7365726E6F7D1054000800060050F204000110110009746F6B69746F204150100800022008103C0001031049000600372A000120

                Quality=20/100  Signal level=100/100  

      Cell 03 - Address: 00:26:ED:AC:C0:7D

                ESSID:"Movistar"

                Protocol:IEEE 802.11bg

                Mode:Master

                Frequency:2.437 GHz (Channel 6)

                Encryption key:on

                Bit Rates:54 Mb/s

                Quality=48/100  Signal level=84/100  

      Cell 04 - Address: FC:94:E3:11:F5:52

                ESSID:"majofran.."

                Protocol:IEEE 802.11bgn

                Mode:Master

                Frequency:2.427 GHz (Channel 4)

                Encryption key:on

                Bit Rates:144 Mb/s

                Extra:wpa_ie=dd180050f20101000050f20401000050f20401000050f2020c00

                IE: WPA Version 1

                    Group Cipher : CCMP

                    Pairwise Ciphers (1) : CCMP

                    Authentication Suites (1) : PSK

                Extra:rsn_ie=30140100000fac040100000fac040100000fac020c00

                IE: IEEE 802.11i/WPA2 Version 1

                    Group Cipher : CCMP

                    Pairwise Ciphers (1) : CCMP

                    Authentication Suites (1) : PSK

                Quality=34/100  Signal level=44/100  

      Cell 05 - Address: 64:66:B3:F3:FD:8E

                ESSID:"tokito_EXT"

                Protocol:IEEE 802.11bgn

                Mode:Master

                Frequency:2.437 GHz (Channel 6)

                Encryption key:on

                Bit Rates:300 Mb/s

                Extra:wpa_ie=dd1a0050f20101000050f20202000050f2040050f20201000050f202

                IE: WPA Version 1

                    Group Cipher : TKIP

                    Pairwise Ciphers (2) : CCMP TKIP

                    Authentication Suites (1) : PSK

                Extra:rsn_ie=30180100000fac020200000fac04000fac020100000fac020000

                IE: IEEE 802.11i/WPA2 Version 1

                    Group Cipher : TKIP

                    Pairwise Ciphers (2) : CCMP TKIP

                    Authentication Suites (1) : PSK

                IE: Unknown: DD7E0050F204104A0001101044000102103B000103104700107B260273ED8453ECAB7C0AD42FDE9F141021000754502D4C494E4B1023000A544C2D5741383530524510240003322E301042000010540008000000000000000010110018576972656C657373204E20415020544C2D57413835305245100800020008103C000103

                Quality=10/100  Signal level=50/100  

      Cell 06 - Address: 4C:72:B9:1F:C5:B8

                ESSID:"Peluchin01"

                Protocol:IEEE 802.11bgn

                Mode:Master

                Frequency:2.432 GHz (Channel 5)

                Encryption key:on

                Bit Rates:144 Mb/s

                Extra:rsn_ie=30140100000fac040100000fac040100000fac020c00

                IE: IEEE 802.11i/WPA2 Version 1

                    Group Cipher : CCMP

                    Pairwise Ciphers (1) : CCMP

                    Authentication Suites (1) : PSK

                Quality=68/100  Signal level=48/100  

内置 wifi 卡已由硬件关闭。当我将其打开时,它保持关闭状态。有什么线索吗?

答案1

首先,我建议你将内部设备的驱动程序列入黑名单。从终端:

sudo -i
echo "blacklist iwl4965"  >>  /etc/modprobe.d/blacklist.conf
exit

断开以太网连接,因为网络管理器会优先使用以太网而不是无线。重新启动。USB 无线是否正常工作?

如果没有,请编辑您的问题以添加以下结果:

lsusb
dmesg | grep 8192

根据您的补充,我会完善这个答案。

答案2

在我的案例中,它工作正常,插入加密狗后会加载以下驱动程序,

lsmod | grep 8192
rtl8192cu              67723  0 
rtl_usb                18448  1 rtl8192cu
rtlwifi                63475  2 rtl_usb,rtl8192cu
rtl8192c_common        53172  1 rtl8192cu
mac80211              630728  4 rtl_usb,rtlwifi,ath9k_htc,rtl8192cu

不要与 ath9k_htc 混淆,我也有基于 atheros 芯片组的 tl-wn721N usb 适配器。我使用的是 14.04LTS 和以下内核

uname -a
Linux karteek-HP-Compaq-8000-Elite-CMT-PC 3.13.0-61-generic #100-Ubuntu SMP Wed Jul 29 11:21:34 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

我也尝试过 Pvaret 的补丁,除了 LED 闪烁外,它也按预期工作。使用 Pvaret 补丁后,我得到了以下驱动程序

lsmod | grep 8192
8192cu                527317  0

现在我正在使用 pvaret 的修补驱动程序,它提供的性能与 Atheros 芯片组 (TL-WN721N) 驱动程序类似,没有任何连接中断。Realtek 默认内核驱动程序非常慢,并且多次出现连接中断的情况,甚至自动连接也无济于事,我们必须断开连接并重新连接才能获得网络。

相关内容