1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-27 21:16:50 +03:00

Fix doc for ESP8266WiFi (#5325)

* Fix WiFiAP doc

* Fix softAP doc

* Fix doc
This commit is contained in:
dav1901 2018-11-08 17:06:54 +02:00 committed by Earle F. Philhower, III
parent 53edcfd94d
commit 79a6f36a02
3 changed files with 21 additions and 21 deletions

View File

@ -50,8 +50,8 @@ 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.
- ``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).
- ``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.

View File

@ -85,8 +85,8 @@ static bool softap_config_equal(const softap_config& lhs, const softap_config& r
/**
* Set up an access point
* @param ssid Pointer to the SSID (max 63 char).
* @param passphrase (for WPA2 min 8 char, for open use NULL)
* @param ssid Pointer to the SSID (max 31 char).
* @param passphrase For WPA2 min 8 char, for open use NULL (max 63 char).
* @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, 0 - 8. https://bbs.espressif.com/viewtopic.php?f=46&t=481&p=1832&hilit=max_connection#p1832
@ -345,14 +345,14 @@ String ESP8266WiFiAPClass::softAPmacAddress(void) {
* @return String SSID.
*/
String ESP8266WiFiAPClass::softAPSSID() const {
struct softap_config config;
wifi_softap_get_config(&config);
char* name = reinterpret_cast<char*>(config.ssid);
char ssid[sizeof(config.ssid) + 1];
memcpy(ssid, name, sizeof(config.ssid));
ssid[sizeof(config.ssid)] = '\0';
return String(ssid);
struct softap_config config;
wifi_softap_get_config(&config);
char* name = reinterpret_cast<char*>(config.ssid);
char ssid[sizeof(config.ssid) + 1];
memcpy(ssid, name, sizeof(config.ssid));
ssid[sizeof(config.ssid)] = '\0';
return String(ssid);
}
/**
@ -360,12 +360,12 @@ String ESP8266WiFiAPClass::softAPSSID() const {
* @return String psk.
*/
String ESP8266WiFiAPClass::softAPPSK() const {
struct softap_config config;
wifi_softap_get_config(&config);
char* pass = reinterpret_cast<char*>(config.password);
char psk[sizeof(config.password) + 1];
memcpy(psk, pass, sizeof(config.password));
psk[sizeof(config.password)] = '\0';
return String(psk);
struct softap_config config;
wifi_softap_get_config(&config);
char* pass = reinterpret_cast<char*>(config.password);
char psk[sizeof(config.password) + 1];
memcpy(psk, pass, sizeof(config.password));
psk[sizeof(config.password)] = '\0';
return String(psk);
}

View File

@ -523,7 +523,7 @@ static bool _dns_lookup_pending = false;
* @param aHostname Name to be resolved
* @param aResult IPAddress structure to store the returned IP address
* @return 1 if aIPAddrString was successfully converted to an IP address,
* else error code
* else 0
*/
int ESP8266WiFiGenericClass::hostByName(const char* aHostname, IPAddress& aResult)
{