WiFi.setOutputPower setting ignored after some time
- Dominant language
- C++
- Stars
- 16.7k
- Forks
- 13.1k
- PR merge metrics
- No merged PRs in 30d
Description
### Setup
- Module: Generic ESP8266 Module
- Flash Mode: dio
- Flash Size: 4MB
- lwip Variant: v2 Lower Memory
- Reset Method: [ck|nodemcu]
- Flash Frequency: 40Mhz
- CPU Frequency: 80Mhz
- Upload Using: SERIAL
- Upload Speed: 512k
- esp8266/Arduino v2.5.2
### Problem Description
Decreasing output power by `WiFi.setOutputPower( 0.0 );` is not permanent.
High output level is restored after some time, less than 30 minutes.
### How to reproduce
1 Upload code below.
2 Place esp8266 some 10 meters from AP
3 view esp's signal strength using AP internal web server.
4 after one minute the signal strength go lower (OK)
5 within some 30 minutes, the signal strength will be high again (NOK)
```cpp
#include
const char* ssid = "myssid";
const char* password = "mypass";
uint32_t millisStartLoop;
bool doneSetOutputPowerToLow = false;
void setup() {
Serial.begin( 74880 );
// We start by connecting to a WiFi network
WiFi.mode(WIFI_STA);
WiFi.hostname( "setOutputPower" );
WiFi.setOutputPower( 20.5 );
Serial.print("Wait for WiFi... ");
WiFi.begin( ssid, password );
while ( !WiFi.isConnected() ) {
Serial.print(".");
delay(1000);
}
Serial.println("\nWiFi connected to");
Serial.println(WiFi.localIP());
millisStartLoop = millis();
}
void loop() {
if ( !doneSetOutputPowerToLow && (millis() - millisStartLoop) > 60000 ) {
WiFi.setOutputPower( 0.0 );
Serial.println( "WiFi.setOutputPower( 0.0 )" );
doneSetOutputPowerToLow = true;
}
}
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.