Linux/Wireless/2
From charlesreid1
This covers a second method for connecting to wifi network from the Linux command line (mainly useful for RaspberryPis).
Method 1
Method 1 uses wpa_supplicant to connect to wifi networks: Linux/Wireless
Method 2
While method 1 is purported to work, method 2 works as well. Here's method 2:
Add wpa-ssid and wpa-psk information directly to network interfaces file:
$ cat /etc/network/interfaces ...snip... auto wlan0 allow-hotplug wlan0 iface wlan0 inet dhcp wpa-ssid NetName wpa-psk NetPassword
You should be able to reboot, and the wireless interface should join automatically.
Initially I had problems because I was using a passphrase with several symbols, and was surrounding the passphrase and network name in double quotes. This did not work at all, and I tried many variations on the config file. But as soon as I switched to an alphanumeric passphrase, everything worked perfectly - the wireless interface automatically connected on boot. It was magical.
So the lesson is, IF POSSIBLE, check that your device will connect to the right network automatically.
Flags
| Wireless all things wireless.
Software:
|