[关闭]
@maorongrong 2017-11-20T15:05:50.000000Z 字数 4670 阅读 509

Laptop wireless network issue

Linux


本本无线网络经常会出现问题,首先需要判断什么问题,是否涉及到需要手动安装驱动。

  1. # List the current state of all available rfkill-using devices(wireless devices), good, all is unblocked!
  2. amy@heizi:~$ rfkill list all
  3. 0: phy0: Wireless LAN
  4. Soft blocked: no
  5. Hard blocked: no
  6. # but if I type shortkey (Fn+F5) to turn off wifi light, it's soft blocked!
  7. amy@heizi:~$ rfkill list all
  8. 0: phy0: Wireless LAN
  9. Soft blocked: yes
  10. Hard blocked: no
  11. # so let's use command (rfkill unblock IDENTIFIER where IDENTIFIER is the index no. of an rfkill switch or one of: <idx> all wifi wlan bluetooth uwb ultrawideband wimax wwan gps fm nfc) to turn up! OOOps, it works!
  12. amy@heizi:~$ rfkill unblock 0
  13. amy@heizi:~$ rfkill list all
  14. 0: phy0: Wireless LAN
  15. Soft blocked: no
  16. Hard blocked: no
  17. # so if I use wifi hard-buttun under the Laptap to turn off wifi light.
  18. amy@heizi:~$ rfkill list all
  19. 0: phy0: Wireless LAN
  20. Soft blocked: yes
  21. Hard blocked: yes
  22. amy@heizi:~$ cat /sys/class/rfkill/rfkill0/soft
  23. 1
  24. amy@heizi:~$ cat /sys/class/rfkill/rfkill0/hard
  25. 1
  26. # use cmd (rfkill unblock 0) just unblock soft blocked!!!
  27. amy@heizi:~$ rfkill unblock all
  28. amy@heizi:~$ rfkill list all
  29. 0: phy0: Wireless LAN
  30. Soft blocked: no
  31. Hard blocked: yes
  32. # 本想通过强制更改hard block状态为0(unblocked),但是发现该文件mode为root:root 444!
  33. amy@heizi:~$ sudo -i echo 0 > /sys/class/rfkill/rfkill0/hard
  34. bash: /sys/class/rfkill/rfkill0/hard: 权限不够
  35. amy@heizi:~$ ll /sys/class/rfkill/rfkill0/hard
  36. -r--r--r-- 1 root root 4096 11 20 21:21 /sys/class/rfkill/rfkill0/hard
  37. # 那咱强改文件mode,再试
  38. root@heizi:~# chmod 744 /sys/class/rfkill/rfkill0/hard
  39. root@heizi:~# sudo -i echo 0 > /sys/class/rfkill/rfkill0/hard
  40. -bash: 0 行: echo: 写错误: 输入/输出错误
  41. # 还是不行啊,所以细心点吧,自己手动把wifi开关打开吧!
  1. amy@heizi:~$ sudo lshw -C net
  2. *-network
  3. description: Ethernet interface
  4. product: 82566MM Gigabit Network Connection
  5. vendor: Intel Corporation
  6. physical id: 19
  7. logical name: enp0s25
  8. capacity: 1Gbit/s
  9. ......(以太网卡信息略过)......
  10. *-network
  11. description: Wireless interface
  12. product: PRO/Wireless 3945ABG [Golan] Network Connection
  13. vendor: Intel Corporation
  14. physical id: 0
  15. bus info: pci@0000:03:00.0
  16. logical name: wls3
  17. version: 02
  18. serial: 00:1f:3c:c2:f6:fe
  19. width: 32 bits
  20. clock: 33MHz
  21. capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
  22. configuration: broadcast=yes driver=iwl3945 driverversion=4.4.0-98-generic firmware=15.32.2.9 ip=192.168.1.113 latency=0 link=yes multicast=yes wireless=IEEE 802.11abg
  23. resources: irq:29 memory:dfcff000-dfcfffff
  24. # 记住点网卡逻辑名 wls3, 以及driver名 iwl3945;

OK!!! 我们来看看,打开wifi硬阻塞后,查看lshw -C net情况:

  1. amy@heizi:~$ rfkill list all #硬阻塞
  2. 0: phy0: Wireless LAN
  3. Soft blocked: yes
  4. Hard blocked: yes
  5. amy@heizi:~$ rfkill unblock all
  6. amy@heizi:~$ rfkill list all
  7. 0: phy0: Wireless LAN
  8. Soft blocked: no
  9. Hard blocked: yes
  10. amy@heizi:~$ sudo lshw -C net # 查看网络硬件信息
  11. *-network DISABLED
  12. description: Wireless interface
  13. product: PRO/Wireless 3945ABG [Golan] Network Connection
  14. ...
  15. physical id: 0
  16. logical name: wls3
  17. ...
  18. configuration: broadcast=yes driver=iwl3945 driverversion=4.4.0-98-generic firmware=15.32.2.9 latency=0 link=no multicast=yes wireless=IEEE 802.11abg
  19. resources: irq:29 memory:dfcff000-dfcfffff

我的ThinkPad carbon one第一代确实老了, 总是wifi几个小时之后莫名其妙drop 问题。

  1. amy@heizi:~$ lsmod
  2. Module Size Used by
  3. ipt_MASQUERADE 16384 1
  4. xfrm_user 32768 1
  5. xfrm_algo 16384 1 xfrm_user
  6. iptable_nat 16384 1
  7. nf_conntrack_ipv4 16384 2
  8. nf_defrag_ipv4 16384 1 nf_conntrack_ipv4
  9. nf_nat_ipv4 16384 1 iptable_nat
  10. iptable_filter 16384 1
  11. ip_tables 24576 2 iptable_filter,iptable_nat
  12. x_tables 36864 5 ip_tables,ipt_MASQUERADE,xt_conntrack,iptable_filter,xt_addrtype
  13. ......
  14. bridge 126976 1 br_netfilter
  15. ......
  16. kvm 544768 1 kvm_intel
  17. iwl3945 69632 0
添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注