30 #ifdef ESP8266_USE_SOFTWARE_SERIAL
31 #include "SoftwareSerial.h"
41 #ifdef ESP8266_USE_SOFTWARE_SERIAL
50 ESP8266(SoftwareSerial &uart, uint32_t baud = 9600);
60 ESP8266(HardwareSerial &uart, uint32_t baud = 9600);
133 bool joinAP(String ssid, String pwd);
153 bool setSoftAPParam(String ssid, String pwd, uint8_t chl = 7, uint8_t ecn = 4);
207 bool createTCP(String addr, uint32_t port);
244 bool createTCP(uint8_t mux_id, String addr, uint32_t port);
264 bool registerUDP(uint8_t mux_id, String addr, uint32_t port);
338 bool send(
const uint8_t *buffer, uint32_t len);
349 bool send(uint8_t mux_id,
const uint8_t *buffer, uint32_t len);
359 uint32_t
recv(uint8_t *buffer, uint32_t buffer_size, uint32_t timeout = 1000);
370 uint32_t
recv(uint8_t mux_id, uint8_t *buffer, uint32_t buffer_size, uint32_t timeout = 1000);
384 uint32_t
recv(uint8_t *coming_mux_id, uint8_t *buffer, uint32_t buffer_size, uint32_t timeout = 1000);
396 String recvString(String target, uint32_t timeout = 1000);
401 String recvString(String target1, String target2, uint32_t timeout = 1000);
406 String recvString(String target1, String target2, String target3, uint32_t timeout = 1000);
411 bool recvFind(String target, uint32_t timeout = 1000);
417 bool recvFindAndFilter(String target, String begin, String end, String &data, uint32_t timeout = 1000);
428 uint32_t recvPkg(uint8_t *buffer, uint32_t buffer_size, uint32_t *data_len, uint32_t timeout, uint8_t *coming_mux_id);
433 bool eATGMR(String &version);
435 bool qATCWMODE(uint8_t *mode);
436 bool sATCWMODE(uint8_t mode);
437 bool sATCWJAP(String ssid, String pwd);
438 bool eATCWLAP(String &list);
440 bool sATCWSAP(String ssid, String pwd, uint8_t chl, uint8_t ecn);
441 bool eATCWLIF(String &list);
443 bool eATCIPSTATUS(String &list);
444 bool sATCIPSTARTSingle(String type, String addr, uint32_t port);
445 bool sATCIPSTARTMultiple(uint8_t mux_id, String type, String addr, uint32_t port);
446 bool sATCIPSENDSingle(
const uint8_t *buffer, uint32_t len);
447 bool sATCIPSENDMultiple(uint8_t mux_id,
const uint8_t *buffer, uint32_t len);
448 bool sATCIPCLOSEMulitple(uint8_t mux_id);
449 bool eATCIPCLOSESingle(
void);
450 bool eATCIFSR(String &list);
451 bool sATCIPMUX(uint8_t mode);
452 bool sATCIPSERVER(uint8_t mode, uint32_t port = 333);
453 bool sATCIPSTO(uint32_t timeout);
460 #ifdef ESP8266_USE_SOFTWARE_SERIAL
461 SoftwareSerial *m_puart;
463 HardwareSerial *m_puart;
bool send(const uint8_t *buffer, uint32_t len)
Send data based on TCP or UDP builded already in single mode.
String getVersion(void)
Get the version of AT Command Set.
bool releaseTCP(void)
Release TCP connection in single mode.
uint32_t recv(uint8_t *buffer, uint32_t buffer_size, uint32_t timeout=1000)
Receive data from TCP or UDP builded already in single mode.
bool enableMUX(void)
Enable IP MUX(multiple connection mode).
String getLocalIP(void)
Get the IP address of ESP8266.
bool setOprToSoftAP(void)
Set operation mode to softap.
bool setOprToStationSoftAP(void)
Set operation mode to station + softap.
bool createTCP(String addr, uint32_t port)
Create TCP connection in single mode.
bool unregisterUDP(void)
Unregister UDP port number in single mode.
bool startServer(uint32_t port=333)
Start Server(Only in multiple mode).
bool stopTCPServer(void)
Stop TCP Server(Only in multiple mode).
bool stopServer(void)
Stop Server(Only in multiple mode).
bool disableMUX(void)
Disable IP MUX(single connection mode).
bool restart(void)
Restart ESP8266 by "AT+RST".
bool kick(void)
Verify ESP8266 whether live or not.
bool joinAP(String ssid, String pwd)
Join in AP.
bool registerUDP(String addr, uint32_t port)
Register UDP port number in single mode.
bool leaveAP(void)
Leave AP joined before.
bool setTCPServerTimeout(uint32_t timeout=180)
Set the timeout of TCP Server.
Provide an easy-to-use way to manipulate ESP8266.
bool startTCPServer(uint32_t port=333)
Start TCP Server(Only in multiple mode).
bool setSoftAPParam(String ssid, String pwd, uint8_t chl=7, uint8_t ecn=4)
Set SoftAP parameters.
bool setOprToStation(void)
Set operation mode to staion.
String getAPList(void)
Search available AP list and return it.
String getIPStatus(void)
Get the current status of connection(UDP and TCP).
String getJoinedDeviceIP(void)
Get the IP list of devices connected to SoftAP.