1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-12 01:53:07 +03:00

WiFi: clean up AP SSID setter & getter, support 32 chars (#7941)

This commit is contained in:
Max Prokhorov
2021-05-15 22:28:22 +03:00
committed by GitHub
parent 5f21c61c7c
commit 4436e32a50
3 changed files with 50 additions and 41 deletions

View File

@ -40,18 +40,18 @@ terms <https://en.wikipedia.org/wiki/Function_overloading>`__) of this function
WiFi.softAP(ssid)
To set up password protected network, or to configure additional network parameters, use the following overload:
To set up pre-shared key protected network, or to configure additional network parameters, use the following overload:
.. code:: cpp
WiFi.softAP(ssid, password, channel, hidden, max_connection)
WiFi.softAP(ssid, psk, channel, hidden, max_connection)
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. 31 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, (max. 63 characters).
- ``ssid`` - character string containing network SSID (max. 32 characters)
- ``psk`` - optional character string with a pre-shared key. For WPA2-PSK network it should be minimum 8 characters long and not longer than 64 characters. 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 0 to 8 <https://bbs.espressif.com/viewtopic.php?f=46&t=481&p=1832&hilit=max_connection#p1832>`__. 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.
@ -152,7 +152,7 @@ Disconnect stations from the network established by the soft-AP.
WiFi.softAPdisconnect(wifioff)
Function will set currently configured SSID and password of the soft-AP to null values. The parameter ``wifioff`` is optional. If set to ``true`` it will switch the soft-AP mode off.
Function will set currently configured SSID and pre-shared key of the soft-AP to null values. The parameter ``wifioff`` is optional. If set to ``true`` it will switch the soft-AP mode off.
Function will return ``true`` if operation was successful or ``false`` if otherwise.