Categories:
-
3d 96 articles
-
animations 16 articles
-
architecture 47 articles
-
blender 98 articles
-
bédé 19 articles
-
techdrawing 24 articles
-
freecad 189 articles
-
gaming 1 articles
-
idsampa 8 articles
-
inthepress 8 articles
-
linux 57 articles
-
music 1 articles
-
nativeifc 30 articles
-
opensource 266 articles
-
orange 4 articles
-
photo 16 articles
-
projects 35 articles
-
receitas 176 articles
-
saopaulo 18 articles
-
sketches 163 articles
-
talks 25 articles
-
techdrawing 24 articles
-
textes 7 articles
-
trilhas 3 articles
-
urbanoids 1 articles
-
video 47 articles
-
webdesign 7 articles
-
works 151 articles
Archives:
-
2007 22 articles
-
2008 32 articles
-
2009 66 articles
-
2010 74 articles
-
2011 74 articles
-
2012 47 articles
-
2013 31 articles
-
2014 38 articles
-
2015 28 articles
-
2016 36 articles
-
2017 41 articles
-
2018 46 articles
-
2019 59 articles
-
2020 18 articles
-
2021 20 articles
-
2022 7 articles
-
2023 25 articles
-
2024 14 articles
How to recover wifi by hand on Linux
So everything crashed, your network manager (in my case wicd) ceased to function, you have no access to the wifi network and all instructions you found on the net are outdated? Here is (mostly as a note to self) how I got it back. This is on a Debian testing machine. You need the wpa_supplicant program, which I assume you have, because it is used by every other wifi manager out there.
- Test that the wlan0 interface exists (o any other name):
iwconfig
In my case it shows this:
wlan0 IEEE 802.11 ESSID:None
Mode:Managed Frequency:2.462 GHz Access Point: 3C:A6:2F:19:44:F3
Bit Rate=72.2 Mb/s Tx-Power=20 dBm
Retry short limit:7 RTS thr=2347 B Fragment thr:off
Power Management:on
Link Quality=70/70 Signal level=-35 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
- Create a wpa supplicant config file:
echo "YOUR_WIFI_PASSWORD" | wpa_passphrase YOUR_WIFI_ID > wpa_suplicant.conf
- Edit wpasupplicant.conf and add a few things:
ctrl_interface=DIR=/var/runwpa_supplicant GROUP=netdev
update_config=1
country=BE
# reading passphrase from stdin
network={
ssid="YOUR_WIFI_ID"
#psk="YOUR_WIFI_PASSWORD"
psk=AUTOGENERATED_HASH_DO_NOT_EDIT
}
- Move wpa_supplicant.conf to a default location (might be useful later on):
sudo mv wpa_supplicant.conf /etc/wpa_supplicant/
You might also want to chmod 600 wpa_supplicant.conf as it contains a password, to make it only readable by the sudo account
- Launch everything:
wpa_supplicant -c /etc/wpa_supplicant/wpa_suplicant.conf -iwlan0 -B
iwconfig should now show that wlan0 is connected to YOUR_WIFI_ID
- Run a dhcp query to get all the network config automatically from the router:
sudo dhclient eth0
- Check that wlan0 has received an ip address:
ip a
Which in my case gives:
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 6e:6a:7c:c2:35:87 brd ff:ff:ff:ff:ff:ff permaddr 20:68:9d:f9:31:13
inet 192.168.178.186/24 brd 192.168.178.255 scope global dynamic wlan0
valid_lft 863013sec preferred_lft 863013sec
- Check that you can reach google, for example (Ctrl+C to cancel once you see it working):
ping google.com
I have to run sudo dhclient eth0
regularly otherwise it disconnects from the network, not sure why, but since this is an emergency operation, it is not important.