Package ej.ecom.wifi
Class AccessPoint
- java.lang.Object
-
- ej.ecom.wifi.AccessPoint
-
public class AccessPoint extends Object
Wireless Access Point (WAP, often shorten as AP).
-
-
Constructor Summary
Constructors Constructor Description AccessPoint(String ssid, byte[] bssid, float rssi, int channel, SecurityMode securityMode, WPSMode[] wpsModes)Constructs a Wi-Fi Access Point instance.AccessPoint(String ssid, SecurityMode securityMode)Constructs a Wi-Fi access point instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getBSSID()Gets the Basic Service Set IDentification (BSSID).intgetChannel()Gets the channel of this access point.floatgetRSSI()Gets the Received Signal Strength Identification (RSSI) of this access point.SecurityModegetSecurityMode()Gets the security mode (SecurityMode).StringgetSSID()Gets the Service Set IDentification (SSID) of the network.WPSMode[]getWPSCapabilities()Gets the Wi-Fi Protected Setup (WPS) modes supported by this access point.voidsetSecurityMode(SecurityMode securityMode)Sets the security mode (SecurityMode).voidsetSSID(String ssid)Sets the Service Set IDentification (SSID) of the network.
-
-
-
Constructor Detail
-
AccessPoint
public AccessPoint(@Nullable String ssid, @Nullable byte[] bssid, float rssi, int channel, @Nullable SecurityMode securityMode, @Nullable WPSMode[] wpsModes)
Constructs a Wi-Fi Access Point instance.- Parameters:
ssid- the access point SSID ornull.bssid- the access point BSSID ornull.rssi- the access point RSSI.channel- the access point channel.securityMode- the access point security mode ornull.wpsModes- the access point WPS modes ornull.
-
AccessPoint
public AccessPoint(String ssid, SecurityMode securityMode)
Constructs a Wi-Fi access point instance.- Parameters:
ssid- the access point SSID.securityMode- the access point security mode.
-
-
Method Detail
-
getBSSID
public byte[] getBSSID()
Gets the Basic Service Set IDentification (BSSID). This is a MAC address of the access point in infrastructure mode.- Returns:
- the access point BSSID (consists of 6 bytes).
-
getChannel
public int getChannel()
Gets the channel of this access point.- Returns:
- the access point channel.
-
getRSSI
public float getRSSI()
Gets the Received Signal Strength Identification (RSSI) of this access point. This is a negative value expressed in dBm.- Returns:
- the access point RSSI.
-
getSecurityMode
@Nullable public SecurityMode getSecurityMode()
Gets the security mode (SecurityMode).- Returns:
- the access point security mode or
nullif not set.
-
getSSID
@Nullable public String getSSID()
Gets the Service Set IDentification (SSID) of the network.- Returns:
- the access point SSID or
nullif not set.
-
getWPSCapabilities
public WPSMode[] getWPSCapabilities()
Gets the Wi-Fi Protected Setup (WPS) modes supported by this access point.- Returns:
- the supported WPS modes or an empty array if this access point doesn't support WPS
-
setSecurityMode
public void setSecurityMode(@Nullable SecurityMode securityMode)
Sets the security mode (SecurityMode).- Parameters:
securityMode- the access point security mode ornull.
-
-