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

How to know that a ble dongle is fully ble5 compliant? #93

Open
WouterJD opened this issue Oct 22, 2022 · 6 comments
Open

How to know that a ble dongle is fully ble5 compliant? #93

WouterJD opened this issue Oct 22, 2022 · 6 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@WouterJD
Copy link
Contributor

WouterJD commented Oct 22, 2022

The problem
Function add_gatt() object has no attribute 'add-advertisement-status-changed'.

I got this error on BLE4 dongles before, a user now reports it now occurs on his ble5 dongle.
See WouterJD/FortiusANT#389 (comment)

Reproduction
Occurs always on same system

Expected behavior
How can I detect a dongle is really ble5 compliant;I recall there are inferior dongles that state compliancy but are not.

Screenshots
See black console in https://user-images.githubusercontent.com/69309725/197349798-2273ad49-6f32-438f-86e2-c39a27cebaa2.PNG

Desktop (please complete the following information):

  • OS: Windows

Additional context
I will ask user dongle details.

@WouterJD
Copy link
Contributor Author

A driver update solved the problem
See WouterJD/FortiusANT#389 (comment)

The question (how to detect) remains open.

@kevincar
Copy link
Owner

kevincar commented Nov 9, 2022

This may be driver dependent. One way to check on Windows is to checkout the device on device manager and confirm that the device driver specifies that "peripheral role is supported".

Are you wanting to have bless implement a way to detect this?

@WouterJD
Copy link
Contributor Author

Hi @kevincar Thanks for response.
Yes, it would be very helpful and avoid issues and debugging to detect.

I can then implement the check and provide a decent message to the users.

@kevincar
Copy link
Owner

I think this would be a nice feature. However, this may take some time as I'd like to ensure bless can work cross-platform, which would mean we'd ideally enable this across all platforms.

In your case for Windows implementation, we should be able to accomplish this by Enumerating appropriate device drivers, then checking the PeripheralRoleSupported Property.

Linux should be straight forward, but macOS will likely pose the biggest challenge as obtaining information on available Bluetooth controllers (particularly external devices) is not so obvious.

We can create a feature branch of bless to get this going and slowly work on the other parts. Would be great to get your help on this, otherwise the turn around time may be a bit slow.

@WouterJD
Copy link
Contributor Author

The source of the issue was that some installation did not work (on raspberry) which first triggered the idea that the BLE interface would be incompatible (see WouterJD/FortiusANT#402 (comment)).

Since that's not the case, if "object has no attribute" in exceptionMsg: self.Message += "BLE-5 required." may be enough.

@kevincar
Copy link
Owner

I'm actively looking into this issue (though slowly) since it may be helpful for us to enumerate devices and select specified bluetooth module if multiple are available (see this issue). Currently, you can actually enumerate and select the adapter when using bless on Linux, but I'd like to extend that to the other platforms. So I'm hoping this feature will eventually be available. Currently still in the works for now.

@kevincar kevincar added enhancement New feature or request help wanted Extra attention is needed labels May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

2 participants