public class

WimaxController

extends Object
java.lang.Object
   ↳ com.htc.net.wimax.WimaxController

Class Overview

This class provides the primary API for managing all aspects of Wimax connectivity. Get an instance of this class by calling Context.getSystemService(Context.WIMAX_SERVICE). It deals with several categories of items:

  • The list of configured networks. The list can be viewed and updated, and attributes of individual entries can be modified.
  • The currently active Wimax network, if any. Connectivity can be established or torn down, and dynamic information about the state of the network can be queried.
  • Results of access point scans, containing enough information to make decisions about what access point to connect to.
  • It defines the names of various Intent actions that are broadcast upon any sort of change in Wimax state.
This is the API to use when performing Wimax specific operations. To perform operations that pertain to network connectivity at an abstract level, use ConnectivityManager.

Summary

Nested Classes
class WimaxController.WimaxLock Return dynamic information about the current Wimax connection, if any is active. 
Constants
String AUTH_NAI_REJECTED_ACTION
String AUTH_STATE_FAIL_ACTION
String CURRENT_WIMAX_ENABLED_STATE The lookup key for an int that indicates whether Wimax is enabled, disabled, enabling, disabling, or unknown.
int ERROR_AUTHENTICATING The error code if there was a problem authenticating.
String EXTRA_NAPID The lookup key for a String giving the NAPID of the NAP to which we are connected.
String EXTRA_NETWORK_INFO The lookup key for a NetworkInfo object associated with the Wimax network.
String EXTRA_NEW_RSSI_LEVEL The lookup key for an int giving the new RSSI level from 0 to 3.
String EXTRA_NEW_STATE The lookup key for a SsState describing the new state Retrieve with getParcelableExtra(String).
String EXTRA_NSPID The lookup key for a String giving the NSPID of the NSP to which we are connected.
String EXTRA_WXCM_CONNECTED The lookup key for a boolean that indicates whether a connection to the wxcm daemon has been gained or lost.
String NETWORK_IDS_CHANGED_ACTION The network IDs of the configured networks could have changed.
String NETWORK_STATE_CHANGED_ACTION Broadcast intent action indicating that the state of Wimax connectivity has changed.
String ON_BACKOFF_STATE_ACTION
String PICK_WIMAX_NETWORK_ACTION Activity Action: Pick a Wimax network to connect to.
String PREVIOUS_WIMAX_ENABLED_STATE The previous Wimax state.
String RSSI_CHANGED_ACTION The RSSI (signal strength) has changed.
int RSSI_LEVEL Convert RSSI to number of levels.
String SCAN_RESULTS_AVAILABLE_ACTION An NAP and NSP scan has completed, and results are available from the wxcm.
String WIMAX_ENABLED_CHANGED_ACTION Broadcast intent action indicating that Wimax has been enabled, disabled, enabling, disabling, or unknown.
int WIMAX_ENABLED_STATE_DISABLED Wimax is disabled.
int WIMAX_ENABLED_STATE_DISABLING Wimax is currently being disabled.
int WIMAX_ENABLED_STATE_ENABLED Wimax is enabled.
int WIMAX_ENABLED_STATE_ENABLING Wimax is currently being enabled.
int WIMAX_ENABLED_STATE_UNKNOWN Wimax is in an unknown state.
String WXCM_CONNECTION_CHANGE_ACTION Broadcast intent action indicating that a connection to the wxcm has been established (and it is now possible to perform Wimax operations) or the connection to the wxcm has been lost.
String WXCM_ERROR_ACTION The lookup key for a SsState describing the wxcm error code if any Retrieve with getIntExtra(String, int).
String WXCM_STATE_CHANGED_ACTION Broadcast intent action indicating that the state of establishing a connection to an access point has changed.One extra provides the new SsState.
Public Constructors
WimaxController(IWimaxController service, Handler handler)
Public Methods
static int calculateSignalLevel(int rssi100x, int cinr100x)
Calculates the level of the signal.
void cancelAlarmDhcpRenew()
void cancelAlarmScanRetry()
boolean connectToDcs()
WimaxController.WimaxLock createWimaxLock(String tag)
boolean dcIsConnected()
set config about network discovery and selection
boolean disconnectFromDcs()
boolean getBoardName(String boardName)
boolean getRfChipName(String rfChipName)
int getWimaxState()
Gets the Wimax enabled state.
boolean isBackoffState()
boolean isDeviceReady()
boolean isWimaxEnabled()
Return whether Wimax is enabled or disabled.
boolean mgtSetSsStarted(boolean enable)
start the radio interface of this SS
void setAlarmDhcpRenew(long duration)
void setAlarmScanRetry(long duration)
void setWimaxDunMode(boolean isDunMode)
boolean setWimaxEnabled(boolean enabled)
Enable or disable Wimax daemon and SS
boolean setWimaxEnabledPersist(boolean enabled, boolean persist)
int wimaxRescan()
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String AUTH_NAI_REJECTED_ACTION

