WiFi on bootup with guessnet

By | 15 Nov 2008

Install the guessnet package. This will install the guessnet-ifupdown helper tool.

Now edit your /etc/network/interfaces file and add the following lines:

auto wlan0
iface wlan0 inet dhcp
    wpa-ssid CompanyWLAN
    wpa-proto WPA 
    wpa-key-mgmt WPA-PSK
    wpa-psk S3Cr3tKe4

mapping wlan0
    script guessnet-ifupdown
    map default: wlan0-open
    map autofilter: true  # look for wlan0- interfaces
    map timeout: 9
    map init-time: 9   # for slow drivers
    map verbose: true
    map debug: false

iface wlan0-home inet dhcp
    test wireless essid WLANatHOME closed
    wpa-psk S3cr3tH0meKe4
    wpa-key-mgmt WPA-PSK
    wpa-proto WPA 
    wpa-ssid WLANatHOME

# if all else fails: pick an open network
iface wlan0-open inet dhcp
    test wireless open
    wireless-essid any 
    wireless-mode autoCode language: PHP (php)

This will first try to connect to the CompanyWLAN network and if this is not found, try the WLANatHOME. If everything fails, it will connect to any open Access Point.

Leave a Reply

Your email address will not be published. Required fields are marked *

Your post must include a link to this post.

How does this work?
Write a response on your own website and include a link to this post. Then submit your response’s URL here. Your response may appear here after moderation. To update or remove it, edit or delete your original post and submit the same URL again. Learn more about Webmentions.