Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

{ESP8266} More than one TCP Server using AT Command

Status
Not open for further replies.

dhruv_electro

Advanced Member level 4
Full Member level 1
Joined
Dec 17, 2010
Messages
118
Helped
9
Reputation
18
Reaction score
8
Trophy points
1,298
Location
India
Activity points
2,378
I am using AT Commands for ESP8266. I want:

  1. TCP Server at 80
  2. TCP Server at 33666
  3. UDP at 506


I am using this:
Code:
AT+CIPMUX=1
OK
AT+CIPSERVER=1,33666
no change
OK
AT+CIPSTART=4,"UDP","192.168.0.5",21,506,2
4,CONNECT
OK
Now If I check with clients, I can send and receive data on TCP port 80 and UDP port 506 successfully, but no TCP server is created for 33666.

Does ESP8266 only allow one TCP server for AT Commands? If yes, how to bypass it?
 

don't use the esp8266 with at commands ...
program it directly with the arduino IDE, it will be easier, faster, and more reliable
and it will behave as an arduino with integrated wifi module.
 
  • Like
Reactions: FvM

    FvM

    Points: 2
    Helpful Answer Positive Rating
don't use the esp8266 with at commands ...
program it directly with the arduino IDE, it will be easier, faster, and more reliable
and it will behave as an arduino with integrated wifi module.

Thanks for the great advice. I agree with you completely. But I just wanted to check if we can generate two TCP server in AT command or not. I can not find that reference about that.
 

I remember that the original chip does not allow more than one tcp connection (but can't tell you where I read this... as I don't recall it)
and I was pretty surprised that the arduino system allowed the esp8266 to make more than one connection.
also the AT command system is pretty limited.
 

I already have connected esp8266 as 1 TCP server, 1 TCP Client and 1 UDP port. In this configuration TCP server can serve upto 3 active TCP client. Now I want is to have 2 TCP server and 1 UDP port, but it gives me this reply. Please also note that I have made mistake when posting the code here in forum here I am posting whole code:
Code:
AT+CIPMUX=1


OK
AT+CIPSERVER=1,80


OK
AT+CIPSERVER=1,33666

no change

OK
AT+CIPSTART=4,"UDP","192.168.0.5",21,506,2

4,CONNECT

OK

- - - Updated - - -

Hey again I think I found my answer: AT Command can not support two TCP server at the same time. More reference here:
 

I did not try to have 2 tcp servers with the arduino ide but should give a try.
I tried like you some clients and one server. this worked well.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top