The test demo of library WeeESP8266.
#define SSID "ITEAD"
#define PASSWORD "12345678"
void setup(void)
{
Serial.begin(9600);
Serial.print("setup begin\r\n");
Serial.println("set uart is ok ");
}
else{
Serial.println("set uart is error");
}
Serial.println("it is STA");
}
Serial.println("it is AP");
}
Serial.println("it is AP+SoftAP");
}
{
Serial.println("it is leave");
}
{
Serial.println("it is set param ok");
}
Serial.print("the state of DHCP:");
Serial.println(wifi.
getDHCP().c_str());
Serial.println("it is set DHCP OK");
}
Serial.println(wifi.
getDHCP().c_str());
Serial.println("take off auto connect ok");
}
Serial.print("get the station mac: ");
Serial.println("set station mac is ok ");
}
else {
Serial.println("it is error");
}
Serial.print("get the station mac: ");
Serial.print("get the station's ip");
if(wifi.
setStationIp(
"192.168.1.6",
"192.168.1.1",
"255.255.255.0")){
Serial.println("set station's ip is ok");
}
else{
Serial.println("set station's ip is error");
}
Serial.print("get the station's ip");
Serial.print("get the ap's ap");
Serial.println(wifi.
getAPIp().c_str());
Serial.println("set ap's ip is ok");
}
else
{
Serial.println("set ap's is is error");
}
Serial.print("get the ap's ap");
Serial.println(wifi.
getAPIp().c_str());
Serial.println("start smartconfig is ok");
}
else{
Serial.println("start smartconfig is error");
}
Serial.println("stop smartconfig is ok");
}
else{
Serial.println("stop smartconfig is error");
}
Serial.print("get the current status of connection:");
Serial.println("save trans link is ok");
}
else{
Serial.println("save trans link is error");
}
Serial.println("setup end\r\n");
}
void loop(void)
{
}