Using two servers (HTTP and TELNET ports)
Posted: Thu Jan 05, 2023 12:07 am
Hi All
I need to have two TCP servers running. One on the HTTP port 80 and one on the Telnet port 23.
These commands are sent to create the servers:
at+cipmux=1
at+cipservermaxconn=5
at+cipserver=1,80
at+cipserver=1,23
All are acknowledged with OK.
I can now connect on TCP port 80 but connection attempts on TCP port 23 are answered with TCP RSTs (as if the server address is not being recognised).
If I then do
at+cipserver=0
to destroy the server(s), followed by
at+cipserver=1,23
the telnet port can connect.
If I start again and do
at+cipmux=1
at+cipservermaxconn=5
at+cipserver=1,23
at+cipserver=1,80
The telnet connection (23) works but not the HTTP one (80).
The behavior is as if the second server port setting is OKed but in fact ignored.
It is also as if only one server ever exists on only one port.
I can however connect multiple Telnet (23) connections, as shown by the status when 2 are connected:
+CIPSTATUS:0,"TCP","192.168.1.120",50801,23,1
+CIPSTATUS:1,"TCP","192.168.1.120",50835,23,1
Question:
- it is true that the ESP32-AT only supports a single listening TCP port?
- or is a different method needed to achieve more than one TCP port?
Finally, I will also require a UDP listener too.
Will this be possible?
Regards
Mark
I need to have two TCP servers running. One on the HTTP port 80 and one on the Telnet port 23.
These commands are sent to create the servers:
at+cipmux=1
at+cipservermaxconn=5
at+cipserver=1,80
at+cipserver=1,23
All are acknowledged with OK.
I can now connect on TCP port 80 but connection attempts on TCP port 23 are answered with TCP RSTs (as if the server address is not being recognised).
If I then do
at+cipserver=0
to destroy the server(s), followed by
at+cipserver=1,23
the telnet port can connect.
If I start again and do
at+cipmux=1
at+cipservermaxconn=5
at+cipserver=1,23
at+cipserver=1,80
The telnet connection (23) works but not the HTTP one (80).
The behavior is as if the second server port setting is OKed but in fact ignored.
It is also as if only one server ever exists on only one port.
I can however connect multiple Telnet (23) connections, as shown by the status when 2 are connected:
+CIPSTATUS:0,"TCP","192.168.1.120",50801,23,1
+CIPSTATUS:1,"TCP","192.168.1.120",50835,23,1
Question:
- it is true that the ESP32-AT only supports a single listening TCP port?
- or is a different method needed to achieve more than one TCP port?
Finally, I will also require a UDP listener too.
Will this be possible?
Regards
Mark