-->
Page 1 of 2

Need help with TCP client mode with an android server

PostPosted: Sat Nov 07, 2020 2:19 pm
by MVRP
Hi

I just activate my cell phone's hotspot and esp8266 connects to its wifi as a TCP client and gets an IP. But when i try to use an app to send certain data into the esp a port is required while Android host does not assign a port number to the ESP.

I tried everything and no success so far.

Re: Need help with TCP client mode with an android server

PostPosted: Sun Nov 08, 2020 5:08 am
by JurajA
connection to an AP is not a TCP connection. TCP is some layers higher.
the DHCP assigns the IP address in a TCP/IP network.
port is for TCP connection or UDP message and is on you to set it when connecting a TCP socket or sending an UDP message or starting a TCP server or an UDP message listner

Re: Need help with TCP client mode with an android server

PostPosted: Mon Nov 09, 2020 1:52 am
by MVRP
JurajA wrote:connection to an AP is not a TCP connection. TCP is some layers higher.
the DHCP assigns the IP address in a TCP/IP network.
port is for TCP connection or UDP message and is on you to set it when connecting a TCP socket or sending an UDP message or starting a TCP server or an UDP message listner


So what exactly do you suggest? In udp mode i do the same with my cellphone but the ESP can grab a port number with AT+CIPSTART command but this command does not work in tcp mode.

Re: Need help with TCP client mode with an android server

PostPosted: Mon Nov 09, 2020 1:50 pm
by JurajA
for me it works.
what is the problem?