@@ -94,8 +94,9 @@ static bool softap_config_equal(const softap_config& lhs, const softap_config& r
9494 * @param channel WiFi channel number, 1 - 13.
9595 * @param ssid_hidden Network cloaking (0 = broadcast SSID, 1 = hide SSID)
9696 * @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
97+ * @param beacon_interval set arbitrary beacon interval (influences DTIM)
9798 */
98- bool ESP8266WiFiAPClass::softAP (const char * ssid, const char * psk, int channel, int ssid_hidden, int max_connection) {
99+ bool ESP8266WiFiAPClass::softAP (const char * ssid, const char * psk, int channel, int ssid_hidden, int max_connection, int beacon_interval ) {
99100
100101 if (!WiFi.enableAP (true )) {
101102 // enable AP failed
@@ -138,7 +139,7 @@ bool ESP8266WiFiAPClass::softAP(const char* ssid, const char* psk, int channel,
138139 conf.channel = channel;
139140 conf.ssid_hidden = ssid_hidden;
140141 conf.max_connection = max_connection;
141- conf.beacon_interval = 100 ;
142+ conf.beacon_interval = beacon_interval ;
142143
143144 struct softap_config conf_compare;
144145 if (WiFi._persistent ){
@@ -189,8 +190,8 @@ bool ESP8266WiFiAPClass::softAP(const char* ssid, const char* psk, int channel,
189190 return ret;
190191}
191192
192- bool ESP8266WiFiAPClass::softAP (const String& ssid, const String& psk, int channel, int ssid_hidden, int max_connection) {
193- return softAP (ssid.c_str (), psk.c_str (), channel, ssid_hidden, max_connection);
193+ bool ESP8266WiFiAPClass::softAP (const String& ssid, const String& psk, int channel, int ssid_hidden, int max_connection, int beacon_interval ) {
194+ return softAP (ssid.c_str (), psk.c_str (), channel, ssid_hidden, max_connection, beacon_interval );
194195}
195196
196197/* *
0 commit comments