Table Of Contents
Creating PDA Page Sets
PDA Page Set Overview
Using ASP Files in PDA Page Sets
SM_CommonSubroutines.asp
SM_detectDevice.asp
Sample PDA Page Sets
MinuteICS
SM_MinuteICSPackage.asp
SM_MinuteICSStart.asp
SM_MinuteICSPost.asp
SM_MinuteICSFail.asp
MinuteICSClear
RADIUSUBand
SM_RADIUSUBandPackage.asp
SM_RADIUSUBandStart.asp
SM_RADIUSUBandPost.asp
SM_RADIUSUBandBusy.asp
SM_RADIUSUBandFail.asp
1.4.3.6 SM_RADIUSUBandServerFail.asp
RADIUSUBandClear
Testing Your PDA Page Set
Creating PDA Page Sets
This appendix describes personal digital assistant (PDA) page sets and the methods that are used to differentiate between wireless laptops and wireless PDA devices. It also briefly discusses the issues of developing custom page sets for a PDA and includes procedures and examples.
BBSM already has the capability of working on wireless laptops. This appendix presents the sample ASP files that allow BBSM to differentiate between wireless devices; that is, laptops and PDAs. These pages allow either wireless device to begin initiating a session through BBSM. The new logic differentiates which wireless device is being used and redirects the end user to the relevant pages.
Before reading the appendix and creating your PDA page sets, we recommend that you read the entire SDK documentation and especially focus on "Customizing and Creating Page Sets," which presents information needed to create page sets. The principles for creating PDA page sets are the same as those for creating other page sets, and the same assumptions are made regarding the developer's familiarity with technologies.
Note that, in addition to a BBSM server and an Active Server page editor (such as NotePad), you will also need a PDA for testing your pages. The sample pages that follow were developed for the Compaq iPAQ.
PDA Page Set Overview
Four sample PDA page sets were developed and are described in this appendix:
•
RADIUSUBand
•
RADIUSUBandClear
•
MinuteICS
•
MinuteICSClear
All of these PDA page titles have a prefix of "SM_" followed by the standard naming procedure that BBSM uses.
When developing your PDA page set, we recommend that you follow the path used for the standard page sets to maintain a look and feel that is similar to the other page sets. This similarity will maintain a consistent end user experience.
Certain limitations exist when developing page sets for the PDA and BBSM:
•
The most obvious limitation is that the viewable display on a PDA is 240 by 320 pixels, which means that the standard graphics must be reduced and text length must be kept in mind.
•
Also, the PDA does not support multiple browser windows, such as BBSM's popup toolbar window that allows the end user to disconnect and end their session. Therefore, the sample page sets do not support WebPrint or BandwidthBoost.
Note
The end user must be informed that to deactivate the session, the PDA must be turned off or the wireless NIC card must be removed.
Using ASP Files in PDA Page Sets
The following two ASP files are used for PDA page sets:
•
SM_CommonSubroutines.asp
•
SM_detectDevice.asp
They are described in the sections that follow.
SM_CommonSubroutines.asp
BBSM provides the CommonSubroutines.asp file in the following directory on the server:
c:\atcom\ekgnkm\
Any PDA page can include this file to use the functions provided in it. Due to the PDA size limitation, a new function was developed to create radio buttons that the end user can use to make selections instead of using the standard drop-down menu.
A new PDA method was created: GenerateCheckBoxes. Use this method to generate an HTML RADIO tag of bandwidth/price/service packages. (For details of the standard CommonSubroutines.asp methods, see the "Using the CommonSubroutines.asp in Page Sets" section.)
SM_detectDevice.asp
This page allows for the distinction between devices. Each time a program, called "user agent," requests a page from a web server, it sets an environment variable called HTTP_USER_AGENT. This variable contains the user agent name, and, in some cases, additional information such as the operating system that the user agent runs under. In this example, the user agent string is being searched for the "CE" OS tag that the PDA uses. If found, the end user is redirected to the PDA pages.
<%
strAgent = Request.ServerVariables("HTTP_USER_AGENT");
strCheck = new RegExp("CE");
bIsIn = strCheck.test(strAgent);
if (bIsIn)
{
Response.Redirect(strSMPortal);
}
%>
Sample PDA Page Sets
The page set names are kept the same for both the standard pages and the PDA pages so that either device type would be able to follow the path set for that page set without the need for any configuration changes. Table 0-1 shows the PDA page sets and the access and accounting policies that they use.
Table 0-1 BBSM PDA Page Sets and Associated Access and Accounting Policies
Page Set
|
Access Policy
|
Accounting Policy
|
See section and page
|
MinuteICS
|
Minute
|
ICSCreditCard
|
MinuteICS
|
MinuteICSClear
|
Minute
|
ICSCreditCard
|
MinuteICSClear
|
RADIUSUBand
|
RADIUS
|
Null
|
RADIUSUBand
|
RADIUSBandClear
|
RADIUS
|
Null
|
RADIUSUBandClear
|
MinuteICS
The MinuteICS page set combines the Minute access policy with the ICSCreditCard accounting policy. The page set prompts the end user to enter credit card information to access the Internet on a per-minute basis. BBSM performs credit card authentication and billing through the CyberSource ICS billing server.
An alert popup box has been added to the posting page to inform the end user on how to end the session. For this page set, the end user is told to turn off the device or remove the wireless NIC card to end the session.
Within the MinuteICSStart.asp page is the included file, SM_detectDevice.asp:
<!-- #INCLUDE File= "SM_detectDevice.asp" -->
Within the MinuteICSPackage.asp, insert this line:
var strSMPortal = "SM_MinuteICSStart.asp";
SM_MinuteICSPackage.asp
The SM_MinuteICSPackage.asp page, which the end user does not see, contains configuration information for the page set. This file contains the values for the options described in the "Minute" section. The default configuration for the MinuteICS page set appears below:
var strPageToCheck = "MinuteICS";
var dApprovalAmount = 10.00;
The package file also defines the price package and bandwidth arrays. Each array provides the pricing options for the bandwidth packages that the page set uses to generate a combo box, which allows the end user to select a package when Bandwidth Manager is enabled. The default bandwidth packages for the MinuteICS page set appear below:
var PackagePriceArray = new Array
(
0.33, // package 1, 0.33
0.25, // package 2, 0.25
0.20, // package 3, 0.20
0.15, // package 4, 0.15
0.10 // package 5, 0.10
);
var PackageKbpsArray = new Array
(
0, // package 1, full speed
512, // package 2, 512 Kbits/sec
256, // package 3, 256 Kbits/sec
128, // package 4, 128 Kbits/sec
64 // package 5, 64 Kbits/sec
);
SM_MinuteICSStart.asp
The SM_MinuteICSStart.asp page is the first one that the end user sees. It displays a different user interface depending on whether or not Bandwidth Manager is enabled. The page contains a form that prompts the end user to enter credit card information. If Bandwidth Manager is enabled, the page also displays a combo box of bandwidth packages along with the credit card form.
The form for this page contains the following information:
•
Text input—Cardholder Name
•
Text input—Street Address
•
Text input—City
•
Text input—State/Province
•
Text input—Zip Code
•
Text input—Country
•
Text input—Phone Number
•
Text input—Credit Card Number
•
Select input—Expiration Month
•
Select input—Expiration Year
•
Submit button—Submit Information
Once the end user presses the Submit Information button, SM_MinuteICSStart.asp invokes SM_MinuteICSPost.asp.
SM_MinuteICSPost.asp
The SM_MinuteICSPost.asp page processes the information submitted by SM_MinuteICSStart.asp and calls the Minute access policy's SendActivateSession method to activate the end user's session. The page specifies the ICSCreditCard accounting policy as the first parameter in SendActivateSession and strAccountingInfo as the accounting information parameter. The page builds strAccountingInfo from the parameters submitted by the end user.
strAccountingInfo =
<CCard>" +
<Name>" + strName + "</Name>" +
<Acct>" + strCC + "</Acct>" +
<ExpYr>" + strExpYear + "</ExpYr>" +
<ExpMo>" + strExpMonth + "</ExpMo>" +
<Addr>" + strAddress + "</Addr>" +
<City>" + strCity + "</City>" +
<St>" + strState + "</St>" +
<ZIP>" + strZipCode + "</ZIP>" +
"<Cntry>" + strCountry + "</Cntry>" +
"<Ph>" + strPhone + "</Ph>" +
"</CCard>";
strErrorURL = AccessPolicyMinute.SendActivateSession
(
"ICSCreditCard",
strAccountingInfo,
"SM_MinuteICSFail.asp",
"Error.asp ",
PackagePriceArray [intPackage - 1],
PackageKbpsArray [intPackage - 1],
dApprovalAmount
);
BBSM activates the session and performs an accounting authorization transaction in the background. After a slight delay, the page redirects the end user to the portal page. The delay gives AtDial enough time to receive and process the activate session message, and it gives the user interface a chance to display a "connecting..." page.
•
If the authorization transaction succeeds, BBSM allows the end user's session to continue.
•
If the authorization transaction fails, the server performs a forced redirect to SM_MinuteICSFail.asp.
SM_MinuteICSFail.asp
BBSM serves this page to the end user as the result of a forced redirect after an authorization failure. The SM_MinuteICSFail page displays to the end user a message indicating that the credit card authorization failed. The page displays a button that allows the end user to try again. If the end user clicks the button, BBSM serves the SM_MinuteICSStart.asp page, which prompts the end user to enter credit card information again.
Note
This page set allows the end user access to the Internet before BBSM knows the result of the authorization transaction. Because the credit card server response time varies, the end user may have access to the Internet for several minutes before BBSM receives a denial and performs a forced redirect to the SM_MinuteICSFail.asp page.
MinuteICSClear
The MinuteICSClear page set is similar to the MinuteICS page set except in that it is used for testing or demonstrating purposes only. The page set does not use SSL and must not be used in the field.
RADIUSUBand
The RADIUSUBand page set combines the RADIUS access policy with the Null accounting policy. The page set prompts the end user to enter a RADIUS username and password to access the Internet. It also permits the end user to select their desired bandwidth at a specified price.
An alert popup box has been added to the posting page to inform the end user on how to end the session. For this page set, the end user is told to turn off the device or remove the wireless NIC card to end the session.
Within the RADIUSUBandStart.asp page is the included file, SM_detectDevice.asp:
<!-- #INCLUDE File=" SM_detectDevice.asp" -->
Within the RADIUSUBandPackage.asp insert this line:
var strSMPortal = "SM_RADIUSUBandStart.asp";
SM_RADIUSUBandPackage.asp
This page, which the end user does not see, contains configuration information for the page set. This file contains the values for the options described in the "RADIUS" section. The following is the default configuration for the SM_RADIUSUBand page set:
var strPageToCheck = "RADIUSUBand";
The package file also defines the price, bandwidth, and service type arrays. Each array provides the pricing options for the bandwidth packages for that service type that the page set uses to generate radio buttons. The following are the default bandwidth packages for the SM_RADIUSUBand page set.
var PackagePriceArray = new Array
(
.20, // package 1, .20 per minute
.10 // package 2, .10 per minute
);
var PackageKbpsArray = new Array
(
0, // package 1, full speed
64 // package 2, 64 Kbits/sec
);
var PackageServiceArray = new Array
(
"Platinum", // Premium package
"Gold" // Average package
);
SM_RADIUSUBandStart.asp
The SM_RADIUSBandStart.asp page is the first page that the end user sees after redirection. It contains a form that prompts the end user for a RADIUS username, password, and package selection.
The form for this page contains the following:
•
Text input—Username
•
Text input—Password
•
Radio button—Package
•
Submit button—Login
Once the end user presses the Login button, SM_RADIUSUBandStart.asp invokes SM_RADIUSUBandPost.asp.
SM_RADIUSUBandPost.asp
The SM_RADIUSUBandPost.asp page processes the information submitted by SM_RADIUSUBandStart.asp and calls the RADIUS access policy's SendActivateSession method to activate the end user's session. The page passes the username, password, and bandwidth price/kbps to the SendActivateSession method:
strErrorURL = AccessPolicyRADIUS.SendActivateSession
(
strUserName,
strPassword,
"SM_RADIUSUBandServerFail.asp",
"SM_RADIUSUBandFail.asp",
"SM_RADIUSUBandBusy.asp",
"iporterror.asp?msg=SendActivateSession+failed",
PackagePriceArray [intPackage - 1],
PackageKbpsArray [intPackage - 1]
);
•
If the SendActivateSession method succeeds (indicated by an empty string return value), BBSM activates the end user's session and, after a slight delay, redirects the end user to the portal page. The delay gives AtDial enough time to receive and process the activate session message, and it gives the user interface a chance to display a "connecting..." page.
•
If the RADIUS username or password is invalid, SM_RADIUSUBandPost.asp redirects the end user to SM_RADIUSUBandFail.asp.
•
If the site is configured to disallow duplicate RADIUS sessions and the username is being used by another session, SM_RADIUSUBandPost.asp redirects the end user to SM_RADIUSUBandBusy.asp.
•
If the RADIUS server cannot be accessed at the time, SM_RADIUSUBandPost.asp redirects the end user to SM_RADIUSUBandServerFail.asp.
SM_RADIUSUBandBusy.asp
The SM_RADIUSUBandBusy.asp page displays a message to the end user stating that the RADIUS account is already in use and offers the end user a chance to try a different account. This page has the same form as SM_RADIUSUBandStart.asp to prompt the end user for a username, password, and bandwidth again. Once the user presses the Login button, SM_RADIUSUBandBusy.asp invokes SM_RADIUSUBandPost.asp.
SM_RADIUSUBandFail.asp
The SM_RADIUSUBandFail.asp page displays a message to the end user stating that the username or the password is not valid and offers the end user a chance to try again. This page has the same form as SM_RADIUSUBandStart.asp to prompt the end user for a username, password, and bandwidth again. Once the user presses the Login button, SM_RADIUSUBandFail.asp invokes SM_RADIUSUBandPost.asp.
1.4.3.6 SM_RADIUSUBandServerFail.asp
The SM_RADIUSUBandServerFail.asp page displays a message to the end user stating that the RADIUS server cannot be accessed currently and offers the end user a chance to try again. This page has the same form as SM_RADIUSUBandStart.asp to prompt the end user for a username, password, and bandwidth again. Once the user presses the Login button, SM_RADIUSUBandServerFail.asp invokes SM_RADIUSUBandPost.asp.
RADIUSUBandClear
The RADIUSUBandClear page set is similar to the RADIUSUBand page set except that it is used for testing or demonstrating purposes only. This page set does not use SSL and must not be used in the field.
Testing Your PDA Page Set
If your page set uses SSL, you must have a valid certificate installed on your server to test your pages. If you do not have a certificate installed, when you connect a client, you will be unable to view the secure pages. You can make your BBSM a Certificate Authority and then sign your own certificate. This procedure should only be used on a development server and never on a release server. This method is only used for testing secure page sets and is not an acceptable solution for installing a valid certificate on your server. See "Requesting and Installing a Test SSL Certificate on a BBSM Server," for detailed instructions.
If you want to debug the ActiveX server components used in your pages, install the Microsoft development environment on your BBSM server and refer to the "Standalone Debugging ActiveX Server Components" section.
Follow these steps to test your completed PDA page set.
Step 1
Configure your access point on the BBSM server.
Step 2
From the BBSM Dashboard on the server, click WEBconfig.
Step 3
Select the Port Map tab.
Step 4
Under Page Set, from the drop-down menu, select your standard page set. The Start Page text box automatically populates with the URL of your start page.
Step 5
Click Update.
Step 6
Open the browser on the different wireless clients. The appropriate start page for that device should be displayed.
Step 7
Emulate the end user's experience and test your pages.