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

Release/0.9.0 #340

Merged
merged 52 commits into from
Oct 20, 2020
Merged

Release/0.9.0 #340

merged 52 commits into from
Oct 20, 2020

Conversation

hbldh
Copy link
Owner

@hbldh hbldh commented Oct 20, 2020

Added

Changed

  • BleakCharacteristic.description() on .NET now returns the same value as other platforms.
  • Changed all adding and removal of .NET event handler from +=/-= syntax to calling add_ and remove_ methods instead. This allows for proper removal of event handlers in .NET backend.
  • All code dependence on the BleakBridge is now removed. It is only imported to allow for access to UWP namespaces.
  • Removing internal method _start_notify in the .NET backend.
  • GattSession object now manages lifetime of .NET BleakClient connection.
  • BleakClient in .NET backend will reuse previous device information when reconnecting so that it doesn't have to scan/discover again.

Fixed

cspensky and others added 30 commits September 21, 2020 10:46
…0.8.0

Feature/re merge to develop after 0.8.0
Adding timeout to dbus call as well to make sure it doesn't hang forever
`_uuid` is not defined.  Updating to point to `uuid` property.
Also adding Interfaces again...
Prevent overwriting address in dbus client
Catch RemoteError in is_connected in BlueZ backend (#310)
Checking the formatting and linting only needs to run once per pull
request. Also, this will allow the other tests to run even if there
is a format or lint error.
github: use --check instead of --diff for black
This adds an event waiter so that `BleakClientDotNet.disconnect()`
will actually await the disconnection event before returning.

This is a partial fix for #313.
… on disconnect

When device was disconnected and reconnected, we would end up with
multiple disconnect handlers since the underlying .NET object was
reused.

By keeping the event registration token, we are able to remove the
event handler when we lose the connection to the device.

This should fix #312.
If we keep this, then we can reconnect without having to run
`BleakScannerDotNet.find_device_by_address()` again during `connect()`.
All backends had the same implementation, so it can be moved to the
abstract base class.

BleakGATTService.uuid properties are modified so that all platforms
return a lower case xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx string.

The filter is modified so that if a string argument is given, then it
will be converted to lower case to match the uuid property.
For the most part, we have standardized on storing and returning UUIDs
as strings with lower case hex digits in the format
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.

On the other hand, arguments to functions and methods should be case
insensitive to make it easy for end users.

This fixes some cases that didn't adhere to these principals.
This changes the type of the _uuid argument in cb_uuid_to_str() to
CBUUID. This saves all callers from having to call UUIDString()
This removes use of the BleakBridge for managing ValueChanged and
replaces it with a pure Python implementation.
This uses a common implementation for the `BleakGATTCharacteristic.description()`
method. This will potentially change the return value on Windows, but it ensures that we
get the same result on all platforms.
`BleakGATTDescriptor` provides an implementation for the `description`
property, but two of the backends were overriding it with something
else.
Scheduled daily dependency update on Thursday
This changes the dotnet Bleak client to use a GattSession object to
manage the connection lifecycle. Creating a GattSession with
MaintainConnection set to True seems a bit more straight forward
than depending on other API calls to implicitly initiate and maintain
the connection.
This changes the ConnectionStatusChanged event handler so that it only
calls loop.call_soon_threadsafe() once per callback.
dlech and others added 19 commits October 9, 2020 11:47
UUID fixes and cleanups
* Fix `self._device_info` always set to `None`
* Keep reference to `CentralManagerDelegate` object instead of relying on undocumented `CBPeriperal.manager()` method.
…sertion crashes if disconnect is called more than once.
Avoiding 'None' case when disconnecting
doc: add troubleshooting page
* Adding a timeout on OSX so that the connect cannot hang forever.

* Using asyncio.wait_for and events for timeout

* Applied formatting

* Implementing suggestions

* Removing unused import
* fix NUS uuids

Co-authored-by: Carglglz <carlosgilglez@gmail.com>
@hbldh hbldh self-assigned this Oct 20, 2020
@hbldh hbldh added Backend: pythonnet Issues or PRs relating to the .NET/pythonnet backend Backend: BlueZ Issues and PRs relating to the BlueZ backend Backend: Core Bluetooth Issues and PRs relating to the Core Bluetooth backend bug Something isn't working Documentation Issues or PRs relating to RTD or documentation enhancement New feature or request scanning Issues about scanning/discovery labels Oct 20, 2020
@hbldh
Copy link
Owner Author

hbldh commented Oct 20, 2020

@dlech I have merged all existing reviewed PRs, tested the code using my peripherals and machines and updated the CHANGELOG.rst with what I think are all the details. I will go ahead and make a release, and I decided to make it 0.9.0 due to all Windows backend changes that were made.

@hbldh hbldh merged commit 4dc6ee4 into master Oct 20, 2020
@hbldh hbldh deleted the release/0.9.0 branch October 20, 2020 21:25
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 scanning Issues about scanning/discovery
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants