New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wifi.radio.tx_power does not support float #6559
Comments
Related to PR #6542 |
@todbot any chance you want to look at this one? |
This was by design. The underlying API is int8_t so I figured this attribute should be that way too. Is that a bad assumption? |
Like, what do they mean exactly "set to 8.5dBm" when this is the API : https://docs.espressif.com/projects/esp-idf/en/latest/esp32c3/api-reference/network/esp_wifi.html#_CPPv425esp_wifi_set_max_tx_power6int8_t Oh but wait there's that div by 4 in there now. Okay I'll see what I can do. |
The units are 0.25dBm, but the actual power setting is coarser than that, not even in 1dBm units:
|
So what I copied from MicroPython is incorrect and that |
I don't know what's going on internally - that code is in a binary blob. It could be something about how the radio hardware works. But in any case there's significant quantization. I too am puzzled about the Wemos instructions. Have either of you tried wifi at various power settings to see if some don't work at all? |
They worked at all the 6 or so settings I tested, showing corresponding changes in TX power using a WiFi sniffer. |
I agree, a float would be good. No issue changing it. |
okay, PR incoming shortly |
The Wemos docs say to use 8.5db to work around the WIFI connect issue.
Workaround
If you use 8 or 9 you can still connect.
Code/REPL
Behavior
TypeError: can't convert float to int
Description
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: