I find very difficult to deal with wifi connections when you are in mobility and use more than one connection. You can use wpa_gui to scan your networks but probably you then need to launch ‘dhclient’ to adquire the ip address and gateway. So, some manual operations are required. I prefer something more automatic.
I coded a perl script to scan for networks, select one of them, and get connected launching wpa_supplicant and dhclient. And it’s capable of monitoring the connection.
This is script is not perfect. In fact only WEP and WPA are tested. I’m sure there’s some bug, but it works very well most of the time and fits my needings.
The code is available in:
The script must be execute as root in a terminal. It requires:
- perl (with a binary or simlink as /usr/bin/perl)
There’s no guarantee the script work in most of the cases, but it fit my needings. If any of you improve the code, please, let me know.