Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WiFi.setOutputPower setting ignored after some time #6620

Open
Teddyz opened this issue Oct 7, 2019 · 0 comments
Open

WiFi.setOutputPower setting ignored after some time #6620

Teddyz opened this issue Oct 7, 2019 · 0 comments

Comments

@Teddyz
Copy link

Teddyz commented Oct 7, 2019

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)

#include <ESP8266WiFi.h>

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;
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant