Skip to content

Commit

Permalink
Turn off modem sleep
Browse files Browse the repository at this point in the history
Until we can update the Arduino core 2.6.0 (which is hopefully soon)
with the newer xtensa toolchain, it seems the best bet is to
reduce wifi sleeping. Also high transmit power can interfere with
the flash reading which can cause instability.

esp8266/Arduino#5998 (comment)
esp8266/Arduino#6471
  • Loading branch information
dirkmueller committed Nov 14, 2019
1 parent 98f3d27 commit 22e3375
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion airrohr-firmware/airrohr-firmware.ino
Original file line number Diff line number Diff line change
Expand Up @@ -2316,7 +2316,9 @@ static void connectWifi() {
#if defined(ESP8266)
// Enforce Rx/Tx calibration
system_phy_set_powerup_option(1);
WiFi.setOutputPower(20.5f);
// 20dBM == 100mW == max tx power allowed in europe
WiFi.setOutputPower(20.0f);
WiFi.setSleepMode(WIFI_NONE_SLEEP);
WiFi.setPhyMode(WIFI_PHY_MODE_11N);
delay(100);
#endif
Expand Down

0 comments on commit 22e3375

Please sign in to comment.