A simple wifi haskell executable to auto-connect to available Wifi.
This will:
- Scan the current available wifis
- Compute your autoconnect list of wifis
- Elect the one with the most powerful signal and try to connect to it
Embedding this in a script:
runhaskell Network/Wifi.hs
Possible output:
Scanned wifi:
- some-ssid
- some-other-ssid
Elect the most powerful wifi signal.
Connection if possible.
Successfully connected to wifi 'some-other-ssid'!
- haskell-platform
- nmcli (which is packaged with NetworkManager tools in debian-based machine).
You already have some connection settings applied to your machine.
Tested only on debian-based machine
- Disconnect your wifi
- Run the command
- This will connect you
- Let your current wifi connected
- Activate the tethering on your mobile phone and let your mobile phone near your computer.
- Run the command
- This will connect you over the tethering connection which must be more powerful than your other wifi connections