-
Notifications
You must be signed in to change notification settings - Fork 57
Advertising scan fails #124
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
Comments
@tannewt so it needs not to set flags if Adafruit_CircuitPython_BLE/adafruit_ble/advertising/standard.py Lines 162 to 168 in 2f79150
and will also need to be fixed in similar places, not just here. |
@dhalbert Ya, I think generally you want to avoid setting anything if entry is provided. Otherwise you may override settings from the scan entry. |
I might be missing something, but it looks like if |
It gets set to an empty dict:
It used to be that |
Note that |
@dhalbert , Sorry, when I say that the data_dict isn't set, I mean that it is declared as an empty dictionary, not set from the values from an entry. When I think that overriding the |
I think the PR you linked is more efficient, but it does not fix the root cause. |
(I had to study this a bit.) That's true, but if Adafruit_CircuitPython_BLE/adafruit_ble/advertising/__init__.py Lines 239 to 253 in 2f79150
The "policy" is that if you create the Here's some REPL testing showing it's working. This is with #125. >>> from adafruit_ble.advertising import Advertisement
>>> from adafruit_ble.advertising.standard import ProvideServicesAdvertisement
>>> a = Advertisement()
>>> a.flags
<adafruit_ble.advertising.AdvertisingFlags object at 0x7fae72441970>
>>> a = Advertisement() # make another one
>>> a.flags.general_discovery = True # it set something in flags
>>> psa = ProvideServicesAdvertisement()
>>> psa.flags.general_discovery = True # also works |
Thank you @dhalbert , so, if I understand it correctly, the only way that I will do some more testing on my side to see if I can find the exact reason. |
Right, so there may be something odd with your |
Automatically closed when I merged the pull request, but if you are still having issues, we of course can reopen. |
After updating to the latest version, my script began crashing with the following stack:
Perhaps related to the lazy object instantiation of
self.flags
from the parent class.Reverting to version 7.3.4 fixes the problem.
The text was updated successfully, but these errors were encountered: