Page 1 of 1

ESP32 As A TCP Server

Posted: Tue Aug 29, 2017 8:43 am
by Jacky Chiang
Hello, everyone.
I'm now trying to use ESP32 as a TCP server. But I have some question.
That's can I use ESP32 as a TCP Server without any other Wifi source ?
I was searching online for some instruction and found this one : "http://www.iotsharing.com/2017/05/tcp-u ... esp32.html"
It seems like he use the ESP32 as a tcp server but still need a wifi machine to provide an wifi source.
I am wondering if i can do it without the wifi machine ??

thanks !!

Re: ESP32 As A TCP Server

Posted: Tue Aug 29, 2017 9:06 am
by ESP_Sprite
Yes, you can set the ESP32 into access point mode so other devices can connect to it, then start up your TCP server as usual.

Re: ESP32 As A TCP Server

Posted: Tue Aug 29, 2017 9:16 am
by Jacky Chiang
Then may I request some places to find sample codes of it with Arduino IDE.
I've tried many places but gained nothing ~
There are a lot about web server but few about TCP server .
Thanks !!!

Re: ESP32 As A TCP Server

Posted: Tue Aug 29, 2017 1:42 pm
by loboris
Jacky Chiang wrote:... use the ESP32 as a tcp server but still need a wifi machine to provide an wifi source...
Web Server is TCP server. What is wifi machine ? What do you intend to serve with your TCP server?

Re: ESP32 As A TCP Server

Posted: Wed Aug 30, 2017 6:27 am
by Jacky Chiang
I wanna remove the Web layer from TCP layer for having more flexibility and not being limited by the Web layer structure.
The layer structure is shown in the figure of this website :
http://tuxgraphics.org/common/images2/a ... -stack.gif

thanks.

Re: ESP32 As A TCP Server

Posted: Wed Aug 30, 2017 9:23 am
by kurtzweber
Hi

this is a good explanation about how to implement a TCP server with netconn... the HTTP layer is just the way you manage the incoming messages ("GET..."):

http://www.lucadentella.it/2017/07/08/e ... webserver/