Browse Source

WiFi: Configure TX power (#1915)

master
Max Prokhorov 5 years ago
committed by GitHub
parent
commit
1f44bf5790
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 0 deletions
  1. +9
    -0
      code/espurna/config/general.h
  2. +3
    -0
      code/espurna/wifi.ino

+ 9
- 0
code/espurna/config/general.h View File

@ -578,6 +578,15 @@
#define WIFI_GRATUITOUS_ARP_INTERVAL_MAX 30000 #define WIFI_GRATUITOUS_ARP_INTERVAL_MAX 30000
#endif #endif
// ref: https://github.com/esp8266/Arduino/issues/6471
// ref: https://github.com/esp8266/Arduino/issues/6366
//
// Issue #6366 turned out to be high tx power causing weird behavior. Lowering tx power achieved stability.
#ifndef WIFI_OUTPUT_POWER_DBM
#define WIFI_OUTPUT_POWER_DBM 20.0
#endif
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// WEB // WEB
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------


+ 3
- 0
code/espurna/wifi.ino View File

@ -104,6 +104,9 @@ void _wifiConfigure() {
)).toInt(); )).toInt();
#endif #endif
const auto tx_power = getSetting("wifiTxPwr", WIFI_OUTPUT_POWER_DBM).toFloat();
WiFi.setOutputPower(tx_power);
} }
void _wifiScan(uint32_t client_id = 0) { void _wifiScan(uint32_t client_id = 0) {


Loading…
Cancel
Save