How to change the advertisement transmit power
- Dominant language
- Python
- Stars
- 555
- Forks
- 138
- Avg merge
- 3d 15h
- Merged PRs (30d)
- 9
Description
I am currently using the nrf52840 dongle as a controller, using the example from https://github.com/pstrueb,
Now we want to change the transmission power of the advertisement.
I modified examples\run_advertiser.py according to bumble\docs\mkdocs\src\platforms\zephyr.md
[changetxpower.py](https://github.com/user-attachments/files/21849942/changetxpower.py)
An error will occur: AttributeError: 'HCI_Command_Status_Event' object has no attribute 'return_parameters'
[HCI_Write_Tx_Power_Level_Command-error-1.txt](https://github.com/user-attachments/files/21849975/HCI_Write_Tx_Power_Level_Command-error-1.txt)
then I comment out the line:
`if response.return_parameters.status == hci.HCI_SUCCESS:
print(f"TX power set to {response.return_parameters.selected_tx_power_level}")`
An error occurs:
DEBUG:bumble.host:### CONTROLLER -> HOST: HCI_COMMAND_STATUS_EVENT:
status: HCI_UNKNOWN_HCI_COMMAND_ERROR
num_hci_command_packets: 1
command_opcode: HCI_WRITE_TX_POWER_LEVEL_COMMAND
[HCI_Write_Tx_Power_Level_Command-error-2.txt](https://github.com/user-attachments/files/21850013/HCI_Write_Tx_Power_Level_Command-error-2.txt)
Contributor guide
Assessment
This issue has not been assessed yet.