少說廢話,每一步都通過驗證:linux
1. 首先查看一下當前使用的linux版本:git
gxjun@gxjun:~$ uname -r
4.8.0-59-genericgithub
2. 將360wifi插入PC的USB中,而後輸入:docker
gxjun@gxjun:~$ lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 09da:c10a A4Tech Co., Ltd. Bus 001 Device 002: ID 148f:7601 Ralink Technology, Corp. MT7601U Wireless Adapter Bus 001 Device 004: ID 0483:5710 STMicroelectronics Joystick in FS Mode Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
註明: 若是不肯定那個是360wifi的網卡型號,能夠先不插入260wifi,輸入lsusb查看網卡,找出那個多出來的網卡就能夠了.網絡
3. 咱們百度查找一下這個 148f:7601,找到對應的驅動mt7601U. 而後下載下來.app
git clone https://github.com/art567/mt7601usta.git
註明: 由於此刻咱們尚未連上網,因此咱們能夠先在其餘的電腦上下載到U盤,而後在複製到本機上.less
咱們檢查一下mt7601usta/src/common/rtusb_dev_id.c中:electron
36 /* module table */ 37 USB_DEVICE_ID rtusb_dev_id[] = { 38 #ifdef RT6570 39 {USB_DEVICE(0x148f,0x6570)}, /* Ralink 6570 */ 40 #endif /* RT6570 */ 41 {USB_DEVICE(0x148f, 0x7650)}, /* MT7650 */ 45 #ifdef MT7601U 46 {USB_DEVICE(0x148f,0x6370)}, /* Ralink 6370 */ 47 {USB_DEVICE(0x148f,0x7601)}, /* MT 6370 添加一條,咱們以前使用lsusb查找到的型號:l48f:7601 */ 48 {USB_DEVICE(0x148f,0x760b)}, /* 360 wifi */ 49 {USB_DEVICE(0x2a5f,0x1000)}, /* Tencent wifi QQ */ 50 {USB_DEVICE(0x2955,0x0001)}, /* XiaoDu Wifi */ 51 {USB_DEVICE(0x2955,0x1001)}, /* XiaoDu Wifi */ 52 {USB_DEVICE(0x2955,0x1003)}, /* nuomi wifi */ 53 {USB_DEVICE(0x2717,0x4106)}, /* Xiaomi MiniWifi */
而後就是編譯安裝. socket
cd mt7601usta
cd src sudo make all sudo make install #這裏咱們須要對mt7601Usta.ko, 和RT2870STA.dat進行移動. #通常來講執行make install會對RT2870STA.dat進行復制,可是咱們須要注意他是否執行cp操做,#而且確保執行成功了,若是沒有成功,咱們須要: sudo mkdir -p /etc/Wireless/RT2870STA/ sudo cp RT2870STA.dat /etc/Wireless/RT2870STA/
對於mt7601Usta.ko,咱們須要手動的對它進行復制: ide
sudo cp /gxjun/desktop/mt7601usta/src/os/linux/mt7601Usta.ko /lib/modules/4.8.0-59-generic/kernel/drivers/net/wireless/
sudo insmod /lib/modules/4.8.0-59-generic/kernel/drivers/net/wireless/mt7601Usta.ko
而後執行安裝:
sudo modprobe mt7601Usta
通常來講執行到這兒,會有有很大的概率出錯:
1. 錯誤一:
‘opstions’的錯誤,建議找到對應的conf,對應的行註釋掉就能夠了.
2.若是沒有問題,咱們就能夠使用:
lsmod | grep -i mt gxjun@gxjun:~$ lsmod | grep -i mt
名字 大小 數量
mt7601Usta 602112 0 mt7601u 102400 0 mac80211 757760 1 mt7601u cfg80211 581632 2 mac80211,mt7601u
附錄:
若是咱們要刪除模塊的話:
sudo modprobe -r mt7601Ustra
sudo make uninstall
到這兒,應該就成功大部分離了.可是仍是會碰上詭異的事情,那就是依舊找不到網絡,咱們使用命令依舊找不到:
iwlist scanning
這種問題,比較隱蔽,咱們須要輸入:
reboot
重啓電腦,而後再ctrl+f1進入tty1,咱們發現,mt7601u出錯了,若是咱們直接進入界面是發現不了這個錯誤信息的,或者說是不容易發現,除非你有意識的使用這個命令:
gxjun@gxjun$: dmesg . . . [ 84.703483] Modules linked in: ipt_MASQUERADE nf_nat_masquerade_ipv4 nf_conntrack_netlink nfnetlink xfrm_user xfrm_algo iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 xt_addrtype iptable_filter xt_conntrack nf_nat nf_conntrack br_netfilter bridge stp llc bnep aufs mt7601Usta(OE) arc4 mt7601u nvidia_uvm(POE) mac80211 nvidia_drm(POE) cfg80211 nvidia_modeset(POE) nvidia(POE) snd_hda_codec_hdmi joydev input_leds hci_uart intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel btbcm btqca kvm drm_kms_helper drm btintel bluetooth fb_sys_fops syscopyarea sysfillrect sysimgblt snd_hda_codec_realtek snd_hda_codec_generic mei_me mei snd_hda_intel snd_hda_codec tpm_infineon acpi_als irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel snd_hda_core snd_hwdep snd_pcm intel_lpss_acpi [ 84.703560] intel_lpss kfifo_buf snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq aes_x86_64 lrw glue_helper ablk_helper snd_seq_device cryptd snd_timer snd industrialio soundcore acpi_pad serio_raw shpchp mac_hid wmi parport_pc ppdev lp parport ip_tables x_tables autofs4 hid_generic usbhid e1000e psmouse ptp pps_core ahci libahci video pinctrl_sunrisepoint i2c_hid pinctrl_intel hid fjes [ 84.703607] CPU: 2 PID: 2756 Comm: teamviewerd Tainted: P OE 4.8.0-59-generic #64-Ubuntu [ 84.703609] Hardware name: Gigabyte Technology Co., Ltd. Z270-HD3/Z270-HD3-CF, BIOS F2 11/22/2016 [ 84.703612] 0000000000200286 00000000e57e4d22 ffff9a14a7a8fd70 ffffffff904314f2 [ 84.703619] 0000000000000000 0000000000000000 ffff9a14a7a8fdb0 ffffffff900831cb [ 84.703624] 0000017000000000 ffff9a14e024e6c0 ffff9a14e024db80 00000000eb8fafd0 [ 84.703630] Call Trace: [ 84.703637] [<ffffffff904314f2>] dump_stack+0x63/0x81 [ 84.703644] [<ffffffff900831cb>] __warn+0xcb/0xf0 [ 84.703650] [<ffffffff900832fd>] warn_slowpath_null+0x1d/0x20 [ 84.703654] [<ffffffff90039267>] fpu__restore+0x1f7/0x210 [ 84.703659] [<ffffffff9003a7d1>] __fpu__restore_sig+0x251/0x590 [ 84.703665] [<ffffffff9003ad2d>] fpu__restore_sig+0x2d/0x40 [ 84.703669] [<ffffffff900798e9>] ia32_restore_sigcontext+0x159/0x180 [ 84.703672] [<ffffffff90079bd5>] sys32_rt_sigreturn+0xb5/0xe0 [ 84.703677] [<ffffffff90003c59>] do_int80_syscall_32+0x59/0xb0 [ 84.703682] [<ffffffff908a0ef3>] entry_INT80_compat+0x33/0x40 [ 84.703685] ---[ end trace 819cdcba2213ad53 ]--- [ 90.988154] aufs au_opts_verify:1597:dockerd[1939]: dirperm1 breaks the protection by the permission bits on the lower branch [ 107.780952] audit: type=1400 audit(1523135288.427:34): apparmor="DENIED" operation="sendmsg" profile="/usr/lib/telepathy/telepathy-*" name="/run/systemd/journal/socket" pid=3694 comm="telepathy-haze" requested_mask="w" denied_mask="w" fsuid=1000 ouid=0 [ 133.299229] wlx24050f159e2a: authenticate with 34:b3:54:3a:17:b0 [ 133.325312] wlx24050f159e2a: send auth to 34:b3:54:3a:17:b0 (try 1/3) [ 133.329376] wlx24050f159e2a: authenticated [ 133.330804] wlx24050f159e2a: associate with 34:b3:54:3a:17:b0 (try 1/3) [ 133.334371] wlx24050f159e2a: RX AssocResp from 34:b3:54:3a:17:b0 (capab=0x411 status=0 aid=5) [ 133.361250] wlx24050f159e2a: associated [ 133.361283] IPv6: ADDRCONF(NETDEV_CHANGE): wlx24050f159e2a: link becomes ready
可是仍是建議進入tty1中觀察,由於有錯誤的話,會直接打印出來,不須要咱們作任何操做.
而出現mt7601u 1-1 ....這樣的錯誤的緣由是由於咱們將360wifi插入到了usb3.0接口,這在linux下不兼容形成的.
所以,咱們須要將360wifi插入到usb2.0接口便可.
而後咱們在執行:
iwlist scanning
或者 ifconfig
就會有咱們看到的網絡了. 或者直接在圖形界面查看便可.
gxjun@gxjun:~$ iwlist scanning br-b8ae4b43517e Interface doesn't support scanning. docker0 Interface doesn't support scanning. wlx24050f159e2a Scan completed : Cell 01 - Address: 34:B3:54:$B:17:B0 Channel:8 Frequency:2.447 GHz (Channel 8) Quality=59/70 Signal level=-51 dBm Encryption key:on ESSID:"March" Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s 9 Mb/s; 12 Mb/s; 18 Mb/s Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s Mode:Master Extra:tsf=0000019ace2dd896 Extra: Last beacon: 98040ms ago enp0s31f6 Interface doesn't support scanning. lo Interface doesn't support scanning.
完.