Eu desabilitei o WiFi na minha máquina Ubuntu 14.04 para checar se alguns arquivos que eu precisava estariam disponíveis offline mais tarde. Depois de reativar o Wi-Fi, não consegui me reconectar à minha rede sem fio. Eu tentei reiniciar, desativar / ativar a rede, bloquear / desbloquear o wifi e algumas outras sugestões que encontrei nos fóruns. Isso acontece com muita frequência. Sempre que desativo o Wi-Fi e o reabastecio, geralmente tenho problemas para reconectar. Não consegui chegar a um conjunto de etapas que funcione de forma consistente. Tanto quanto eu posso dizer, ele se reconecta ao acaso sempre que está bom e pronto.
Alguém sabe um conjunto consistente de etapas que posso fazer para reconectar quando isso acontece? A causa é sempre a mesma, então eu acho que a solução deve ser sempre a mesma também.
Resultado solicitado
Observe que, no momento em que executei o script, não estava tendo o problema. Eu tive uma conexão bem sucedida e sustentada.
########## wireless info START ##########
Report from: 04 Mar 2015 19:58 EST -0500
Booted last: 04 Mar 2015 19:51 EST -0500
Script from: 20 Sep 2014 23:04 UTC +0000
##### release ###########################
Distributor ID: Ubuntu
Description: Ubuntu 14.04.2 LTS
Release: 14.04
Codename: trusty
##### kernel ############################
Linux 3.13.0-46-generic #77-Ubuntu SMP Mon Mar 2 18:26:13 UTC 2015 i686 i686 i686 GNU/Linux
Parameters: ro, quiet, splash, vt.handoff=7
##### desktop ###########################
Ubuntu
##### lspci #############################
07:00.0 Network controller [0280]: Intel Corporation Wireless 3160 [8086:08b3] (rev 83)
Subsystem: Intel Corporation Dual Band Wireless AC 3160 [8086:8170]
Kernel driver in use: iwlwifi
08:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 0c)
Subsystem: Toshiba America Info Systems Device [1179:f920]
Kernel driver in use: r8169
##### lsusb #############################
Bus 002 Device 002: ID 8087:8000 Intel Corp.
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 004: ID 8087:07dc Intel Corp.
Bus 003 Device 003: ID 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory
Bus 003 Device 006: ID 1c4f:0034 SiGma Micro
Bus 003 Device 005: ID 04f2:b446 Chicony Electronics Co., Ltd
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
##### PCMCIA card info ##################
##### rfkill ############################
0: hci0: Bluetooth
Soft blocked: yes
Hard blocked: no
1: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
##### lsmod #############################
iwlmvm 172842 0
mac80211 546067 1 iwlmvm
iwlwifi 152049 1 iwlmvm
cfg80211 409394 3 iwlwifi,mac80211,iwlmvm
wmi 18673 1 toshiba_acpi
##### interfaces ########################
auto lo
iface lo inet loopback
##### ifconfig ##########################
eth0 Link encap:Ethernet HWaddr <MAC 'eth0' [IF]>
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
wlan0 Link encap:Ethernet HWaddr <MAC 'wlan0' [IF]>
inet addr:192.168.1.8 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::a288:69ff:fe7b:724e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:27113 errors:0 dropped:0 overruns:0 frame:0
TX packets:24040 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:29008009 (29.0 MB) TX bytes:3107248 (3.1 MB)
##### iwconfig ##########################
lo no wireless extensions.
eth0 no wireless extensions.
wlan0 IEEE 802.11abg ESSID:"shayler"
Mode:Managed Frequency:2.462 GHz Access Point: <MAC 'shayler' [AC1]>
Bit Rate=11 Mb/s Tx-Power=22 dBm
Retry long limit:7 RTS thr:off Fragment thr:off
Power Management:off
Link Quality=23/70 Signal level=-87 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:35 Invalid misc:1159 Missed beacon:0
##### route #############################
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.1.1 0.0.0.0 UG 0 0 0 wlan0
192.168.1.0 0.0.0.0 255.255.255.0 U 9 0 0 wlan0
##### resolv.conf #######################
nameserver 127.0.1.1
##### nm-tool ###########################
NetworkManager Tool
State: connected (global)
- Device: eth0 -----------------------------------------------------------------
Type: Wired
Driver: r8169
State: unavailable
Default: no
HW Address: <MAC 'eth0' [IF]>
Capabilities:
Carrier Detect: yes
Wired Properties
Carrier: off
- Device: wlan0 [shayler] -----------------------------------------------------
Type: 802.11 WiFi
Driver: iwlwifi
State: connected
Default: yes
HW Address: <MAC 'wlan0' [IF]>
Capabilities:
Speed: 9 Mb/s
Wireless Properties
WEP Encryption: yes
WPA Encryption: yes
WPA2 Encryption: yes
Wireless Access Points (* = current AP)
pipsgreeneyes: Infra, <MAC 'pipsgreeneyes' [AN1]>, Freq 2437 MHz, Rate 54 Mb/s, Strength 14 WPA2
HP783F42: Ad-Hoc, <MAC 'HP783F42' [AN2]>, Freq 2457 MHz, Rate 11 Mb/s, Strength 19
*shayler: Infra, <MAC 'shayler' [AC1]>, Freq 2462 MHz, Rate 54 Mb/s, Strength 33 WPA2
IPv4 Settings:
Address: 192.168.1.8
Prefix: 24 (255.255.255.0)
Gateway: 192.168.1.1
DNS: 192.168.1.1
##### NetworkManager.state ##############
[main]
NetworkingEnabled=true
WirelessEnabled=true
WWANEnabled=true
WimaxEnabled=true
##### NetworkManager.conf ###############
[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq
[ifupdown]
managed=false
##### NetworkManager profiles ###########
[[/etc/NetworkManager/system-connections/freedompop-8990]] (600 root)
[connection] id=freedompop-8990 | type=802-11-wireless
[802-11-wireless] ssid=freedompop-8990 | mac-address=<MAC 'wlan0' [IF]>
[ipv4] method=auto
[ipv6] method=auto
[[/etc/NetworkManager/system-connections/SouthwestWiFi]] (600 root)
[connection] id=SouthwestWiFi | type=802-11-wireless
[802-11-wireless] ssid=SouthwestWiFi | mac-address=<MAC 'wlan0' [IF]>
[ipv6] method=auto
[ipv4] method=auto
[[/etc/NetworkManager/system-connections/Moab]] (600 root)
[connection] id=Moab | type=802-11-wireless
[802-11-wireless] ssid=Moab | mac-address=<MAC 'wlan0' [IF]>
[ipv4] method=auto
[ipv6] method=auto
[[/etc/NetworkManager/system-connections/Rasmussen family]] (600 root)
[connection] id=Rasmussen family | type=802-11-wireless
[802-11-wireless] ssid=Rasmussen family | mac-address=<MAC 'wlan0' [IF]>
[ipv4] method=auto
[ipv6] method=auto
[[/etc/NetworkManager/system-connections/shayler 1]] (600 root)
[connection] id=shayler 1 | type=802-11-wireless
[802-11-wireless] ssid=shayler | mac-address=<MAC 'wlan0' [IF]>
[ipv6] method=auto
[ipv4] method=auto
[[/etc/NetworkManager/system-connections/shayler]] (600 root)
[connection] id=shayler | type=802-11-wireless
[802-11-wireless] ssid=shayler | mac-address=<MAC 'wlan0' [IF]>
[ipv4] method=auto
[ipv6] method=auto
[[/etc/NetworkManager/system-connections/slytastic]] (600 root)
[connection] id=slytastic | type=802-11-wireless
[802-11-wireless] ssid=slytastic | mac-address=<MAC 'wlan0' [IF]>
[ipv4] method=auto
[ipv6] method=auto
##### iw reg get ########################
Region: America/New_York (based on set time zone)
country 00:
(2402 - 2472 @ 40), (3, 20)
(2457 - 2482 @ 40), (3, 20), PASSIVE-SCAN, NO-IBSS
(2474 - 2494 @ 20), (3, 20), NO-OFDM, PASSIVE-SCAN, NO-IBSS
(5170 - 5250 @ 40), (3, 20), PASSIVE-SCAN, NO-IBSS
(5735 - 5835 @ 40), (3, 20), PASSIVE-SCAN, NO-IBSS
##### iwlist channels ###################
lo no frequency information.
eth0 no frequency information.
wlan0 32 channels in total; available frequencies :
Channel 01 : 2.412 GHz
Channel 02 : 2.417 GHz
Channel 03 : 2.422 GHz
Channel 04 : 2.427 GHz
Channel 05 : 2.432 GHz
Channel 06 : 2.437 GHz
Channel 07 : 2.442 GHz
Channel 08 : 2.447 GHz
Channel 09 : 2.452 GHz
Channel 10 : 2.457 GHz
Channel 11 : 2.462 GHz
Channel 12 : 2.467 GHz
Channel 13 : 2.472 GHz
Channel 36 : 5.18 GHz
Channel 40 : 5.2 GHz
Channel 44 : 5.22 GHz
Channel 48 : 5.24 GHz
Channel 52 : 5.26 GHz
Channel 56 : 5.28 GHz
Channel 60 : 5.3 GHz
Channel 64 : 5.32 GHz
Channel 100 : 5.5 GHz
Channel 104 : 5.52 GHz
Channel 108 : 5.54 GHz
Channel 112 : 5.56 GHz
Channel 116 : 5.58 GHz
Channel 120 : 5.6 GHz
Channel 124 : 5.62 GHz
Channel 128 : 5.64 GHz
Channel 132 : 5.66 GHz
Channel 136 : 5.68 GHz
Channel 140 : 5.7 GHz
Current Frequency=2.462 GHz (Channel 11)
##### iwlist scan #######################
Channel occupancy:
1 APs on Frequency:2.462 GHz (Channel 11)
lo Interface doesn't support scanning.
eth0 Interface doesn't support scanning.
wlan0 Scan completed :
Cell 01 - Address: <MAC 'shayler' [AC1]>
Channel:11
Frequency:2.462 GHz (Channel 11)
Quality=22/70 Signal level=-88 dBm
Encryption key:on
ESSID:"shayler"
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=0000003c50a2603c
Extra: Last beacon: 192ms ago
IE: IEEE 802.11i/WPA2 Version 1
Group Cipher : CCMP
Pairwise Ciphers (1) : CCMP
Authentication Suites (1) : PSK
##### module infos ######################
[iwlmvm]
filename: /lib/modules/3.13.0-46-generic/kernel/drivers/net/wireless/iwlwifi/mvm/iwlmvm.ko
license: GPL
author: Copyright(c) 2003-2013 Intel Corporation <[email protected]>
version: in-tree:
description: The new Intel(R) wireless AGN driver for Linux
srcversion: 412FF07DA992AAD938A30BE
depends: iwlwifi,mac80211,cfg80211
intree: Y
vermagic: 3.13.0-46-generic SMP mod_unload modversions 686
signer: Magrathea: Glacier signing key
sig_key: 8E:EB:17:02:75:CF:3E:2A:62:50:43:18:01:98:A0:8B:B9:A0:B9:8A
sig_hashalgo: sha512
parm: init_dbg:set to true to debug an ASSERT in INIT fw (default: false (bool)
parm: power_scheme:power management scheme: 1-active, 2-balanced, 3-low power, default: 2 (int)
[mac80211]
filename: /lib/modules/3.13.0-46-generic/kernel/net/mac80211/mac80211.ko
license: GPL
description: IEEE 802.11 subsystem
srcversion: B8DF1ECC076C2FCEAC70533
depends: cfg80211
intree: Y
vermagic: 3.13.0-46-generic SMP mod_unload modversions 686
signer: Magrathea: Glacier signing key
sig_key: 8E:EB:17:02:75:CF:3E:2A:62:50:43:18:01:98:A0:8B:B9:A0:B9:8A
sig_hashalgo: sha512
parm: max_nullfunc_tries:Maximum nullfunc tx tries before disconnecting (reason 4). (int)
parm: max_probe_tries:Maximum probe tries before disconnecting (reason 4). (int)
parm: beacon_loss_count:Number of beacon intervals before we decide beacon was lost. (int)
parm: probe_wait_ms:Maximum time(ms) to wait for probe response before disconnecting (reason 4). (int)
parm: ieee80211_default_rc_algo:Default rate control algorithm for mac80211 to use (charp)
[iwlwifi]
filename: /lib/modules/3.13.0-46-generic/kernel/drivers/net/wireless/iwlwifi/iwlwifi.ko
license: GPL
author: Copyright(c) 2003-2013 Intel Corporation <[email protected]>
version: in-tree:
description: Intel(R) Wireless WiFi driver for Linux
firmware: iwlwifi-100-5.ucode
firmware: iwlwifi-1000-5.ucode
firmware: iwlwifi-135-6.ucode
firmware: iwlwifi-105-6.ucode
firmware: iwlwifi-2030-6.ucode
firmware: iwlwifi-2000-6.ucode
firmware: iwlwifi-5150-2.ucode
firmware: iwlwifi-5000-5.ucode
firmware: iwlwifi-6000g2b-6.ucode
firmware: iwlwifi-6000g2a-5.ucode
firmware: iwlwifi-6050-5.ucode
firmware: iwlwifi-6000-4.ucode
firmware: iwlwifi-7265-7.ucode
firmware: iwlwifi-3160-7.ucode
firmware: iwlwifi-7260-7.ucode
srcversion: B81BA270CF5925E724426BD
depends: cfg80211
intree: Y
vermagic: 3.13.0-46-generic SMP mod_unload modversions 686
signer: Magrathea: Glacier signing key
sig_key: 8E:EB:17:02:75:CF:3E:2A:62:50:43:18:01:98:A0:8B:B9:A0:B9:8A
sig_hashalgo: sha512
parm: swcrypto:using crypto in software (default 0 [hardware]) (int)
parm: 11n_disable:disable 11n functionality, bitmap: 1: full, 2: disable agg TX, 4: disable agg RX, 8 enable agg TX (uint)
parm: amsdu_size_8K:enable 8K amsdu size (default 0) (int)
parm: fw_restart:restart firmware in case of error (default true) (bool)
parm: antenna_coupling:specify antenna coupling in dB (defualt: 0 dB) (int)
parm: wd_disable:Disable stuck queue watchdog timer 0=system default, 1=disable, 2=enable (default: 0) (int)
parm: nvm_file:NVM file name (charp)
parm: bt_coex_active:enable wifi/bt co-exist (default: enable) (bool)
parm: led_mode:0=system default, 1=On(RF On)/Off(RF Off), 2=blinking, 3=Off (default: 0) (int)
parm: power_save:enable WiFi power management (default: disable) (bool)
parm: power_level:default power save level (range from 1 - 5, default: 1) (int)
[cfg80211]
filename: /lib/modules/3.13.0-46-generic/kernel/net/wireless/cfg80211.ko
description: wireless configuration support
license: GPL
author: Johannes Berg
srcversion: 5C139B156678DB83EDA757D
depends:
intree: Y
vermagic: 3.13.0-46-generic SMP mod_unload modversions 686
signer: Magrathea: Glacier signing key
sig_key: 8E:EB:17:02:75:CF:3E:2A:62:50:43:18:01:98:A0:8B:B9:A0:B9:8A
sig_hashalgo: sha512
parm: ieee80211_regdom:IEEE 802.11 regulatory domain code (charp)
parm: cfg80211_disable_40mhz_24ghz:Disable 40MHz support in the 2.4GHz band (bool)
##### module parameters #################
[iwlmvm]
init_dbg: N
power_scheme: 1
[mac80211]
beacon_loss_count: 7
ieee80211_default_rc_algo: minstrel_ht
max_nullfunc_tries: 2
max_probe_tries: 5
probe_wait_ms: 500
[iwlwifi]
11n_disable: 1
amsdu_size_8K: 0
antenna_coupling: 0
bt_coex_active: Y
fw_restart: Y
led_mode: 0
nvm_file: (null)
power_level: 0
power_save: N
swcrypto: 1
wd_disable: 1
[cfg80211]
cfg80211_disable_40mhz_24ghz: N
ieee80211_regdom: 00
##### /etc/modules ######################
lp
##### modprobe options ##################
[/etc/modprobe.d/blacklist-ath_pci.conf]
blacklist ath_pci
[/etc/modprobe.d/blacklist.conf]
blacklist evbug
blacklist usbmouse
blacklist usbkbd
blacklist eepro100
blacklist de4x5
blacklist eth1394
blacklist snd_intel8x0m
blacklist snd_aw2
blacklist i2c_i801
blacklist prism54
blacklist bcm43xx
blacklist garmin_gps
blacklist asus_acpi
blacklist snd_pcsp
blacklist pcspkr
blacklist amd76x_edac
[/etc/modprobe.d/blacklist-rare-network.conf]
alias net-pf-3 off
alias net-pf-6 off
alias net-pf-9 off
alias net-pf-11 off
alias net-pf-12 off
alias net-pf-19 off
alias net-pf-21 off
alias net-pf-36 off
[/etc/modprobe.d/iwlmvm.conf]
options iwlmvm power_scheme=1
[/etc/modprobe.d/iwlwifi.conf]
options iwlwifi bt_coex_active=Y swcrypto=1 11n_disable=1
[/etc/modprobe.d/mlx4.conf]
softdep mlx4_core post: mlx4_en
##### rc.local ##########################
rfkill block bluetooth
sleep 10
iwconfig wlan0 power off
exit 0
##### pm-utils ##########################
##### udev rules ########################
[/etc/udev/rules.d/70-persistent-net.rules]
# PCI device 0x10ec:0x8168 (r8169)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="<MAC 'eth0' [IF]>", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
# PCI device 0x8086:0x08b3 (iwlwifi)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="<MAC 'wlan0' [IF]>", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="wlan*", NAME="wlan0"
##### dmesg #############################
[ 12.610792] iwlwifi 0000:07:00.0: loaded firmware version 22.24.8.0 op_mode iwlmvm
[ 12.640111] iwlwifi 0000:07:00.0: Detected Intel(R) Dual Band Wireless AC 3160, REV=0x164
[ 12.640168] iwlwifi 0000:07:00.0: L1 Disabled - LTR Enabled (repeated 2 times)
[ 12.667077] Bluetooth: hci0: Intel Bluetooth firmware file: intel/ibt-hw-37.7.10-fw-1.0.2.3.d.bseq
[ 12.742343] ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs'
[ 12.771351] Bluetooth: hci0: Intel Bluetooth firmware patch completed and activated
[ 16.053901] iwlwifi 0000:07:00.0: L1 Disabled - LTR Enabled (repeated 2 times)
[ 16.065623] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready (repeated 2 times)
[ 19.787066] wlan0: authenticate with <MAC 'shayler' [AC1]>
[ 19.787807] wlan0: send auth to <MAC 'shayler' [AC1]> (try 1/3)
[ 19.820431] wlan0: authenticated
[ 19.823778] wlan0: associate with <MAC 'shayler' [AC1]> (try 1/3)
[ 19.831022] wlan0: RX AssocResp from <MAC 'shayler' [AC1]> (capab=0x31 status=0 aid=5)
[ 19.831510] wlan0: associated
[ 19.831531] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
########## wireless info END ############
PED de saída solicitada. 2
Lucked (eu acho) e tive o problema novamente. Veja o que o script produz quando a conexão sem fio não se conecta:
(Muitos caracteres aqui, então tive que colá-lo no pastebin do Ubuntu: link )