Chat freely about anything...

User avatar
By Kobi
#30407 After I connect my ESP8266 to a network I run AT+CIFSR command and get two Ips :




Can someone please explain me what is the difference between APIP and STAIP ?
I'v read in the AT manual that APIP is the IP address of ESP8266 softAP and STA is the IP address of ESP8266 station.
Actually, I'm newbie to ESP8266 (and generally in TCP/IP communication) and for that I will be glad if someone can explain me simply the difference...
If I want to send and get data (for example between two ESP's) which one should I choose ?
User avatar
By EspFan
#30445 Station (STA) is when your ESP is connecting to your home wifi.

Access Point (AP) is when your ESP is broadcasting wifi for you to connect to.

Since each home wifi is setup differently it will grab an address from your home wifi, and that is your STAIP.

Likewise, when you connect to a wifi, in this case if you connect to your ESP, you will be given an IP address from the ESP, that is the APIP.

That is why there are two different IP addresses, since you have the possibility of communicating in two very different ways.
User avatar
By Kobi
#30485 OK, So that's why Im using STAIP if I want to communicate with another computer (first client) that is connected to the same network as the ESP (second client) through some port number.

Am I right ?