So I have a dilemma where my girlfriend wants to use her DS on my wireless network when she's over, but the thing is old and only supports WEP. My network is normally WPA2 - something I'm not really comfortable with changing, for obvious reasons. As an interim solution, I've been logging into my router, switching the settings so she could play, and then switching them back when she was done. This has gotten old pretty fast, because every time I do it I have to:
- Login into the router's administrative interface
- Change the settings to WEP and then reboot the device, which disconnects my laptop from the internet.
- Edit the wireless settings for my network connection on my laptop
Then I have to repeat this process when I want to go back to WPA. Obviously, this is entirely too much work. So I decided to script it.
To handle the router's settings, I wrote two selenium tests - one to login to the router and switch to WEP, the other to switch back to WPA. These are tested and work - and can be called from the command line via selenium RC.
The problem I'm having is the wifi settings. I need to stop the automatic attempt at reconnection (since the saved settings will not work after the router gets switched), change the authentication type from WPA to WEP (or back again), change the password to the appropriate one and then finally reconnect.
Sorry this has been so long winded - just trying to explain the situation to see if anyone has any alternatives to my method and also hope my desire for laziness garners some sympathy.
In brief - does anyone know how I can control my wifi settings and connections via the command line?
I'm using ubuntu 10.10 with gnome.