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

Controller object has no attribute advertising times [extended advertisement branch] #469

Open
vChavezB opened this issue Apr 13, 2024 · 2 comments

Comments

@vChavezB
Copy link

When running the bumble controller.py of branch gbg/controller-extended-advertising I get the following error when connecting to my Zephyr virtual bluetooth device:

ERROR:bumble.transport.common:!!! Exception in on_packet: 'Controller' object has no attribute 'advertising_times'
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\bumble\transport\common.py", line 152, in feed_data
    self.sink.on_packet(bytes(self.packet))
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\bumble\controller.py", line 575, in on_packet
    self.on_hci_packet(HCI_Packet.from_bytes(packet))
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\bumble\controller.py", line 585, in on_hci_packet
    self.on_hci_command_packet(packet)
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\bumble\controller.py", line 596, in on_hci_command_packet
    result = handler(command)
             ^^^^^^^^^^^^^^^^
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\bumble\controller.py", line 1364, in on_hci_le_set_advertising_enable_command
    self.schedule_advertiser(self.legacy_advertiser, time.time())
  File "C:\Users\user\AppData\Local\Programs\Python\Python311\Lib\site-packages\bumble\controller.py", line 1026, in schedule_advertiser
    heapq.heappush(self.advertising_times, (when, advertiser))
                   ^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Controller' object has no attribute 'advertising_times'
@vChavezB
Copy link
Author

vChavezB commented Apr 13, 2024

I think it has to do with the variable that is not initialized here

self.advertising_times: List[Tuple[float, Advertiser]]

@barbibulle
Copy link
Collaborator

Thanks for reporting this issue. I'll fix it ASAP.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants