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

BleakServer #81

Closed
kevincar opened this issue Jul 5, 2019 · 8 comments
Closed

BleakServer #81

kevincar opened this issue Jul 5, 2019 · 8 comments
Labels
enhancement New feature or request

Comments

@kevincar
Copy link
Contributor

kevincar commented Jul 5, 2019

Currently, bleak establishes a BleakClient that can scan for BLE peripheral devices.

Are there any future plans to implement a BleakServer to establish a central device that can advertise services and characteristics that other devices can connect to?

I imagine a BleakServer could utilize BleakGATTService and BleakGATTCharacteristic objects to set up and manage user-defined services that are then advertised and could be read from, written and/or subscribed to.

@hbldh
Copy link
Owner

hbldh commented Jul 8, 2019

It would be nice but there are no immediate plans; I have had ideas about a Flask-like decorator approach to adding services and characeristics. It does however require a renaming of this package since it then no loger is a Platform agnostic client but also a server...
My focus have been set on getting the macOS backend in place first; but now that it has been almost released, I have to find a new milestone for bleak...

@hbldh hbldh added the enhancement New feature or request label Aug 2, 2019
@filips123
Copy link

@hbldh Any update? Bleak is an amazing cross-platform BLE client. However, BLE server (possibly also cross-platform) would be another amazing and needed addition.

@kevincar
Copy link
Contributor Author

kevincar commented Oct 5, 2019

@filips123 Until there are future plans to implement a BLE server into bleak, some colleagues and I implemented a rough draft of a server for bleak. We'v tested it on both Windows and OS X platforms and it works for our purposes (no Linux yet). Hopefully something similar can be officially added to bleak in the future; although as it has been noted, in this case, bleak is no longer a client only package.

@hbldh
Copy link
Owner

hbldh commented Oct 7, 2019

The main reason for not implementing a server part in Bleak is that I as a developer has no personal usecase for it. I am reluctant to add that functionality to Bleak since I am struggling to maintain this project as it is, and it would be detrimental to its health to add another part for which I have no personal interest.
It would be much better if someone else would take the lessons learned in this project and make a standalone server-package, much like @kevincar has done. Everyone would benefit from that instead of adding it here, I think.

@hbldh
Copy link
Owner

hbldh commented Sep 25, 2020

Closing this since it is outside of the Bleak project scope.

@kevincar
Copy link
Contributor Author

As a reference, and for those looking for a potential cross-platform python BLE peripheral solution, I decided to create a companion project from that rough draft previously mentioned as a companion to this project.

Thanks for the motivation @hbldh!

@cspensky
Copy link
Contributor

@kevincar I'd love to help out with bless and get this functionality stable.

@kevincar
Copy link
Contributor Author

@cspensky Certainly! Feel free to fork it, submit pull requests, open issues, or begin discussions there.

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

No branches or pull requests

4 participants