Hotspot Connector


Introduction

The Hotspot Connector is a set of software tools for authenticating Wi-Fi devices at public, commercial hotspots.

A number of proprietary clients exist to automate the hotspot authentication process (though only for Windows). A key component of these so-called smart clients is a knowledge base that documents how to connect and disconnect at each hotspot. Our aim is to enable a community effort to create an open knowledge base of this hotspot connection information.

License

See COPYING.txt.

Locations and Status

Operator name Connection method Status Comments
ACSA WISPr OK  
Hub télécom WISPr OK was ADP Telecom
Orange WISPr ? "Abort URL login" field missing.
SFR UAM ?  
Sprint WISPr OK  
SurfandSip UAM OK Requires partner parameter. Also, seems to be WISPr compliant, but WISPr messages are incorrect.
SwissCom Eurospot WISPr OK  
The Cloud WISPr OK Tested using BT account.
T-Mobile UAM ?  

More Background

We are creating a framework and a set of scripts that document, in working code, the login mechanisms for specific public, commercial Wi-Fi hotspots. These tools can be used, along with valid account credentials, to login and logout at these hotspots.

Two "standards" are often used by hotspot operators for web-based login: WISPr and UAM. Many incompatible variants of these standards have been deployed, and it is not straightforward to write client software that can automate the login process across a wide variety of locations. Having such client software is valuable, however, for simplifying the end-user Wi-Fi roaming experience -- and for enabling new devices, such as PDAs, phones, game devices that have more limited user interfaces. It can be very awkward to try to enter a username and password on something without a keyboard.

At this point we have a Ruby implementation of WISPr and UAM, and the details of how to use them to login and logout at a small, but growing set of hotspot operators. We have tested this implementation on Windows and OS X platforms; it should run wherever Ruby is available. We also have a C/C++ wrapper that allows this Ruby code to be used as a Windows DLL from C/C++ clients.

WISPr

At WISPr compliant hotspots, some XML content in the landing page provides information about how to login and logout. Here's an example:
<!--
<?xml version='1.0' encoding='UTF-8'?>
<WISPAccessGatewayParam
        xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
        xsi:noNamespaceSchemaLocation='WISPAccessGatewayParam.xsd'>
    <Redirect>
        <MessageType>100</MessageType>
	<ResponseCode>0</ResponseCode>
	<AccessProcedure>1.0</AccessProcedure>
	<LocationName>Hôtel Ugerel Alpexpo</LocationName>
	<ReplyMessage></ReplyMessage>
	<AccessLocation>BackEnd Remote Login</AccessLocation>
	<LoginURL>https://clblgn.swisscom-eurospot.com:890/goform/HtmliPassLoginRequest</LoginURL>
	<AbortLoginURL>http://clblgn.swisscom-eurospot.com:880/goform/HtmliPassLogout</AbortLoginURL>
    </Redirect>
</WISPAccessGatewayParam>
-->

UAM

With UAM, the user is typically presented a form in which they can enter their username and password. At a minimum, automating a UAM login involves doing an appropriate POST (or GET), but there are many variants out there. Our solution is to write scripts that implement the login and logout methods. Here's a fairly complex example of a login script where it's necessary to find and re-present the value of a hidden field.
---
action: TEST_UNCONNECTED
---
action: GET
url: http://www.google.com/
parse:
  -
	  regexp: <INPUT\s+type=hidden\s+value="?(\S)"?\s+name="?t"?(\S)>
	  value: <HIDDEN_1>
---
action: POST
url: https://hotspot.t-mobile.net/wlan/index.do
parameters:
  username: <USERNAME>
  password: <PASSWORD>
  strHinweis: Zahlungsbedingungen
  strAGB: AGB
  t: <HIDDEN_1>
---
action: TEST_CONNECTED

Dependencies

The Hotspot Connector is written both in Ruby and C.

In order to run the Ruby scripts, you need to install:

In order to build the dll and the sample application, you also need:

Usage

For ruby usage, see connector-main.rb, wispr-main.rb, and uam-main.rb in the lib directory. For example, to login at a WISPr hotspot:

ruby wispr-main.rb -u USERNAME -p PASSWORD

Sourceforge Project

http://sourceforge.net/projects/hotspot-connect

Source Code

The source code for the project is hosted on SourceForge at http://cvs.sourceforge.net/viewcvs.py/hotspot-connect.

Code Organization

certs
contains the SSL certificates in pem format
include
exported header files
lib
ruby scripts
scripts
UAM connection scripts for the hotspot-connector engine
sample
C sample code using the hotspot-connector dll
src
C files
test
ruby unit tests