WISPr Wireless ISP Autologin


[edit] Automated WISPr hotspot login

WISPr is a protocol used for automated login to WiFi hotspots operated by FON, BTWiFi, SFR, Netia and others. A "smart client" (such as the WiFi apps produced by the hotspot operators) interrogates the captive portal, receives from it the portal's login URL and supplies the user's (stored) login credentials for authentication.

As of 2013, BtWiFi hotspots are everywhere, my FON login credentials are valid, and auto-login with WISPr (subject to having the right client) just works. Symbian, iOS, Android have been doing this for years and I'm really surprised to find no standard implementation for Linux, much less for the N900. But, there's a way to hack it together.

You will need:

  1. Perl WISPr code from https://github.com/matsuu/auwifispot-client/blob/master/wispr_login.pl
  2. Crypt::SSLeay, LWP::UserAgent and XML::Simple.

When that's all installed correctly, you should be able to connect to a WISPr-enabled SSID and run "wispr_login.pl -u user@domain.tld -p password". You may need to specify your user as BTFON/user@domain.tld, if you're a FON customer accessing a BTWiFi hotspot. Make sure that this works manually, I suggest, before you go any further, then copy it to /usr/local/bin/wispr_login.

Once you achieve a successful login to a WISPr-enabled hotspot, all you need is a way to automate the WISPr login script on connecting to a suitable SSID. I have favoured doing this in bash script for extensibility; I want to be able to support using two or three different sets of login credentials across various different hotspot networks.

Let's throw together a bash wrapper, to be run from dbus-scripts on connection to a WiFi network. This will check the SSID against a list of known SSIDs for which we have login credentials, fetch the credentials for the current SSID, and launch an invocation of the wispr_login client if it finds them. Obviously, this can and should be extended to support as many hotspot networks as you like.


# Designed to be run from dbus-scripts on connect to WLAN
# Requires wireless-tools to check the SSID
# Requires Matsuu Takuto's wispr_login.pl, https://github.com/matsuu/auwifispot-client/blob/master/wispr_login.pl
# Requires XML::Simple, LWP::UserAgent, Crypt::SSLeay

# Fetch the current SSID

SSID=`iwgetid|cut -d \" -f 2`;

# Determine if we have login credentials for the current SSID
# The credentials files are simple text files containing the arguments to wispr_login.pl, -u <user> -p <pass>

case "$SSID" in 
   "BTWiFi") CREDENTIALS=`cat /root/.wispr/credentials/btwifi` ;;  
   *"BTOpenzone"* ) CREDENTIALS=`cat /root/.wispr/credentials/vodafone`;;
   *"_The Cloud"* ) CREDENTIALS=`cat /root/.wispr/credentials/thecloud`;;
   *"FON_"* ) CREDENTIALS=`cat /root/.wispr/credentials/fon`;;

# If we didn't match the SSID and find some credentials, abort
[ -z "$CREDENTIALS" ] && echo "No credentials for SSID: $SSID" && exit;

# OK, we're still here

echo "Matched SSID: $SSID"
echo "Trying WISPr login"
/usr/local/bin/wispr_login $CREDENTIALS

Save it as /usr/local/bin/wispr, and test it by logging onto an appropriate SSID and running it manually. Create your credentials file(s) first, containing just the arguments to wispr_login. All being well, it will identify the SSID and run wispr_login with the desired login credentials. Again, make sure that this works manually before you automate it.

When it does, add it to dbus-scripts:

/usr/local/bin/wispr * * com.nokia.icd status_changed * WLAN_INFRA CONNECTED

and try connecting to a supported network. Dbus-scripts will run your bash wrapper, which, if it matches the SSID, will launch the wispr_login. So far this is tested on a single network, and there's still room to figure out how to use it across Europe.

[edit] Networks tested or to be tested

Please add to this section as appropriate.

[edit] United Kingdom

[edit] BT WiFi

BTWiFi hotspots are hosted, in the main, by newer BT Home Hubs, and are now quite plentiful in populated areas. These do support WISPr, although I have only tested it so far with BT FON credentials.

  • SSIDs: BTWiFi, BTWiFi-with-FON, BTFON, BTOpenzone-B, BTOpenzone-H
  • Available to: BT broadband subscribers, FON members, FON partner subscribers

[edit] The Cloud

Found in pubs and town centres; free sign-up available. Believed to support WISPr, but not tested yet.

[edit] O2 WiFi

Found in Costa, McDonald's, O2, Fuller's pubs. Free sign-up available, doesn't look like it relies on WISPr as it registers devices against an account by way of an authenticated mobile phone number.

[edit] Virgin Media WiFi

Found on the London Underground; free to customers of Vodafone, Virgin Media, Virgin Mobile, Orange, T-Mobile. Doesn't look like it relies on WISPr as it claims to remember individual devices after one-time registration, presumably by MAC address.

[edit] FON

FON hotspots in the United Kingdom are a moveable feast; some are too old to support WISPr, some use proprietary software, but it is my understanding that some newer ones do. However, the vast majority of UK FON hotspots are provided through their tie-up with BT, and Foneros are able to use their Fon logins via WISPr at BTWiFi hotspots, just prefix your username with "BTFON/". So, WISPr does work for FON users in the UK, just not automatically on older Foneras or custom FON hotspots.

[edit] France

[edit] Belgium

[edit] Germany

[edit] Poland

[edit] Russia

[edit] Japan