From 650e4cf7e1ca41a10d2bee2e2e0f162579c223a5 Mon Sep 17 00:00:00 2001 From: aerlon <39123666+aerlon@users.noreply.github.com> Date: Tue, 28 Aug 2018 13:09:03 +0200 Subject: [PATCH 1/5] Add information about the max_connection constructor argument. --- doc/esp8266wifi/soft-access-point-class.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/esp8266wifi/soft-access-point-class.rst b/doc/esp8266wifi/soft-access-point-class.rst index 6ade855f6a..c7ddaeb9e8 100644 --- a/doc/esp8266wifi/soft-access-point-class.rst +++ b/doc/esp8266wifi/soft-access-point-class.rst @@ -44,11 +44,11 @@ To set up password protected network, or to configure additional network paramet .. code:: cpp - WiFi.softAP(ssid, password, channel, hidden) + WiFi.softAP(ssid, password, channel, hidden, max_connection) -The first parameter of this function is required, remaining three are optional. +The first parameter of this function is required, remaining four are optional. -Meaning of all parameters is as follows: - ``ssid`` - character string containing network SSID (max. 63 characters) \* ``password`` - optional character string with a password. For WPA2-PSK network it should be at least 8 character long. If not specified, the access point will be open for anybody to connect. \* ``channel`` - optional parameter to set Wi-Fi channel, from 1 to 13. Default channel = 1. \* ``hidden`` - optional parameter, if set to ``true`` will hide SSID +Meaning of all parameters is as follows: - ``ssid`` - character string containing network SSID (max. 63 characters) \* ``password`` - optional character string with a password. For WPA2-PSK network it should be at least 8 character long. If not specified, the access point will be open for anybody to connect. \* ``channel`` - optional parameter to set Wi-Fi channel, from 1 to 13. Default channel = 1. \* ``hidden`` - optional parameter, if set to ``true`` will hide SSID. \* ``max_connection`` - optional parameter to set max simultaneous connected clients, from 1 to 4. Defaults to 4. Function will return ``true`` or ``false`` depending on result of setting the soft-AP. @@ -131,7 +131,7 @@ Get the count of the stations that are connected to the soft-AP interface. Stations connected to soft-AP = 2 -Note: the maximum number of stations that may be connected to ESP8266 soft-AP is five. +Note: the maximum number of stations that may be connected to ESP8266 soft-AP is 4 by default. This can be changed from 1 to 4 via the ``max_connection`` argument of the soft-AP constructor. softAPdisconnect ^^^^^^^^^^^^^^^^ From dc5a5db4d5fb30de216cef93baa0186caecc887d Mon Sep 17 00:00:00 2001 From: aerlon <39123666+aerlon@users.noreply.github.com> Date: Tue, 28 Aug 2018 13:47:06 +0200 Subject: [PATCH 2/5] Correct information about max soft-AP connections. --- doc/esp8266wifi/readme.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/esp8266wifi/readme.rst b/doc/esp8266wifi/readme.rst index bf1653ba2a..804f49f3dc 100644 --- a/doc/esp8266wifi/readme.rst +++ b/doc/esp8266wifi/readme.rst @@ -125,7 +125,7 @@ Soft Access Point ~~~~~~~~~~~~~~~~~ An `access point (AP) `__ is a device that provides access to Wi-Fi network to other devices (stations) -and connects them further to a wired network. ESP8266 can provide similar functionality except it does not have interface to a wired network. Such mode of operation is called soft access point (soft-AP). The maximum number of stations connected to the soft-AP is five. +and connects them further to a wired network. ESP8266 can provide similar functionality except it does not have interface to a wired network. Such mode of operation is called soft access point (soft-AP). The maximum number of stations that can simultaneously be connected to the soft-AP is 4 by default. .. figure:: pictures/esp8266-soft-access-point.png :alt: ESP8266 operating in the Soft Access Point mode From 1ec5ace7cb1d2bd8365fa57b1995f7ff9e9e2737 Mon Sep 17 00:00:00 2001 From: aerlon <39123666+aerlon@users.noreply.github.com> Date: Tue, 28 Aug 2018 15:16:53 +0200 Subject: [PATCH 3/5] Add information about what happens when max_connection is reached. --- doc/esp8266wifi/soft-access-point-class.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/esp8266wifi/soft-access-point-class.rst b/doc/esp8266wifi/soft-access-point-class.rst index c7ddaeb9e8..ead607296c 100644 --- a/doc/esp8266wifi/soft-access-point-class.rst +++ b/doc/esp8266wifi/soft-access-point-class.rst @@ -48,7 +48,7 @@ To set up password protected network, or to configure additional network paramet The first parameter of this function is required, remaining four are optional. -Meaning of all parameters is as follows: - ``ssid`` - character string containing network SSID (max. 63 characters) \* ``password`` - optional character string with a password. For WPA2-PSK network it should be at least 8 character long. If not specified, the access point will be open for anybody to connect. \* ``channel`` - optional parameter to set Wi-Fi channel, from 1 to 13. Default channel = 1. \* ``hidden`` - optional parameter, if set to ``true`` will hide SSID. \* ``max_connection`` - optional parameter to set max simultaneous connected clients, from 1 to 4. Defaults to 4. +Meaning of all parameters is as follows: - ``ssid`` - character string containing network SSID (max. 63 characters) \* ``password`` - optional character string with a password. For WPA2-PSK network it should be at least 8 character long. If not specified, the access point will be open for anybody to connect. \* ``channel`` - optional parameter to set Wi-Fi channel, from 1 to 13. Default channel = 1. \* ``hidden`` - optional parameter, if set to ``true`` will hide SSID. \* ``max_connection`` - optional parameter to set max simultaneous connected stations, from 1 to 4. Defaults to 4. Once the max number has been reached, any other station that wants to connect will be forced to wait until an already connected station disconnects. Function will return ``true`` or ``false`` depending on result of setting the soft-AP. From 6d299392bcdbcff3eb8b58312ddd02cae05908ba Mon Sep 17 00:00:00 2001 From: aerlon <39123666+aerlon@users.noreply.github.com> Date: Tue, 28 Aug 2018 16:40:17 +0200 Subject: [PATCH 4/5] Correct terminology --- doc/esp8266wifi/soft-access-point-class.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/esp8266wifi/soft-access-point-class.rst b/doc/esp8266wifi/soft-access-point-class.rst index ead607296c..fc7a8c058c 100644 --- a/doc/esp8266wifi/soft-access-point-class.rst +++ b/doc/esp8266wifi/soft-access-point-class.rst @@ -131,7 +131,7 @@ Get the count of the stations that are connected to the soft-AP interface. Stations connected to soft-AP = 2 -Note: the maximum number of stations that may be connected to ESP8266 soft-AP is 4 by default. This can be changed from 1 to 4 via the ``max_connection`` argument of the soft-AP constructor. +Note: the maximum number of stations that may be connected to ESP8266 soft-AP is 4 by default. This can be changed from 1 to 4 via the ``max_connection`` argument of the softAP method. softAPdisconnect ^^^^^^^^^^^^^^^^ From 0f9337bd3f9e549cc7cfe2ab720ee95c4e25d481 Mon Sep 17 00:00:00 2001 From: Anders Date: Wed, 29 Aug 2018 11:57:29 +0200 Subject: [PATCH 5/5] - Correct the valid range of max_connection to 1 - 8. - Include reference. --- doc/esp8266wifi/readme.rst | 2 +- doc/esp8266wifi/soft-access-point-class.rst | 4 ++-- libraries/ESP8266WiFi/src/ESP8266WiFiAP.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/esp8266wifi/readme.rst b/doc/esp8266wifi/readme.rst index 804f49f3dc..a71d5a744c 100644 --- a/doc/esp8266wifi/readme.rst +++ b/doc/esp8266wifi/readme.rst @@ -125,7 +125,7 @@ Soft Access Point ~~~~~~~~~~~~~~~~~ An `access point (AP) `__ is a device that provides access to Wi-Fi network to other devices (stations) -and connects them further to a wired network. ESP8266 can provide similar functionality except it does not have interface to a wired network. Such mode of operation is called soft access point (soft-AP). The maximum number of stations that can simultaneously be connected to the soft-AP is 4 by default. +and connects them further to a wired network. ESP8266 can provide similar functionality except it does not have interface to a wired network. Such mode of operation is called soft access point (soft-AP). The maximum number of stations that can simultaneously be connected to the soft-AP can be set `from 1 to 8 `__, but defaults to 4. .. figure:: pictures/esp8266-soft-access-point.png :alt: ESP8266 operating in the Soft Access Point mode diff --git a/doc/esp8266wifi/soft-access-point-class.rst b/doc/esp8266wifi/soft-access-point-class.rst index fc7a8c058c..5a002ffb15 100644 --- a/doc/esp8266wifi/soft-access-point-class.rst +++ b/doc/esp8266wifi/soft-access-point-class.rst @@ -48,7 +48,7 @@ To set up password protected network, or to configure additional network paramet The first parameter of this function is required, remaining four are optional. -Meaning of all parameters is as follows: - ``ssid`` - character string containing network SSID (max. 63 characters) \* ``password`` - optional character string with a password. For WPA2-PSK network it should be at least 8 character long. If not specified, the access point will be open for anybody to connect. \* ``channel`` - optional parameter to set Wi-Fi channel, from 1 to 13. Default channel = 1. \* ``hidden`` - optional parameter, if set to ``true`` will hide SSID. \* ``max_connection`` - optional parameter to set max simultaneous connected stations, from 1 to 4. Defaults to 4. Once the max number has been reached, any other station that wants to connect will be forced to wait until an already connected station disconnects. +Meaning of all parameters is as follows: - ``ssid`` - character string containing network SSID (max. 63 characters) \* ``password`` - optional character string with a password. For WPA2-PSK network it should be at least 8 character long. If not specified, the access point will be open for anybody to connect. \* ``channel`` - optional parameter to set Wi-Fi channel, from 1 to 13. Default channel = 1. \* ``hidden`` - optional parameter, if set to ``true`` will hide SSID. \* ``max_connection`` - optional parameter to set max simultaneous connected stations, `from 1 to 8 `__. Defaults to 4. Once the max number has been reached, any other station that wants to connect will be forced to wait until an already connected station disconnects. Function will return ``true`` or ``false`` depending on result of setting the soft-AP. @@ -131,7 +131,7 @@ Get the count of the stations that are connected to the soft-AP interface. Stations connected to soft-AP = 2 -Note: the maximum number of stations that may be connected to ESP8266 soft-AP is 4 by default. This can be changed from 1 to 4 via the ``max_connection`` argument of the softAP method. +Note: the maximum number of stations that may be connected to ESP8266 soft-AP is 4 by default. This can be changed from 1 to 8 via the ``max_connection`` argument of the softAP method. softAPdisconnect ^^^^^^^^^^^^^^^^ diff --git a/libraries/ESP8266WiFi/src/ESP8266WiFiAP.cpp b/libraries/ESP8266WiFi/src/ESP8266WiFiAP.cpp index af663d12e0..3b8a36991b 100644 --- a/libraries/ESP8266WiFi/src/ESP8266WiFiAP.cpp +++ b/libraries/ESP8266WiFi/src/ESP8266WiFiAP.cpp @@ -89,7 +89,7 @@ static bool softap_config_equal(const softap_config& lhs, const softap_config& r * @param passphrase (for WPA2 min 8 char, for open use NULL) * @param channel WiFi channel number, 1 - 13. * @param ssid_hidden Network cloaking (0 = broadcast SSID, 1 = hide SSID) - * @param max_connection Max simultaneous connected clients, 1 - 4. + * @param max_connection Max simultaneous connected clients, 1 - 8. https://bbs.espressif.com/viewtopic.php?f=46&t=481&p=1832&hilit=max_connection#p1832 */ bool ESP8266WiFiAPClass::softAP(const char* ssid, const char* passphrase, int channel, int ssid_hidden, int max_connection) {