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

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

public class Hostapd
extends Object

Defines hostapd AP mode tool

Author:
ilya.binshtok

Method Summary
 void disable()
          Stops hostapd
 void enable()
          Launches hostapd
 boolean equals(Object obj)
           
 int getChannel()
          Get the channel
static String getConfigFilename()
           
 String getDriver()
          Get the driver
static Hostapd getHostapd()
           
static Hostapd getHostapd(String iface, String driver, String essid, WifiRadioMode radioMode, int channel, WifiSecurity security, String password)
          Hostapd constructor
 String getInterface()
          Get the interface name
 String getPassword()
          Get the password
 WifiRadioMode getRadioMode()
          Get the radio mode
 WifiSecurity getSecurity()
          Get the security type
 String getSSID()
          Get the SSID
static boolean hasInstanceRunning()
          Reports if there is an instance of hostapd running
 boolean isEnabled()
          Reports if hostapd is running
static void killAll()
          Stops all instances of hostapd
 void saveConfig()
          Save the current values to the config file
 void setChannel(int channel)
          Set the channel
 void setDriver(String driver)
          Set the driver
 void setInterface(String iface)
          Set the interface name
 void setPassword(String password)
          Set the password
 void setRadioMode(WifiRadioMode radioMode)
          Set the radio mode
 void setSecurity(WifiSecurity security)
          Set the security type
 void setSSID(String essid)
          Set the SSID
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getHostapd

public static Hostapd getHostapd()
                          throws EsfException
Throws:
EsfException

getHostapd

public static Hostapd getHostapd(String iface,
                                 String driver,
                                 String essid,
                                 WifiRadioMode radioMode,
                                 int channel,
                                 WifiSecurity security,
                                 String password)
Hostapd constructor

Parameters:
iface - - interface name as String
driver - - driver as String
essid - - SSID as String
hwMode - - hardware mode as
channel - - channel as
securityType - - security type as
password - - password as

equals

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

getInterface

public String getInterface()
Get the interface name


setInterface

public void setInterface(String iface)
Set the interface name


getDriver

public String getDriver()
Get the driver


setDriver

public void setDriver(String driver)
Set the driver


getSSID

public String getSSID()
Get the SSID


setSSID

public void setSSID(String essid)
Set the SSID


getRadioMode

public WifiRadioMode getRadioMode()
Get the radio mode

Returns:
WifiOptions

setRadioMode

public void setRadioMode(WifiRadioMode radioMode)
Set the radio mode


getChannel

public int getChannel()
Get the channel


setChannel

public void setChannel(int channel)
Set the channel


getSecurity

public WifiSecurity getSecurity()
Get the security type

Returns:
WifiOptions

setSecurity

public void setSecurity(WifiSecurity security)
Set the security type


getPassword

public String getPassword()
Get the password


setPassword

public void setPassword(String password)
Set the password


saveConfig

public void saveConfig()
                throws EsfException
Save the current values to the config file

Throws:
EsfException

enable

public void enable()
            throws EsfException
Launches hostapd

Throws:
Exception
EsfException

disable

public void disable()
             throws EsfException
Stops hostapd

Throws:
Exception
EsfException

killAll

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

Throws:
Exception
EsfException

isEnabled

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

Returns:
boolean
Throws:
EsfException

hasInstanceRunning

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

Returns:
boolean
Throws:
EsfException

getConfigFilename

public static String getConfigFilename()


Copyright © 2013. All Rights Reserved.