Constant Value: "com.htc.net.wimax.AUTH_NAI_REJECTED_ACTION"

public static final String AUTH_STATE_FAIL_ACTION

Constant Value: "com.htc.net.wimax.AUTH_STATE_FAIL_ACTION"

public static final String CURRENT_WIMAX_ENABLED_STATE

The lookup key for an int that indicates whether Wimax is enabled, disabled, enabling, disabling, or unknown. Retrieve it with getIntExtra(String, int).

Constant Value: "curWimaxEnabledState"

public static final int ERROR_AUTHENTICATING

The error code if there was a problem authenticating.

Constant Value: 1 (0x00000001)

public static final String EXTRA_NAPID

The lookup key for a String giving the NAPID of the NAP to which we are connected. Only present when the new state is CONNECTED. Retrieve with getStringExtra(String).

Constant Value: "napId"

public static final String EXTRA_NETWORK_INFO

The lookup key for a NetworkInfo object associated with the Wimax network. Retrieve with getParcelableExtra(String).

Constant Value: "networkInfo"

public static final String EXTRA_NEW_RSSI_LEVEL

The lookup key for an int giving the new RSSI level from 0 to 3.

Constant Value: "newRssiLevel"

public static final String EXTRA_NEW_STATE

The lookup key for a SsState describing the new state Retrieve with getParcelableExtra(String).

Constant Value: "newState"

public static final String EXTRA_NSPID

The lookup key for a String giving the NSPID of the NSP to which we are connected. Only present when the new state is CONNECTED. Retrieve with getStringExtra(String).

Constant Value: "nspId"

public static final String EXTRA_WXCM_CONNECTED

The lookup key for a boolean that indicates whether a connection to the wxcm daemon has been gained or lost. true means a connection now exists. Retrieve it with getBooleanExtra(String, boolean).

Constant Value: "connected"

public static final String NETWORK_IDS_CHANGED_ACTION

The network IDs of the configured networks could have changed.

Constant Value: "com.htc.net.wimax.NETWORK_IDS_CHANGED"

public static final String NETWORK_STATE_CHANGED_ACTION

Broadcast intent action indicating that the state of Wimax connectivity has changed. One extra provides the new state in the form of a NetworkInfo object. If the new state is CONNECTED, a second extra may provide the BSSID of the access point, as a String.

Constant Value: "com.htc.net.wimax.STATE_CHANGE"

public static final String ON_BACKOFF_STATE_ACTION

Constant Value: "com.htc.net.wimax.ON_BACKOFF_STATE_ACTION"

public static final String PICK_WIMAX_NETWORK_ACTION

Activity Action: Pick a Wimax network to connect to.

Input: Nothing.

Output: Nothing.

Constant Value: "com.htc.net.wimax.PICK_WIMAX_NETWORK"

public static final String PREVIOUS_WIMAX_ENABLED_STATE

The previous Wimax state.

Constant Value: "preWimaxEnabledState"

public static final String RSSI_CHANGED_ACTION

The RSSI (signal strength) has changed.

