Connecting from an ESP8266 that is being an access point
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?
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
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
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...
TCP = OSI layer 4 (sort of), WLAN = OSI layer 2...
Who is online
Users browsing this forum: No registered users and 41 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.