Skip to content

WiFi.setTxPower() always return +19.5dBm #9858

Closed
@enjoyneering

Description

@enjoyneering

Board

ESP32 Dev Module

Device Description

plain module

Hardware Configuration

plain module

Version

v3.0.1

IDE Name

Arduino IDE

Operating System

Windows 10

Flash frequency

80MHz

PSRAM enabled

no

Upload speed

115200

Description

WiFi.setTxPower() always return +19.5dBm in AP or STA mode

I think there is a typo in the setTxPower() and getTxPower().

Sketch

//in setTxPower() and getTxPower() instead of &&

if (!WiFi.STA.started() && !WiFi.AP.started()) {  //&& is wrong
    log_w("Neither AP or STA has been started");

//should be ||
if (!WiFi.STA.started() || !WiFi.AP.started()) { //|| is correct
    log_w("Neither AP or STA has been started");

Debug Message

return +19.5dBm

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions