Have questions about FETS, transistors, measurement, power supplies, or anything else electrical?

User avatar
By MVRP
#89335 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.
User avatar
By JurajA
#89338 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
User avatar
By MVRP
#89357
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.