8000 [Linux] Proper handling of BlueZ D-Bus service restart · Issue #30792 · project-chip/connectedhomeip · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Linux] Proper handling of BlueZ D-Bus service restart #30792

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

Closed
arkq opened this issue Dec 4, 2023 · 1 comment
Closed

[Linux] Proper handling of BlueZ D-Bus service restart #30792

arkq opened this issue Dec 4, 2023 · 1 comment

Comments

@arkq
Copy link
Contributor
arkq commented Dec 4, 2023

Reproduction steps

Problem

On Linux (and some other platforms) Bluetooth communication is provided via BlueZ which is a D-Bus service. It is possible that such external service will crash. In most cases BlueZ is governed by systemd, which will restart the service. Anyway, the application which communicates with BlueZ needs to properly handle such situation (e.g. the D-Bus ID of the services changes, so any cached objects need to be updated). Also, it is required to restart BLE advertisement and re-register GATT application.

Solution

In case of short BlueZ outage (few ms) the case is simple, we can reload BLE subsystem in the SDK and everything should work fine.

However, what should be done in case where BlueZ will be off-line for longer period or Bluetooth dongle is unplugged (in that case BlueZ is on-line, but there is no adapter available)? The simplest solution would be to crash Matter application since BLE functionality can not be provided. Alternatively, we can notify SDK core that BLE is not available, so every component which relies on BLE can return proper error (in case of controller, even user can be notified about such fact) and wait for the BLE subsystem to be back on-line. There is also case where BLE adapter is not available during Matter app startup, but might be available later.

Platform

raspi

Platform Version(s)

master

Type

Manually tested with SDK

(Optional) If manually tested please explain why this is only manually tested

No response

Anything else?

No response

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

No branches or pull requests

1 participant
0