ESP32 As A TCP Server

Jacky Chiang
Posts: 3
Joined: Tue Aug 29, 2017 8:08 am

ESP32 As A TCP Server

Postby Jacky Chiang » Tue Aug 29, 2017 8:43 am

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 !!

ESP_Sprite
Posts: 9708
Joined: Thu Nov 26, 2015 4:08 am

Re: ESP32 As A TCP Server

Postby ESP_Sprite » Tue Aug 29, 2017 9:06 am

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.

Jacky Chiang
Posts: 3
Joined: Tue Aug 29, 2017 8:08 am

Re: ESP32 As A TCP Server

Postby Jacky Chiang » Tue Aug 29, 2017 9:16 am

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 !!!

User avatar
loboris
Posts: 514
Joined: Wed Dec 21, 2016 7:40 pm

Re: ESP32 As A TCP Server

Postby loboris » Tue Aug 29, 2017 1:42 pm

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?

Jacky Chiang
Posts: 3
Joined: Tue Aug 29, 2017 8:08 am

Re: ESP32 As A TCP Server

Postby Jacky Chiang » Wed Aug 30, 2017 6:27 am

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.

kurtzweber
Posts: 64
Joined: Tue Jan 10, 2017 1:09 pm

Re: ESP32 As A TCP Server

Postby kurtzweber » Wed Aug 30, 2017 9:23 am

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/

Who is online

Users browsing this forum: No registered users and 96 guests