See Also
  • #EXTRA_NEW_RSSI
Constant Value: "com.htc.net.wimax.RSSI_CHANGED"

public static final int RSSI_LEVEL

Convert RSSI to number of levels.

Constant Value: 4 (0x00000004)

public static final String SCAN_RESULTS_AVAILABLE_ACTION

An NAP and NSP scan has completed, and results are available from the wxcm. Call #ndssGetScanResults() to obtain the results.

Constant Value: "com.htc.net.wimax.SCAN_RESULTS_AVAILABLE"

public static final String WIMAX_ENABLED_CHANGED_ACTION

Broadcast intent action indicating that Wimax has been enabled, disabled, enabling, disabling, or unknown. One extra provides this state as an int. Another extra provides the previous state, if available.

See Also
Constant Value: "com.htc.net.wimax.WIMAX_ENABLED_CHANGED"

public static final int WIMAX_ENABLED_STATE_DISABLED

Wimax is disabled.

Constant Value: 1 (0x00000001)

public static final int WIMAX_ENABLED_STATE_DISABLING

Wimax is currently being disabled. The state will change to WIMAX_ENABLED_STATE_DISABLED if it finishes successfully.

Constant Value: 0 (0x00000000)

public static final int WIMAX_ENABLED_STATE_ENABLED

Wimax is enabled.

Constant Value: 3 (0x00000003)

public static final int WIMAX_ENABLED_STATE_ENABLING

Wimax is currently being enabled. The state will change to WIMAX_ENABLED_STATE_ENABLED if it finishes successfully.

Constant Value: 2 (0x00000002)

public static final int WIMAX_ENABLED_STATE_UNKNOWN

Wimax is in an unknown state. This state will occur when an error happens while enabling or disabling.

Constant Value: 4 (0x00000004)

public static final String WXCM_CONNECTION_CHANGE_ACTION

Broadcast intent action indicating that a connection to the wxcm has been established (and it is now possible to perform Wimax operations) or the connection to the wxcm has been lost. One extra provides the connection state as a boolean, where true means CONNECTED.

Constant Value: "android.net.wimax.wxcm.CONNECTION_CHANGE"

public static final String WXCM_ERROR_ACTION

The lookup key for a SsState describing the wxcm error code if any Retrieve with getIntExtra(String, int).

Constant Value: "com.htc.net.wimax.wxcmError"

public static final String WXCM_STATE_CHANGED_ACTION

Broadcast intent action indicating that the state of establishing a connection to an access point has changed.One extra provides the new SsState. Note that the wxcm state is Wimax specific, and is not generally the most useful thing to look at if you are just interested in the overall state of connectivity.

See Also
Constant Value: "com.htc.net.wimax.wxcm.STATE_CHANGED"

Public Constructors

public WimaxController (IWimaxController service, Handler handler)

Public Methods

public static int calculateSignalLevel (int rssi100x, int cinr100x)

Calculates the level of the signal. This should be used any time a signal is being shown.

public void cancelAlarmDhcpRenew ()

public void cancelAlarmScanRetry ()

public boolean connectToDcs ()

public WimaxController.WimaxLock createWimaxLock (String tag)

public boolean dcIsConnected ()

set config about network discovery and selection

public boolean disconnectFromDcs ()

public boolean getBoardName (String boardName)

public boolean getRfChipName (String rfChipName)

public boolean isBackoffState ()

public boolean isDeviceReady ()

public boolean isWimaxEnabled ()

Return whether Wimax is enabled or disabled.

Returns
  • true if Wimax is enabled
See Also

public boolean mgtSetSsStarted (boolean enable)

start the radio interface of this SS

public void setAlarmDhcpRenew (long duration)

public void setAlarmScanRetry (long duration)

public void setWimaxDunMode (boolean isDunMode)

public boolean setWimaxEnabled (boolean enabled)

Enable or disable Wimax daemon and SS

public boolean setWimaxEnabledPersist (boolean enabled, boolean persist)

public int wimaxRescan ()