记在ubuntu18.04系统上安装usb无线网卡的一件神奇的事情
本帖最后由 gouchaoer 于 2019-2-12 17:34 编辑之前有一台ubunutu18.04的PC内置了2.4G的无线网卡,因为要用无线网卡连5G的wifi所以买了一个型号为 TL-WDN5200 2.0 (免驱版) 的2.4G/5G双频的USB无线网卡,插上之后桌面上有个光盘,右键eject之后桌面右上角就显示了这块新的usb网卡了,然后就可以点进去连接了5G的wifi了
本来用的好好的,结果某一天不知道啥原因,右键eject之后这块新的usb网卡不显示了,只剩内置的2.4G的无线网卡,折腾了很久不知道啥原因,求解
跟USB没关系看芯片有没有驱动吧? 404489039 发表于 2019-2-12 17:23
跟USB没关系看芯片有没有驱动吧?
驱动官方没有支持ubuntu,所以无从下手 ip link show看下网卡设备出没出来,没有dmesg看一下,有没有相关识别的log,另外也可以lsmod看下模块加没加 liwangli1983 发表于 2019-2-12 17:46
ip link show看下网卡设备出没出来,没有dmesg看一下,有没有相关识别的log,另外也可以lsmod看下模块加没 ...
I have no input method in the PC, so i can only use English.
in dmesg logs, I can see that I plugged usb-wireless, then eject it, and it turned into a network device
usb 1-9: new high-speed USB device number 11 using xhci_hcd
usb 1-9: New USB device found, idVendor=0bda, idProduct=1a2b
usb 1-9: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-9: Product: DISK
usb 1-9: Manufacturer: Realtek
usb-storage 1-9:1.0: USB Mass Storage device detected
scsi host6: usb-storage 1-9:1.0
scsi 6:0:0:0: CD-ROM RealtekDriver Storage 1.00 PQ: 0 ANSI: 0 CCS
sr 6:0:0:0: scsi3-mmc drive: 0x/0x caddy
sr 6:0:0:0: Attached scsi CD-ROM sr0
sr 6:0:0:0: Attached scsi generic sg1 type 5
ISO 9660 Extensions: Microsoft Joliet Level 3
ISOFS: changing to secondary root
usb 1-9: USB disconnect, device number 11
usb 1-9: new high-speed USB device number 12 using xhci_hcd
usb 1-9: New USB device found, idVendor=0bda, idProduct=c811
usb 1-9: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 1-9: Product: 802.11ac NIC
usb 1-9: Manufacturer: Realtek
usb 1-9: SerialNumber: 123456
then I did `ip link show`, but no coresponding network device.
then I did `lsmod` as following:
root@devbot:/home/supervisor# lsmod
Module SizeUsed by
ipt_REJECT 163840
nf_reject_ipv4 163841 ipt_REJECT
nf_nat_h323 204800
nf_conntrack_h323 737281 nf_nat_h323
nf_nat_pptp 163840
nf_nat_proto_gre 163841 nf_nat_pptp
nf_conntrack_pptp 163841 nf_nat_pptp
nf_conntrack_proto_gre 163841 nf_conntrack_pptp
nf_nat_tftp 163840
nf_conntrack_tftp 163841 nf_nat_tftp
nf_nat_sip 204800
nf_conntrack_sip 286721 nf_nat_sip
nf_nat_irc 163840
nf_conntrack_irc 163841 nf_nat_irc
nf_nat_ftp 163840
nf_conntrack_ftp 204801 nf_nat_ftp
xt_tcpudp 163841
tcp_diag 163840
inet_diag 245761 tcp_diag
ipt_MASQUERADE 163841
nf_nat_masquerade_ipv4 163841 ipt_MASQUERADE
nf_conntrack_netlink 409600
nfnetlink 163842 nf_conntrack_netlink
xfrm_user 327681
xfrm_algo 163841 xfrm_user
iptable_nat 163841
nf_conntrack_ipv4 163844
nf_defrag_ipv4 163841 nf_conntrack_ipv4
nf_nat_ipv4 163841 iptable_nat
xt_addrtype 163842
iptable_filter 163841
xt_conntrack 163842
nf_nat 327689 nf_nat_masquerade_ipv4,nf_nat_irc,nf_nat_ftp,nf_nat_ipv4,nf_nat_tftp,nf_nat_pptp,nf_nat_h323,nf_nat_proto_gre,nf_nat_sip
nf_conntrack 13107220 xt_conntrack,nf_nat_masquerade_ipv4,nf_nat_irc,nf_conntrack_ipv4,nf_nat,nf_conntrack_tftp,nf_nat_ftp,nf_conntrack_pptp,ipt_MASQUERADE,nf_nat_ipv4,nf_nat_tftp,nf_conntrack_sip,nf_conntrack_h323,nf_nat_pptp,nf_conntrack_irc,nf_conntrack_netlink,nf_conntrack_proto_gre,nf_conntrack_ftp,nf_nat_h323,nf_nat_sip
libcrc32c 163842 nf_conntrack,nf_nat
br_netfilter 245760
bridge 1515521 br_netfilter
stp 163841 bridge
llc 163842 bridge,stp
overlay 778240
aufs 2416640
nls_utf8 163840
isofs 450560
rfcomm 7782416
bnep 204802
ccm 204809
nls_iso8859_1 163841
snd_hda_codec_hdmi 491521
snd_hda_codec_realtek 1064961
snd_hda_codec_generic 737281 snd_hda_codec_realtek
intel_rapl 204800
x86_pkg_temp_thermal 163840
intel_powerclamp 163840
coretemp 163840
kvm_intel 2129920
snd_hda_intel 409601
snd_hda_codec 1269764 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
kvm 5980161 kvm_intel
snd_hda_core 819205 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
snd_hwdep 204801 snd_hda_codec
irqbypass 163841 kvm
crct10dif_pclmul 163840
crc32_pclmul 163840
ghash_clmulni_intel 163840
arc4 163842
pcbc 163840
snd_pcm 983044 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
snd_seq_midi 163840
snd_seq_midi_event 163841 snd_seq_midi
ath9k 1515520
snd_rawmidi 327681 snd_seq_midi
ath9k_common 368641 ath9k
dell_smm_hwmon 163840
aesni_intel 1884166
snd_seq 655362 snd_seq_midi,snd_seq_midi_event
ath9k_hw 4710402 ath9k_common,ath9k
aes_x86_64 204801 aesni_intel
crypto_simd 163841 aesni_intel
glue_helper 163841 aesni_intel
cryptd 245763 crypto_simd,ghash_clmulni_intel,aesni_intel
ath 286723 ath9k_common,ath9k,ath9k_hw
intel_cstate 204800
mac80211 7782401 ath9k
intel_rapl_perf 163840
rtsx_usb_ms 204800
snd_seq_device 163843 snd_seq,snd_seq_midi,snd_rawmidi
dell_wmi 163840
snd_timer 327682 snd_seq,snd_pcm
memstick 163841 rtsx_usb_ms
ath3k 204800
dell_smbios 245761 dell_wmi
btusb 450560
sparse_keymap 163841 dell_wmi
dcdbas 163841 dell_smbios
btrtl 163841 btusb
cfg80211 6225924 ath9k_common,ath9k,ath,mac80211
dell_wmi_descriptor 163842 dell_wmi,dell_smbios
btbcm 163841 btusb
btintel 163841 btusb
input_leds 163840
wmi_bmof 163840
snd 8192013 snd_hda_codec_generic,snd_seq,snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm,snd_rawmidi
bluetooth 54886444 btrtl,btintel,btbcm,bnep,ath3k,btusb,rfcomm
soundcore 163841 snd
mei_me 409600
ecdh_generic 245761 bluetooth
shpchp 368640
mei 901121 mei_me
intel_pch_thermal 163840
mac_hid 163840
acpi_pad 1802240
sch_fq_codel 204802
parport_pc 368640
ppdev 204800
lp 204800
parport 491523 parport_pc,lp,ppdev
ip_tables 286722 iptable_filter,iptable_nat
x_tables 409607 xt_conntrack,iptable_filter,xt_tcpudp,ipt_MASQUERADE,xt_addrtype,ipt_REJECT,ip_tables
autofs4 409602
hid_generic 163840
rtsx_usb_sdmmc 286720
uas 245760
usbhid 491520
hid 1187842 usbhid,hid_generic
usb_storage 696321 uas
rtsx_usb 204802 rtsx_usb_sdmmc,rtsx_usb_ms
i915 161792014
i2c_algo_bit 163841 i915
drm_kms_helper 1720321 i915
syscopyarea 163841 drm_kms_helper
sysfillrect 163841 drm_kms_helper
i2c_i801 286720
r8169 860160
sysimgblt 163841 drm_kms_helper
nvme 368640
fb_sys_fops 163841 drm_kms_helper
ahci 409601
mii 163841 r8169
nvme_core 614405 nvme
drm 4014086 drm_kms_helper,i915
libahci 327681 ahci
wmi 245764 dell_wmi,wmi_bmof,dell_smbios,dell_wmi_descriptor
video 450562 dell_wmi,i915
qftp 发表于 2019-2-12 17:46
看无线芯片是哪款,都会有驱动代码的,回去自己编译就行
插拔网卡,找log看看是哪里报错了
编译出来只支持2.4g,不支持5g usb 1-9: Product: 802.11ac NIC
usb 1-9: Manufacturer: Realtek
usb 1-9: SerialNumber: 123456
认出来了啊,话说你为啥要eject liwangli1983 发表于 2019-2-12 18:19
usb 1-9: Product: 802.11ac NIC
usb 1-9: Manufacturer: Realtek
它一开始插是一个u盘,里面有win的驱动,要eject一下才能变网卡。。。
dmesg里认出来了么。。。可是ifconfig或者ip link查不到啊 gouchaoer 发表于 2019-2-12 18:28
它一开始插是一个u盘,里面有win的驱动,要eject一下才能变网卡。。。
dmesg里认出来了么。。。可是ifcon ...
那就是驱动没上来,原因不清楚,内核log也确实只有usb信息没有驱动模块加载信息,dmesg里面好像也没看到。
你可以插上,先不eject,用lsusb -t看下,然后eject掉u盘,再看下 liwangli1983 发表于 2019-2-12 18:38
那就是驱动没上来,原因不清楚,内核log也确实只有usb信息没有驱动模块加载信息,dmesg里面好像也没看到 ...
usb-wireless not plugged, do lsusb -t:
lsusb -t
/:Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 10000M
/:Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
|__ Port 5: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 6: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 6: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 8: Dev 5, If 0, Class=Vendor Specific Class, Driver=rtsx_usb, 480M
|__ Port 14: Dev 7, If 0, Class=Wireless, Driver=btusb, 12M
|__ Port 14: Dev 7, If 1, Class=Wireless, Driver=btusb, 12M
usb-wireless plugged and there's a TP-LINK CD icon on ubuntu18.04 Desktop:
lsusb -t
/:Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 10000M
/:Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
|__ Port 5: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 6: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 6: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 8: Dev 5, If 0, Class=Vendor Specific Class, Driver=rtsx_usb, 480M
|__ Port 9: Dev 16, If 0, Class=Mass Storage, Driver=usb-storage, 480M
|__ Port 14: Dev 7, If 0, Class=Wireless, Driver=btusb, 12M
|__ Port 14: Dev 7, If 1, Class=Wireless, Driver=btusb, 12M
eject the CD icon:lsusb -t
/:Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 10000M
/:Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
|__ Port 5: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 6: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 6: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
|__ Port 8: Dev 5, If 0, Class=Vendor Specific Class, Driver=rtsx_usb, 480M
|__ Port 9: Dev 17, If 0, Class=Vendor Specific Class, Driver=, 480M
|__ Port 14: Dev 7, If 0, Class=Wireless, Driver=btusb, 12M
|__ Port 14: Dev 7, If 1, Class=Wireless, Driver=btusb, 12M
It seemed that the |__ Port 9: Dev 17, If 0, Class=Vendor Specific Class, Driver=, 480M is recognized but driver not loaded.
It seemed that my ubuntu18.04 kernel had updated. This must be the reason.
uname -a
Linux devbot 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
try to downgrade kernel. wtf gouchaoer 发表于 2019-2-13 09:51
It seemed that my ubuntu18.04 kernel had updated. This must be the reason.
try to downgrade kernel. ...
嗯,网上搜了下这玩意确实挺神奇的,要弹出大容量存储才行,现在看驱动模块肯定是没加载,先看看有什么变动吧 downgrade了内核之后虽然能够弹出对应的wifi选项但是无论是2.4G还是5G都无法连上,我已经放弃这个问题了,老子时间不能浪费在装个sb驱动上面 嗯,linux上用这些东西,应该是选去看哪些能支持好再买的。你这是当网卡用还好,我当时是准备当ap用,坑就更多了,同样的芯片,有的厂家出的就能当ap用,有的就不行;有双频能的2.4G能当ap用,5G就不行,等等。软件上,有时还需要给内核驱动打patch,上层的软件hostapd也有版本的区分,芯片配套的固件也有讲究
页:
[1]