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

Chromium Bluetooth implimentation #17

Open
nathanrona opened this issue Jun 2, 2021 · 5 comments
Open

Chromium Bluetooth implimentation #17

nathanrona opened this issue Jun 2, 2021 · 5 comments

Comments

@nathanrona
Copy link

You may be interested in looking at the Bluetooth code of Chromium, they have a pretty inclusive implementation of Blutooth in C++ https://chromium.googlesource.com/chromium/src/+/refs/heads/main/device/bluetooth

@adabru
Copy link
Owner

adabru commented Jun 2, 2021

That's a nice hint! The page you linked seems to say there is no active maintainer? That would make it more difficult to ask questions. Maybe there is another cross-platform foss project where bluetooth is not so "experimental"?

@nathanrona
Copy link
Author

If you look here https://chromium.googlesource.com/chromium/src/+log/refs/heads/main/device/bluetooth is seems that it is rather active. Also given that it is implemented in Chrome browser Web-blutooth api, why do you consider it Exprimental?

For questions, maybee IRC or Slack ?https://docs.google.com/presentation/d/1abnqM9j6zFodPHA38JG1061rG2iGj_GABxEDgZsdbJg/present?slide=id.i283

@nathanrona
Copy link
Author

@nathanrona
Copy link
Author

Notice they use wrl, which is now superseded by C++/WinRT https://docs.microsoft.com/en-us/cpp/cppcx/wrl/windows-runtime-cpp-template-library-wrl?view=msvc-160

@adabru
Copy link
Owner

adabru commented Jun 3, 2021

If you look here https://chromium.googlesource.com/chromium/src/+log/refs/heads/main/device/bluetooth is seems that it is rather active.

That's a good point.

Also given that it is implemented in Chrome browser Web-blutooth api, why do you consider it Exprimental?

Based on a paragraph on the site you linked:

Future Work
The API and implementation have many known issues.
The initial API was heavily influenced by BlueZ. Low Energy GATT APIs are not consistent across platforms. Some of the high level abstractions built into device/bluetooth are difficult for clients. Several TODOs exist in the C++ header files, e.g. BluetoothAdapter::Observer.
Primarily, the API should be split into fundamental Bluetooth concepts and seperate, optional, high level utility classes.
E.g. receiving advertising packets should be routed directly to clients allowing contents of the individual packet to be inspected. Caching of known devices should not exist in the fundamental API, but be offered as utility classes.
See also the Refactoring meta issue.

And this table: https://developer.mozilla.org/en-US/docs/Web/API/Web_Bluetooth_API#browser_compatibility

On the other hand, there are projects like https://www.btframework.com (commercial) where bluetooth is more relevant than in a web browser.

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

No branches or pull requests

2 participants