|  | 
| 4 | 4 | 
 | 
| 5 | 5 | An ESP8266 library for Arduino providing an easy-to-use way to manipulate ESP8266. | 
| 6 | 6 | 
 | 
|  | 7 | +## API List | 
|  | 8 | + | 
|  | 9 | + bool	kick (void) : Verify ESP8266 whether live or not. | 
|  | 10 | +   | 
|  | 11 | + bool	restart (void) : Restart ESP8266 by "AT+RST". | 
|  | 12 | +   | 
|  | 13 | + String	getVersion (void) : Get the version of AT Command Set. | 
|  | 14 | +   | 
|  | 15 | + bool	setOprToStation (void) : Set operation mode to staion. | 
|  | 16 | +   | 
|  | 17 | + bool	setOprToSoftAP (void) : Set operation mode to softap. | 
|  | 18 | +   | 
|  | 19 | + bool	setOprToStationSoftAP (void) : Set operation mode to station + softap. | 
|  | 20 | +   | 
|  | 21 | + String	getAPList (void) : Search available AP list and return it. | 
|  | 22 | +   | 
|  | 23 | + bool	joinAP (String ssid, String pwd) : Join in AP.  | 
|  | 24 | +   | 
|  | 25 | + bool	leaveAP (void) : Leave AP joined before.  | 
|  | 26 | +   | 
|  | 27 | + bool	setSoftAPParam (String ssid, String pwd, uint8_t chl=7, uint8_t ecn=4) : Set SoftAP parameters.  | 
|  | 28 | +   | 
|  | 29 | + String	getJoinedDeviceIP (void) : Get the IP list of devices connected to SoftAP.  | 
|  | 30 | +   | 
|  | 31 | + String	getIPStatus (void) : Get the current status of connection(UDP and TCP).  | 
|  | 32 | +   | 
|  | 33 | + String	getLocalIP (void) : Get the IP address of ESP8266.  | 
|  | 34 | +   | 
|  | 35 | + bool	enableMUX (void) : Enable IP MUX(multiple connection mode).  | 
|  | 36 | +   | 
|  | 37 | + bool	disableMUX (void) : Disable IP MUX(single connection mode).  | 
|  | 38 | +   | 
|  | 39 | + bool	createTCP (String addr, uint32_t port) : Create TCP connection in single mode.  | 
|  | 40 | +   | 
|  | 41 | + bool	releaseTCP (void) : Release TCP connection in single mode.  | 
|  | 42 | +   | 
|  | 43 | + bool	registerUDP (String addr, uint32_t port) : Register UDP port number in single mode.  | 
|  | 44 | +   | 
|  | 45 | + bool	unregisterUDP (void) : Unregister UDP port number in single mode.  | 
|  | 46 | +   | 
|  | 47 | + bool	createTCP (uint8_t mux_id, String addr, uint32_t port) : Create TCP connection in multiple mode.  | 
|  | 48 | +   | 
|  | 49 | + bool	releaseTCP (uint8_t mux_id) : Release TCP connection in multiple mode.  | 
|  | 50 | +   | 
|  | 51 | + bool	registerUDP (uint8_t mux_id, String addr, uint32_t port) : Register UDP port number in multiple mode.  | 
|  | 52 | +   | 
|  | 53 | + bool	unregisterUDP (uint8_t mux_id) : Unregister UDP port number in multiple mode.  | 
|  | 54 | +   | 
|  | 55 | + bool	setTCPServerTimeout (uint32_t timeout=180) : Set the timeout of TCP Server.  | 
|  | 56 | +   | 
|  | 57 | + bool	startTCPServer (uint32_t port=333) : Start TCP Server(Only in multiple mode).  | 
|  | 58 | +   | 
|  | 59 | + bool	stopTCPServer (void) : Stop TCP Server(Only in multiple mode).  | 
|  | 60 | +   | 
|  | 61 | + bool	send (const uint8_t *buffer, uint32_t len) : Send data based on TCP or UDP builded already in single mode.  | 
|  | 62 | +   | 
|  | 63 | + bool	send (uint8_t mux_id, const uint8_t *buffer, uint32_t len) : Send data based on one of TCP or UDP builded already in multiple mode.  | 
|  | 64 | +   | 
|  | 65 | + 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.  | 
|  | 66 | +   | 
|  | 67 | + uint32_t	recv (uint8_t mux_id, uint8_t *buffer, uint32_t buffer_size, uint32_t timeout=1000) : Receive data from one of TCP or UDP builded already in multiple mode.  | 
|  | 68 | +   | 
|  | 69 | + uint32_t	recv (uint8_t *coming_mux_id, uint8_t *buffer, uint32_t buffer_size, uint32_t timeout=1000) : Receive data from all of TCP or UDP builded already in multiple mode.  | 
|  | 70 | + | 
|  | 71 | + | 
| 7 | 72 | # Source  | 
| 8 | 73 | 
 | 
| 9 | 74 | Source can be download at <https://github.com/itead/ITEADLIB_Arduino_WeeESP8266>. | 
|  | 
0 commit comments