Skip to content

How to change the advertisement transmit power #761

@chelalv

Description

@chelalv

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
An error will occur: AttributeError: 'HCI_Command_Status_Event' object has no attribute 'return_parameters'
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions