Package ej.ecom.wifi

Class AccessPoint


  • public class AccessPoint
    extends Object
    Wireless Access Point (WAP, often shorten as AP).
    • 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 or null.
        bssid - the access point BSSID or null.
        rssi - the access point RSSI.
        channel - the access point channel.
        securityMode - the access point security mode or null.
        wpsModes - the access point WPS modes or null.
      • 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 null if not set.
      • getSSID

        @Nullable
        public String getSSID()
        Gets the Service Set IDentification (SSID) of the network.
        Returns:
        the access point SSID or null if 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 or null.
      • setSSID

        public void setSSID​(@Nullable
                            String ssid)
        Sets the Service Set IDentification (SSID) of the network.
        Parameters:
        ssid - the SSID or null.