-
Notifications
You must be signed in to change notification settings - Fork 284
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
Release/0.11.0 #486
Merged
Merged
Release/0.11.0 #486
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ormal method. This method doesn't need to be async. If it is not async, we can use it in `__init__()` instead of duplicating the implementation.
…dling If there is a KeyboardInterupt during this program, the device will not disconnect unless we ensure all pending tasks are allowed to finish.
… backend. This adds a background task that runs until a device is disconnected. If the task is cancelled (e.g. because the event loop was stopped with KeyboardInterrupt) and the event loop was run with asyncio.run(), then a "Disconnect" message should be send via D-Bus before Python exits.
So far disconnect() method has cleared all services collection, but it didn't reset client._services_resolved flag. This means that services were not resolved after reconnecting to the same client. Just clear client._services_resolved, which will allow to resolve services properly with each subsequent reconnect.
…kDataWriter.detach_buffer() instead of BleakDataWriter.DetachBuffer()
…sultAsync instead of WriteValueAsync
Pull master back into develop
Dotnet client fixed misspelled detach buffer function
…r-disconnect bluez: resolve services once again after reconnecting
Fix rssi values in BLE scanner
None of the backends actually require an async operation to know if a device is still connected, so this can just be a property instead of an async method.
Currently BlueZ invoke an advertisement data callback every time the RSSI changes while scanning. This is much more frequent than other backends. To make things more consistent cross-platform, this adds some filtering so that we only invoke the callback the first time the device is seen or when a relevant property changes. This brings the behavior more inline with the default macOS behavior. (Windows still needs work to get the same behavior.) Issue: #394
Sometimes BlueZ will remove a device from the BlueZ object manager before we connect to it. This adds a fallback to the experimental org.bluez.Adapter1.ConnectDevice method to try to connect to the device in this case.
This makes all of the D-Bus signal debug messages the same. This will also let us see if we are receiving too many signals due to bad filter settings when calling org.freedesktop.DBus.AddMatch.
In one instance in the BlueZ backend, the wrong object type was passed as the ``details`` argument.
This fixes an issue in the D-Bus signal handler where the interface was ignored in "InterfacesAdded" and "InterfacesRemoved" signals. This was causing services and characteristics to be treated like devices which lead to property lookup errors.
This will help with troubleshooting.
This fixes a race condition where a "PropertiesChanged" signal is is received for a device before "GetManagedObjects" has returned when starting scanning. Properties received before "GetManagedObjects" are simply discarded. Issue: #395
use proper args and add stack trace level
Needed for Python 3.6. create_task() was introduced in Python 3.7
WIP: dbus-next
This removes the call to stop_notify() in the cleanup code path in the BlueZ backend. This was causing an error message to always be logged when notifications were enabled and a device was disconnected. As described in the code comment. This call is not necessary and can be removed. Fixes: #472 (No changelog since this bug was introduced in changes since the previous release)
updating docstring for dotnet.client.BleakClientDotNEt connect method
This removes the call to stop_notify() in the cleanup code path in the BlueZ backend. This was causing an error message to always be logged when notifications were enabled and a device was disconnected. As described in the code comment. This call is not necessary and can be removed. Fixes #472
Added UART service example.
Also fixing erroneous links in previous Changelogs...
dlech
approved these changes
Mar 16, 2021
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.
I agree with your comments that this is enough for one release. I had a quick skim through all of the changes and nothing jumped out at me.
Very good, and thank you for the work you put into this one! I will merge it and make the release tomorrow. Once more unto the breach... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Backend: BlueZ
Issues and PRs relating to the BlueZ backend
Backend: Core Bluetooth
Issues and PRs relating to the Core Bluetooth backend
Backend: pythonnet
Issues or PRs relating to the .NET/pythonnet backend
bug
Something isn't working
Documentation
Issues or PRs relating to RTD or documentation
enhancement
New feature or request
examples
Issues relating to bleak example code
security
Issues relating to access restrictions in BLE
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A release proposal for version 0.11.0.
Comments:
Changelog
Added
dotnet.client.BleakClientDotNet
connect method docstring.AdvertisementServiceData
in BLEDevice in macOS devicesget_services
method onBleakClient
.use_cached
on .NET backend, to enable uncached readingof services, characteristics and descriptors in Windows.
handle
property onBleakGATTService
objectsservice_handle
property onBleakGATTCharacteristic
objectsBleakGATTServiceCollection
properties.asyncio
task to disconnect devices on event loop crash in BlueZ backend.callbacks only occur when advertising data changes like on macOS backend.
org.bluez.Adapter1.ConnectDevice
when trying to connecta device in BlueZ backend.
Fixed
AttributeError
inwrite_gatt_descriptor()
in Windows backend.Merged Dotnet client fixed misspelled detach buffer function #403.
write_gatt_descriptor()
in Windowsbackend. Merged Dotnet client fixed misspelled detach buffer function #403.
BaseBleakClient.services_resolved
not reset on disconnect on BlueZbackend. Merged bluez: resolve services once again after reconnecting #401.
BLEDevice
. Fixes The scan result shows 'Unknown' name of the device #371.BleakClientBlueZDBus
.Changed
handle
abstract property toBleakGATTService
and storing the services by handle instead of UUID.
BleakScanner.set_scanning_filter()
from async method to normal method.dbus-next
instead oftxdbus
.BleakClient.is_connected
from async method to property.Removed
__str__
methods from backend service, characteristic and descriptor implementationsin favour of those in the abstract base classes.