1. 首先查看一下当前使用的linux版本:
gxjun@gxjun:~$ uname -r
4.8.0-59-generic
2. 将360wifi插入PC的USB中,然后输入:
1 2 3 4 5 6 |
|
注明: 如果不确定那个是360wifi的网卡型号,可以先不插入260wifi,输入lsusb查看网卡,找出那个多出来的网卡就可以了.
3. 我们百度查找一下这个 148f:7601,找到对应的驱动mt7601U. 然后下载下来.
1 |
|
注明: 因为此刻我们还没有连上网,所以我们可以先在其他的电脑上下载到U盘,然后在复制到本机上.
我们检查一下mt7601usta/src/common/rtusb_dev_id.c中:
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 */
然后就是编译安装.
1 2 3 4 |
|
对于mt7601Usta.ko,我们需要手动的对它进行复制:
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] [] dump_stack+0x63/0x81
[ 84.703644] [] __warn+0xcb/0xf0
[ 84.703650] [] warn_slowpath_null+0x1d/0x20
[ 84.703654] [] fpu__restore+0x1f7/0x210
[ 84.703659] [] __fpu__restore_sig+0x251/0x590
[ 84.703665] [] fpu__restore_sig+0x2d/0x40
[ 84.703669] [] ia32_restore_sigcontext+0x159/0x180
[ 84.703672] [] sys32_rt_sigreturn+0xb5/0xe0
[ 84.703677] [] do_int80_syscall_32+0x59/0xb0
[ 84.703682] [] 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.
扫码关注本人微信公众号,有惊喜奥!公众号每天定时发送精致文章!回复关键词可获得海量各类编程开发学习资料!
例如:想获得Python入门至精通学习资料,请回复关键词Python即可。