Skip to content
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

Add wifi.radio.tx_power for espressif port #6540

Closed
askpatrickw opened this issue Jun 30, 2022 · 2 comments · Fixed by #6542
Closed

Add wifi.radio.tx_power for espressif port #6540

askpatrickw opened this issue Jun 30, 2022 · 2 comments · Fixed by #6542
Labels
enhancement espressif applies to multiple Espressif chips network
Milestone

Comments

@askpatrickw
Copy link

This is something we discovered in testing the PR for the Wemos C3 Mini board #6256. You need to be able to tune the WIFI TX Power to connect. (This is true for Arduino and MP as well).

Requested Change:

  1. Add tx_power() method to wifi.radio.
  2. tx_power method should require a single parameter of the desired tx_power in db (tx_power_db)
  3. wifi.radio.tx_power(tx_powr_db) calls esp_wifi_set_max_tx_power(tx_power_d * 4) <-- note the passed value is 4x the tx_power_db.

This logic is the same as MP https://github.com/micropython/micropython/blob/ccaf1978072a1d8e63b5e2ee350f15d875dfc1fd/ports/esp32/network_wlan.c#L473

How to test:

  1. You are able to connect to WIFI on an Espressif C3 board when you set tx_power to 8.5.
@askpatrickw
Copy link
Author

I'm sure this needs refinement... let me know if the ask needs more clarity. I'll update the description as needed.

todbot added a commit to todbot/circuitpython that referenced this issue Jun 30, 2022
@askpatrickw
Copy link
Author

@todbot you rock !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement espressif applies to multiple Espressif chips network
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants