com.eurotech.framework.linux.net.wifi
Class WpaSupplicant

java.lang.Object
  extended by com.eurotech.framework.linux.net.wifi.WpaSupplicant

public class WpaSupplicant
extends Object

Defines WiFi wpa_supplicant tool

Author:
ilya.binshtok

Method Summary
 void disable()
          Stops wpa_supplicant
 void enable()
          Launches wpa_supplicant
 boolean equals(Object obj)
           
 WifiBgscan getBgscan()
           
 int[] getChannels()
           
static String getConfigFilename()
          Reports wpa_supplicant configuration file
 String getDriver()
           
 WifiCiphers getGroupCiphers()
           
 String getInterface()
           
 WifiMode getMode()
           
 WifiCiphers getPairwiseCiphers()
           
 String getPassword()
           
 String getSSID()
           
 WifiSecurity getWifiSecurity()
           
static WpaSupplicant getWpaSupplicant(String ifaceName)
           
static WpaSupplicant getWpaSupplicant(String iface, WifiMode mode, String driver, String essid, WifiSecurity security, WifiCiphers pairwiseCiphers, WifiCiphers groupCiphers, int[] scanChannels, String passwd, WifiBgscan bgscan)
          Instantiates WpaSupplicant object
static boolean hasInstanceRunning()
          Reports if there is an instance of wpa_supplicant running
 boolean isEnabled()
          Reports if wpa_supplicant is running
static void killAll()
          Stops all instances of wpa_supplicant
 void saveConfig()
           
 void setBgscan(WifiBgscan bgscan)
           
 void setChannels(int[] channels)
           
 void setDriver(String driver)
           
 void setGroupCiphers(WifiCiphers ciphers)
           
 void setInterface(String iface)
           
 void setMode(WifiMode mode)
           
 void setPairwiseCiphers(WifiCiphers ciphers)
           
 void setPassword(String password)
           
 void setSSID(String ssid)
           
 void setWifiSecurity(WifiSecurity security)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getWpaSupplicant

public static WpaSupplicant getWpaSupplicant(String iface,
                                             WifiMode mode,
                                             String driver,
                                             String essid,
                                             WifiSecurity security,
                                             WifiCiphers pairwiseCiphers,
                                             WifiCiphers groupCiphers,
                                             int[] scanChannels,
                                             String passwd,
                                             WifiBgscan bgscan)
Instantiates WpaSupplicant object

Parameters:
iface - - interface name as String
mode - - wifi mode (master, managed, ad-hoc) as WifiMode
driver - - driver name as String
essid - - service set ID (ESSID) as String
securityType - - security type as WifiSecurity
pairwiseCiphers - - allowed pairwise ciphers as WifiCiphers
groupCiphers - - allowed group ciphers as WifiCiphers
scanChannels- - scan channels as int[]
passwd - - password as String
bgscan - - background scan as WifiBgscan

getWpaSupplicant

public static WpaSupplicant getWpaSupplicant(String ifaceName)
                                      throws EsfException
Throws:
EsfException

enable

public void enable()
            throws EsfException
Launches wpa_supplicant

Throws:
Exception
EsfException

disable

public void disable()
             throws EsfException
Stops wpa_supplicant

Throws:
Exception
EsfException

killAll

public static void killAll()
                    throws EsfException
Stops all instances of wpa_supplicant

Throws:
Exception
EsfException

getConfigFilename

public static String getConfigFilename()
Reports wpa_supplicant configuration file

Returns:
full path to wpa_supplicant configuration file String

isEnabled

public boolean isEnabled()
                  throws EsfException
Reports if wpa_supplicant is running

Returns:
boolean
Throws:
EsfException

hasInstanceRunning

public static boolean hasInstanceRunning()
                                  throws EsfException
Reports if there is an instance of wpa_supplicant running

Returns:
boolean
Throws:
EsfException

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getInterface

public String getInterface()

setInterface

public void setInterface(String iface)

getDriver

public String getDriver()

setDriver

public void setDriver(String driver)

getMode

public WifiMode getMode()

setMode

public void setMode(WifiMode mode)

getSSID

public String getSSID()

setSSID

public void setSSID(String ssid)

getPassword

public String getPassword()

setPassword

public void setPassword(String password)

getWifiSecurity

public WifiSecurity getWifiSecurity()

setWifiSecurity

public void setWifiSecurity(WifiSecurity security)

getPairwiseCiphers

public WifiCiphers getPairwiseCiphers()

setPairwiseCiphers

public void setPairwiseCiphers(WifiCiphers ciphers)

getGroupCiphers

public WifiCiphers getGroupCiphers()

setGroupCiphers

public void setGroupCiphers(WifiCiphers ciphers)

getChannels

public int[] getChannels()

setChannels

public void setChannels(int[] channels)

getBgscan

public WifiBgscan getBgscan()

setBgscan

public void setBgscan(WifiBgscan bgscan)

saveConfig

public void saveConfig()
                throws EsfException
Throws:
EsfException


Copyright © 2013. All Rights Reserved.