-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Implemented the ability to set the transmitter power on nRF52 devices #3493
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
Conversation
This is just an initial pull request to discuss the additional device implementation details and or compiler flag. It will fail build test for other devices. Also I elected not to preform transmitter value checking. It can be added at the expense of code size. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! One question. The code looks good otherwise. Thanks!
You shouldn't need an extra flag. |
You'll also need to edit |
Damn I forgot to commit that file! Good catch that explains some failures. |
Because the shared-bindings files |
@dhalbert Is correct according to Nordic API reference there are 3 types of power roles.
My implementation strictly sets the Advertiser role. Maybe this property should be renamed advertising_tx_power? |
Maybe instead of a property this should simply be an argument added to the |
I think this may be a better solution. The original |
It looks like its supported at first glance of the Espressif documentation. |
I was thinking of the HCI protocol implementation, not the ESP-IDF. Looking through the HCI commands, I see ways of reading the power used, but setting the power for BLE can only be done for advertising, with "LE Set Extended Advertising Parameters", and Extended Advertising is not turned on in the NINA-FW we are using. |
Added support for setting transmitter power
Added support for setting transmitter power
Added support for setting transmitter power currently done during every time advertising starts as implemented in the Arduino library
Added the tx_power to the adapter object
I'm picking up this PR as a way to get back into nRF work. |
@dhalbert Please do a final review on this. I tested it on a Clue and read the RSSI changes with nRF Connect on my phone. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thanks!
Did this go into 6.3.0? |
No, what's in 6.3.0 is in the release notes: https://github.com/adafruit/circuitpython/releases/tag/6.3.0. In general 6.3.0 added boards and a limited set of important fixes, not feature additions. |
I asked because there's some strangeness mentioned in Adafruit Forums: Bluefruit advertisement.complete_name not showing |
I added the ability to set the transmitter power on the nrf52 devices. I also modified the Adafruit_CircuitPython_BLE python file and will commit those changes as well. Other devices will need to have the hal interface added or a dummy interface created if not possible. Alternatively a compile time flag could disable this for all but this particular device.