esp8266_wifi_modules
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
| esp8266_wifi_modules [2014/12/02 17:30] – [Testing it as a TCP client] karl | esp8266_wifi_modules [2017/04/04 06:42] (aktuell) – [Notes] karl | ||
|---|---|---|---|
| Zeile 8: | Zeile 8: | ||
| This module supports TCP and UDP, both as a server or a client, which is pretty awesome! | This module supports TCP and UDP, both as a server or a client, which is pretty awesome! | ||
| + | Version 2 has an IPEX (U.FL) connector. A possible antenna coudl be this one from [[http:// | ||
| ===== Documentation Sites ===== | ===== Documentation Sites ===== | ||
| http:// | http:// | ||
| Zeile 102: | Zeile 103: | ||
| ready | ready | ||
| - | AT+CWJAP=" | + | AT+CWJAP=" |
| Zeile 173: | Zeile 174: | ||
| 14< | 14< | ||
| 4 bytes: hexadecimal block length = 20 decimal | 4 bytes: hexadecimal block length = 20 decimal | ||
| - | Hello World!< | + | Hello World!< |
| - | 19 bytes body | + | < |
| + | 20 bytes message | ||
| + | < | ||
| + | 2 bytes empty line, which terminates the first chunk | ||
| < | < | ||
| Zeile 186: | Zeile 190: | ||
| OK | OK | ||
| </ | </ | ||
| + | |||
| + | ===== TCP Server Example ===== | ||
| + | **Attention: | ||
| + | |||
| + | < | ||
| + | AT+RST | ||
| + | OK | ||
| + | c_\0xc7\0xcfRS\0xfe\0xe2FjS\0xf6fJ[\0xfa\0xe2\0xea | ||
| + | [Vendor: | ||
| + | ready | ||
| + | |||
| + | AT+CWJAP=" | ||
| + | OK | ||
| + | |||
| + | AT+CIPSTATUS | ||
| + | STATUS:5 | ||
| + | OK | ||
| + | |||
| + | AT+CIPMUX=1 | ||
| + | OK | ||
| + | |||
| + | AT+CIPSTATUS | ||
| + | STATUS:5 | ||
| + | OK | ||
| + | |||
| + | AT+CIPSERVER=1, | ||
| + | OK | ||
| + | |||
| + | AT+CIPSTATUS | ||
| + | STATUS:5 | ||
| + | OK | ||
| + | |||
| + | Link | ||
| + | |||
| + | AT+CIPSTATUS | ||
| + | STATUS:3 | ||
| + | +CIPSTATUS: | ||
| + | OK | ||
| + | |||
| + | +IPD, | ||
| + | |||
| + | OK | ||
| + | |||
| + | STATUS:3 | ||
| + | +CIPSTATUS: | ||
| + | OK | ||
| + | |||
| + | AT+CIPSEND=0, | ||
| + | > Hello Lenovo, thank you very much for your request | ||
| + | SEND OK | ||
| + | |||
| + | +IPD, | ||
| + | OK | ||
| + | |||
| + | Unlink | ||
| + | |||
| + | AT+CIPSTATUS | ||
| + | STATUS:4 | ||
| + | OK | ||
| + | </ | ||
| + | |||
| + | A server is opened on a specific port. To this port there can be up to 5 connections in parallel, TCP and UDP mixed. When responding, we have to set the ' | ||
| + | |||
| + | If we have multiple incomint TCP-connections from one client (multiple processes), we get multiple connections in the CIPSTATUS-list. Each with it's own reply port. \\ | ||
| + | But if we get multiple UDP connections from one client (also different client-processes), | ||
| + | |||
| + | ==== CIPSTATUS Example ==== | ||
| + | < | ||
| + | AT+CIPSTATUS | ||
| + | STATUS:3 | ||
| + | +CIPSTATUS: | ||
| + | +CIPSTATUS: | ||
| + | +CIPSTATUS: | ||
| + | OK | ||
| + | </ | ||
| + | |||
| + | Here I opened 4 instances of the application " | ||
| + | |||
| + | ===== Notes ===== | ||
| + | When we close the server with | ||
| + | AT+CIPSERVER=0 | ||
| + | , then the module has to be resetted! | ||
| + | |||
| + | As far as I know, we cannot find out, on which port the server was opened. | ||
| + | |||
| + | We can find the own IP address with | ||
| + | AT+CIFSR | ||
| + | . Note, that there is no questionmark! | ||
| + | |||
| + | |||
| + | {{tag> | ||
| + | |||
| + | |||
esp8266_wifi_modules.1417537812.txt.gz · Zuletzt geändert: von karl
