ESP32 (WROOM-32) WiFi power strangeness

Yep, thats where I got those. I've done some testing with 8 different modules now and had strange results. All modules were setup as AP & test code simply checks power values after setting each level, outputting the results to the serial console. No device connected to the AP.

Calling getTxPower() after a reset gives a value of 78 for all modules (WIFI_POWER_19_5dBm) in all cases. However for most modules tested, calling setTxPower(WIFI_POWER_19_5dBm) does not necessarily mean that a subsequent call to getTxPower() will return 78, for most modules it does not. Also, setting all the values in the enum in sequence and then calling getTxPower() returns a different number than expected for some of the other power settings. See a test output below from one module.

ESP-WROOM-32 Devkit V1 Module board (38 pin)#1

ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DOUT, clock div:1
load:0x3fff0030,len:1184
load:0x40078000,len:13260
load:0x40080400,len:3028
entry 0x400805e4System up: 0:00:00:00 (d:h:m:s)
Freq: 240 MHz
MCU temperature : 53 C
Heap: 338740, free: 313368, min free: 308000, max block: 110580
Chip Info Model: 1
Chip Info Features: 50
Chip Info Cores: 2
Chip Info Revision: 3

Setting AP (Access Point)…
AP IP address: 192.168.4.1
Startup TX Power value: 78
Set TX Power | Set Call Status | Set | Readback
-1.0 dBm | Not OK | -4 | 78
2.0 dBm | OK | 8 | 1
5.0 dBm | OK | 20 | 15
7.0 dBm | OK | 28 | 25
8.5 dBm | OK | 34 | 33
11.0 dBm | OK | 44 | 41
13.0 dBm | OK | 52 | 47
15.0 dBm | OK | 60 | 59
17.0 dBm | OK | 68 | 59
18.5 dBm | OK | 74 | 59
19.0 dBm | OK | 76 | 59
19.5 dBm | OK | 78 | 59

One of the worst modules tested was a 38 pin Devkit V1 with ESP32-WROOM32 (test output above). One of those had very low maximum powers after a call to setTxPower() (15dBm if we take the numbers in the enum as good!). The other Devkit V1 I tested was good.

Running my test code which simply checks power values after setting each level, I noticed many of the ESP32-CAM modules also had low maximum powers after a call to setTxPower() as well as differing power values after subsequesent resets/powerons.