← index #8941PR #5670
Related · high · value 0.316
QUERY · ISSUE

Support config("pm")

openby peterharperukopened 2022-07-21updated 2022-07-21
enhancement

Currently I can set the power management value for wlan (network cyw43) with the config function. But I can't query the current value. It would be useful to be able to do this for debugging.

applies to network cyw43 wifi
Requires a change to the driver https://github.com/georgerobotics/cyw43-driver/pull/8
I will push a change.

CANDIDATE · PULL REQUEST

Added txpower to WLAN config

closedby ElHyperionopened 2020-02-19updated 2022-04-22
port-esp32

I needed to configure tx power so I added a 'txpower' parameter to WLAN.config method for setting and getting max access point transmitter power. I tested it and the changes are effective immediately after entering the command. The WiFi signal strength on my phone dropped from excellent to poor after setting it from maximum to minimum. Minimum is -19 for -10.5 dBm and maximum is 76 for 19 dBm.

Minimal working example:

import network as net
ap = net.WLAN(net.AP_IF)
ap.active(True)
ap.config(txpower=76)
print(ap.config('txpower') * 0.25, 'dBm')  # 19.0 dBm

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied