Connecting from an ESP8266 that is being an access point

User avatar
kolban
Posts: 131
Joined: Tue Jun 16, 2015 1:09 pm
Location: Fort Worth, Texas, USA

Connecting from an ESP8266 that is being an access point

Postby kolban » Fri Sep 04, 2015 8:14 am

Consider the following. If I make an ESP8266 an access point, it might be given the IP address on 192.168.4.1. If then connect a station to that access point, the station may be given the IP address of 192.168.4.2. If the station that is connected is running a TCP listener (on say port 80), can I now connect from an application running on the ESP8266 to 192.168.4.2:80?

eriksl
Posts: 159
Joined: Fri May 22, 2015 6:22 pm

Re: Connecting from an ESP8266 that is being an access point

Postby eriksl » Sat Sep 05, 2015 2:32 am

Why not?

User avatar
kolban
Posts: 131
Joined: Tue Jun 16, 2015 1:09 pm
Location: Fort Worth, Texas, USA

Re: Connecting from an ESP8266 that is being an access point

Postby kolban » Sat Sep 05, 2015 2:51 am

Howdy,
I tried it and it worked just fine. My wondering of "why not" was based on the notion that I have some "loose" impression that an ESP8266 can be a Station, an Access Point or both. I understand Station ... that means it is a "true" TCP/IP device connected to the network. But the access point is still causing me some thought ... if the ESP8266 is an access point that seems to say that it is brokering connections from WiFi stations. It is here that I wasn't sure whether or not applications running on it in this mode could form and receive connections requests to other stations connected with it. If I then take my thinking a little further, we have the notion of the device being BOTH a station and an access point ... and this causes me pause. If I am running an application on the ESP8266 in this mode, if I try and form a connection ... which "network interface" would it use? The one through the "station" connnection or one through the "access point" connection.

Neil

eriksl
Posts: 159
Joined: Fri May 22, 2015 6:22 pm

Re: Connecting from an ESP8266 that is being an access point

Postby eriksl » Sat Sep 05, 2015 2:54 am

Who (which side) initiates the TCP connection (which after that is completely symmetrical), has nothing to do with who initiates the WLAN connection, it's completely independent, has nothing to do with each other at all.

TCP = OSI layer 4 (sort of), WLAN = OSI layer 2...

Who is online

Users browsing this forum: No registered users and 41 guests