Modified Library for using the Wifi module ESP8266, first version with basic commands, soon new commands will be added
Fork of ESP8266 by
Diff: ESP8266.h
- Revision:
- 1:399414d48048
- Parent:
- 0:e58f27687450
- Child:
- 2:77388e8f0697
diff -r e58f27687450 -r 399414d48048 ESP8266.h --- a/ESP8266.h Tue Dec 16 01:08:47 2014 +0000 +++ b/ESP8266.h Wed Dec 17 13:54:34 2014 +0000 @@ -26,6 +26,10 @@ void GetList(char * l); void Join(char * id, char * pwd); void GetIP(char * ip); +void SetMode(char mode); +void Quit(void); +void SetSingle(void); +void SetMultiple(void); private: Serial comm; @@ -45,14 +49,14 @@ AT+CWJAP: join the AP wifi; AT+ CWJAP =<ssid>,< pwd > - ssid = ssid, pwd = wifi password, both between quotes; Inquiry: AT+ CWJAP? AT+CWLAP: list the AP wifi AT+CWQAP: quit the AP wifi; Inquiry: AT+CWQAP=? - AT+CWSAP: set the parameters of AP; AT+CWSAP= <ssid>,<pwd>,<chl>,<ecn> - ssid, pwd, chl = channel, ecn = encryption; Inquiry: AT+CWJAP? + * AT+CWSAP: set the parameters of AP; AT+CWSAP= <ssid>,<pwd>,<chl>,<ecn> - ssid, pwd, chl = channel, ecn = encryption; Inquiry: AT+CWJAP? TCP/IP: - AT+CIPSTATUS: get the connection status - AT+CIPSTART: set up TCP or UDP connection 1)single connection (+CIPMUX=0) AT+CIPSTART= <type>,<addr>,<port>; 2) multiple connection (+CIPMUX=1) AT+CIPSTART= <id><type>,<addr>, <port> - id = 0-4, type = TCP/UDP, addr = IP address, port= port; Inquiry: AT+CIPSTART=? - AT+CIPSEND: send data; 1)single connection(+CIPMUX=0) AT+CIPSEND=<length>; 2) multiple connection (+CIPMUX=1) AT+CIPSEND= <id>,<length>; Inquiry: AT+CIPSEND=? - AT+CIPCLOSE: close TCP or UDP connection; AT+CIPCLOSE=<id> or AT+CIPCLOSE; Inquiry: AT+CIPCLOSE=? + * AT+CIPSTATUS: get the connection status + * AT+CIPSTART: set up TCP or UDP connection 1)single connection (+CIPMUX=0) AT+CIPSTART= <type>,<addr>,<port>; 2) multiple connection (+CIPMUX=1) AT+CIPSTART= <id><type>,<addr>, <port> - id = 0-4, type = TCP/UDP, addr = IP address, port= port; Inquiry: AT+CIPSTART=? + * AT+CIPSEND: send data; 1)single connection(+CIPMUX=0) AT+CIPSEND=<length>; 2) multiple connection (+CIPMUX=1) AT+CIPSEND= <id>,<length>; Inquiry: AT+CIPSEND=? + * AT+CIPCLOSE: close TCP or UDP connection; AT+CIPCLOSE=<id> or AT+CIPCLOSE; Inquiry: AT+CIPCLOSE=? AT+CIFSR: Get IP address; Inquiry: AT+ CIFSR=? AT+CIPMUX: set mutiple connection; AT+ CIPMUX=<mode> - 0 for single connection 1 for mutiple connection; Inquiry: AT+CIPMUX? - AT+CIPSERVER: set as server; AT+ CIPSERVER= <mode>[,<port> ] - mode 0 to close server mode, mode 1 to open; port = port; Inquiry: AT+CIFSR=? - +IPD: received data + * AT+CIPSERVER: set as server; AT+ CIPSERVER= <mode>[,<port> ] - mode 0 to close server mode, mode 1 to open; port = port; Inquiry: AT+CIFSR=? + * +IPD: received data */ \ No newline at end of file