public class TiWiFi extends Object
Modifier and Type | Method and Description |
---|---|
void |
changePassword(String password)
Change the WiFi password, effective at next startup
|
void |
changeSoftAPPassword(String password)
Change the WiFi softAP password, effective at next startup
|
void |
changeSoftAPSSID(String SSID)
Change the WiFi softAP SSID, effective at next startup
|
void |
changeSSID(String SSID)
Change the WiFi SSID, effective at next startup
|
String |
getAddress()
Gets the address of WiFi
|
static TiWiFi |
getInstance()
Gets the WiFi object
|
String |
getPassword()
Gets the WiFi password
|
String |
getSoftAPAddress()
Gets the address of softAP of WiFi
|
String |
getSoftAPPassword()
Gets the WiFi softAP password
|
String |
getSoftAPSSID()
Gets the WiFi softAP SSID
|
String[] |
getSoftAPStaticAddress()
Gets the WiFi softAP static address
|
int |
getSoftAPStationNum()
Gets the number of station on the softAP of WiFi
|
String |
getSSID()
Gets the WiFi SSID
|
String[] |
getStaticAddress()
Gets the WiFi static address
|
boolean |
isConnected()
Check if WiFi is connected
|
void |
setSoftAPStaticAddress(String localAddress,
String gateWayAddress,
int subnetPrefix)
Set the WiFi softAP static address, effective at next startup
|
void |
setStaticAddress(String localAddress,
String gateWayAddress,
int subnetPrefix)
Set the WiFi static address, effective at next startup
|
void |
shutdown()
Shutdown the WiFi, WiFi and WiFiSoftAP are shutdown at the same time
|
void |
shutdownSoftAP()
Shutdown the softAP of WiFi
|
void |
smartConfig(int timeout)
The WiFi smart configuration, and connect to the AP
|
void |
startup(int timeout)
Startup the WiFi, and connect to the AP
|
void |
startupSoftAP(boolean hidden)
Startup the softAP of WiFi, WiFi must startup first
|
public void changePassword(String password) throws IOException
password
- password string of AP, or "" no passwordIOException
- If a TiWiFi error occursNullPointerException
- If password is nullpublic void changeSoftAPPassword(String password) throws IOException
password
- password string of AP, or nullIOException
- If a TiWiFi error occursNullPointerException
- If password is nullpublic void changeSoftAPSSID(String SSID) throws IOException
SSID
- SSID string of APIOException
- If a TiWiFi error occursNullPointerException
- If SSID is nullpublic void changeSSID(String SSID) throws IOException
SSID
- SSID string of APIOException
- If a TiWiFi error occursNullPointerException
- If SSID is nullpublic String getAddress() throws IOException
IOException
- If a TiWiFi error occurspublic static TiWiFi getInstance()
public String getPassword() throws IOException
IOException
- If a TiWiFi error occurspublic String getSoftAPAddress() throws IOException
IOException
- If a TiWiFi error occurspublic String getSoftAPPassword() throws IOException
IOException
- If a TiWiFi error occurspublic String getSoftAPSSID() throws IOException
IOException
- If a TiWiFi error occurspublic String[] getSoftAPStaticAddress() throws IOException
IOException
- If a TiWiFi error occurspublic int getSoftAPStationNum() throws IOException
IOException
- If a TiWiFi error occurspublic String getSSID() throws IOException
IOException
- If a TiWiFi error occurspublic String[] getStaticAddress() throws IOException
IOException
- If a TiWiFi error occurspublic boolean isConnected() throws IOException
IOException
- If a TiWiFi error occurspublic void setSoftAPStaticAddress(String localAddress, String gateWayAddress, int subnetPrefix) throws IOException
localAddress
- local addressgateWayAddress
- gateWay addresssubnetPrefix
- the subnet prefix lengthIOException
- If a TiWiFi error occursNullPointerException
- If localAddress or gateWayAddress is nullpublic void setStaticAddress(String localAddress, String gateWayAddress, int subnetPrefix) throws IOException
localAddress
- local addressgateWayAddress
- gateWay addresssubnetPrefix
- the subnet prefix lengthIOException
- If a TiWiFi error occursNullPointerException
- If localAddress or gateWayAddress is nullpublic void shutdown() throws IOException
IOException
- If a TiWiFi error occurspublic void shutdownSoftAP() throws IOException
IOException
- If a TiWiFi error occurspublic void smartConfig(int timeout) throws IOException
timeout
- connect timeout, unit:secondIOException
- If a TiWiFi error occurspublic void startup(int timeout) throws IOException
timeout
- connect timeout, unit:secondIOException
- If a TiWiFi error occurspublic void startupSoftAP(boolean hidden) throws IOException
hidden
- true:SSID hidden, false:SSID not hidden[IN]IOException
- If a TiWiFi error occurs