Showing posts with label WiFi. Show all posts
Showing posts with label WiFi. Show all posts

Wednesday, 22 February 2012

fixing disabled atheros wifi after windows7 hibernation.

While I am waiting for my new computer a coworker lend me an acer-Aspire-5535 (4GB RAM AMD Turion-X2 64). This is a cheap but nice machine when using windows7 (without fancy decorations or animations) and a virtualized Ubuntu-LXDE with virtual box.

I enjoyed the machine until I hibernate it. When started up again the system the joy disapeared: the wifi was not working (the wifi button had some sporadic flashes but no network at all). I restated the machine and wifi came back without a problem. The coworker knew the problem and lived with it for more than 3 month ( a windows update created the problem ).Solution, of the owner (a typical windows person) when no wifi after hibernation: restart it. Problem, what problem? "Restart windows and it will works fine" she said to me. But I can not live without proper hibernation. It is not only the booting time, there is also  the programs' state and the 60 firefox tabs that I don't want to reload again, and the pdfs that I am reading or using as reference etc.

PROBLEM: when windows 7 suspend to ram or hibernate, it shutdown the wifi card, but then is unable to activate it after restoring.

SOLUTION:
As a linux person I am get use to ifdown;ifup for resurrecting a collapsed wifi card/driver. In the old windows XP I believe I have use a restart network but I was unable to find it in windows 7. After a lot of googleing and reading a lot of unhelpful advises 90% giving as solution to reboot the computer (have any of them understood that if you do hibernation is because you don't want to shutdown !!), I have found a solution to avoid the reboot:

# hit win-R
# type 
services.msc
# at the bottom of the list you will find "WLAN AutoConfig"
# click on it an slect 'stop' wait click again and select start

This will activate again the wifi.

Also, in order to prevent this happening again, I am disabling the automatic turning off of the wifi device by the system. I went to 'control_panel'->network and sharing center->manage wireless network->adapter_properties->configure->power_management->"allow computer to turn off this device to save power" and unmark this option.

Sunday, 4 December 2011

Selecting a good Channel for your WiFI, or how to find the WiFi spectrum around you.

why my wifi router in channel 6 is not working properly?..... well seems obvious

root@debian:/home/pablo# iwlist scan | grep Channel
                    Frequency:2.417 GHz (Channel 2)
                    Frequency:2.417 GHz (Channel 2)
                    Frequency:2.412 GHz (Channel 1)
                    Frequency:2.412 GHz (Channel 1)
                    Frequency:2.422 GHz (Channel 3)
                    Frequency:2.422 GHz (Channel 3)
                    Frequency:2.437 GHz (Channel 6)
                    Frequency:2.437 GHz (Channel 6)
                    Frequency:2.437 GHz (Channel 6)
                    Frequency:2.437 GHz (Channel 6)
                    Frequency:2.437 GHz (Channel 6)
                    Frequency:2.462 GHz (Channel 11)
                    Frequency:2.462 GHz (Channel 11)
                    Frequency:2.412 GHz (Channel 1)
                    Frequency:2.437 GHz (Channel 6)
                    Frequency:2.442 GHz (Channel 7)
                    Frequency:2.442 GHz (Channel 7)
                    Frequency:2.437 GHz (Channel 6)
                    Frequency:2.412 GHz (Channel 1)
                    Frequency:2.437 GHz (Channel 6)
                    Frequency:2.412 GHz (Channel 1)


I know that there are nice applications to see the the WiFi stations but this is something quick when you don't have the X's started (I like Arch sometimes and my debian without Xs in very old laptops)

root@debian:/home/pablo# iwlist scan | grep "ESSID\|Channel"| \
 perl -lane '($essid)=/ESSID:(.+)/; ($channel)= <>=~/Channel (\d+)/; \
 push @{$h{$channel}}, $essid;  END {print "Chnl\tcount\tESSIDs"; \
foreach (sort {$a<=>$b} keys %h){ $cnt=@{$h{$_}}; \
 print "$_\t[$cnt]\t @{$h{$_}}"}}'

Chnl count ESSIDs
1 [4]  "SKYC4E76" "TALKTALK-431FCD" "SISJ_Net" "virgin broadband"
3 [2]  "FON_ab" "my_place_ab"
6 [8]  "BTHomeHub2-2RQK" "BTOpenzone-H" "BTFON" "SKY8430D" "SKY74103" "ZyXEL_3340ras" "BTHomeHub2-MWCS" "VirginMedia8791617"
7 [1]  "BTOpenzone-H"
11 [2]  "BTHomeHub2-349C" "SKY97946"