esp8266 server
Fanda Kopriva
info na elektronikavyvoj.cz
Sobota Leden 18 15:53:07 CET 2025
dobry den
Hraju si s ESP8266.Mam pripojeny zarizeni pres udp do pc (vlastniho
programu).
Rad bych ho pripojil do prohlizece.Prosim zkusenejsi o radu.Viz vypis dole.
Inicializace probehne v poradku.
Do prohlizece zadam adresu modulu .
Z modulu vypisu v prohlizeci dve radky "AHOJ TADY CHATA"
Prvni dotaz - muzu nejakym komandem prohlizeci rict , aby se
stranka nacetla znovu ?
tj. po prvnim textu "AHOJ TADY CHATA" zacit znovu , resetovat
stranku a znovu napsat "AHOJ TADY CHATA"
Zobrazim dotazovaci pole v prohlizeci.
Kdyz vyplnene pole odeslu z prohlizece, tak dorazi do ESP v poradku ,ale
od te doby neprijde nic dalsiho z esp do prohlizece
i kdyz komand CIPSEND je spokojeny.Ale vyplnene pole projdou z
prohlizece do ESP bez problemu.
Druhy dotaz - Je potreba nejak potvrdit prijaty data z prohlizece
nebo jak znovuzprovoznit komunikaci do prohlizece
Dekuju fanda
-----------------------------------------inicializace
ESP8266----------------------------------------
O 0> AT+CWMODE=3__
I 1: AT+CWMODE=3_____OK__
O 1> AT+CWQAP__
I 2: AT+CWQAP_____OK__WIFI DISCONNECT__
O 2> AT+RST__
I 3> AT+RST_____OK____ ets Jan 8 2013,rst cause:1, boot
mode:(3,7)____load 0x40100000,
len 2408, room 16 __tail 8__chksum0xe5__load 0x3ffe8000, len 776, room 0
__tail 8__chksum 0x84_
_load 0x3ffe8310, len 632, room 0 __tail 8__chksum 0xd8__csum
0xd8____2nd boot version : 1.6__
SPI Speed : 40MHz__SPI Mode : QOUT__ SPI Flash Size & Map:
16Mbit(512KB+512KB)__
jump to run user1 @ 1000_________8__n____r___n_b______I 6____r_8_G_l_
#_____r______I8_____
______r______I8_____0____l_r__r______l____b______b__b____l__l__b___b___~_n__n_________l___n_$
___________l___________l`___`_______b______l_8_________b_______|__r__r____ready__WIFI
CONNECTED
__WIFI GOT IP__
O 3> AT+CWJAP="chatabubu","huygtfrdr"__
I 9: AT+CWJAP="chatabubu","huygtfrdr"___WIFI DISCONNECT__WIFI
CONNECTED__WIFI GOT IP____OK__
O 4> AT+CIFSR__
I 12:
AT+CIFSR___+CIFSR:APIP,"192.168.4.1"__+CIFSR:APMAC,"b6:e6:2d:15:0c:4e"__+CIFSR:STAIP,"192.168.1.52"_
_+CIFSR:STAMAC,"b4:e6:2d:15:0c:4e"____OK__
O 5> AT+CIPMUX=1__
I 13: AT+CIPMUX=1_____OK__
O 6> AT+CIPSERVER=1,80__
I 14: AT+CIPSERVER=1,80_____OK__0,CONNECT__1,CONNECT____
--------------------------------------------konec inicializace
---------------------------------
--------------------------------- pozadavek prohlizece na zobrazeni
stranky --------------------
+IPD,1,462:GET / HTTP/1.1__Host: 192.168.1.52__Connection:
keep-alive__Cache-Control: max-age=
0__Upgrade-Insecure-Requests: 1__User-Agent: Mozilla/5.0 (Windows NT
10.0; Win64; x64) AppleWebKit/537
.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36__Accept:
text/html,application/xhtml+xml,
application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exc
hange;v=b3;q=0.7__Accept-Encoding: gzip, deflate__Accept-Language:
cs,en-US;q=0.9,en;q=0.8____2,CONNECT__
----------------------------------- zobrazeni dvou radek textu v
prohlizeci -------------------------
O 7> AT+CIPSEND=0,45__
I 17: AT+CIPSEND=0,45_____OK__>
O 8> <h1>AHOJ TADY CHATA</h1><body bgcolor=f0f0f0>
I 18: _____busy s...____Recv 45 bytes____SEND OK__
O 7> AT+CIPSEND=0,45__
I 17: AT+CIPSEND=0,45_____OK__>
O 8> <h1>AHOJ TADY CHATA</h1><body bgcolor=f0f0f0>
I 18: _____busy s...____Recv 45 bytes____SEND OK__
----------------------------------- zobrazeni dotazovaciho pole v
prohlizeci --------------------
O 9> AT+CIPSEND=0,121__
I 23: AT+CIPSEND=0,121_____OK__>
O 10> <form action="stranka.html">Stav zamku:<input type=text
size=16 name="zamek"><input type=submit value=odeslat></form>__
I 24> ___busy s...____Recv 121 bytes____SEND OK__
----------------------------------- odeslani pozadavku z prohlizece na
esp2866 --------------------
I 25:__+IPD,1,493:GEI 26: T /stranka.html?zamek=yguyguu HTTP/1.1__Host:
192.168.1.52__Connection: keep-aliv
e__Upgrade-Insecure-Requests: 1__User-Agent: Mozilla/5.0 (Windows NT
10.0; Win64;
x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0
Safari/537.36__Acce
pt:
text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,i
mage/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7__Referer:
http://192.1
68.1.52/__Accept-Encoding: gzip, deflate__Accept-Language:
cs,en-US;q=0.9,en;q=0.8____
------------ po odeslani se prestanou prenaset data do prohlizece i kdyz
SEND je potvrzeny --------------
------------- ale data z prohlizece do esp nadale prochazeji
-------------------------------------------
O 11> AT+CIPSEND=0,45__
I 27: AT+CIPSEND=0,45_____OK__>
O 12> <h1>AHOJ TADY CHATA</h1><body bgcolor=f0f0f0>_____busy
s...____Recv 45 bytes____SEND OK__
I 28: 1,CLOSED__1,CONNECT__
I 29: __+IPD,1,462:GET / HTTP/1.1__Host: 192.168.1.52__Connection:
keep-alive__Cache-Control: max-age=
0__Upgrade-Insecure-Requests: 1__User-Agent: Mozilla/5.0 (Windows NT
10.0; Win64;
x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0
Safari/537.36__Acce
pt:
text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,i
mage/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7__Accept-E
ncoding: gzip, deflate__Accept-Language: cs,en-US;q=0.9,en;q=0.8____
I 30: __+IPD,1,493:GEI 26: T /stranka.html?zamek=yguyguu HTTP/1.1__Host:
192.168.1.52__Connection: keep-aliv
e__Upgrade-Insecure-Requests: 1__User-Agent: Mozilla/5.0 (Windows NT
10.0; Win64;
x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0
Safari/537.36__Acce
pt:
text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,i
mage/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7__Referer:
http://192.1
68.1.52/__Accept-Encoding: gzip, deflate__Accept-Language:
cs,en-US;q=0.9,en;q=0.8____
O 13> AT+CIPSEND=0,45__
I 31: AT+CIPSEND=0,45_____OK__>
O 14> <h1>AHOJ TADY CHATA</h1><body bgcolor=f0f0f0>_____busy
s...____Recv 45 bytes____SEND OK__
--------------------------------------------------------------------------------------------------------------
Další informace o konferenci Hw-list