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

Feature Request: BLE to Websocket adapter #2

Open
Xasin opened this issue Jul 26, 2021 · 2 comments
Open

Feature Request: BLE to Websocket adapter #2

Xasin opened this issue Jul 26, 2021 · 2 comments

Comments

@Xasin
Copy link

Xasin commented Jul 26, 2021

Hi Bellafaire!
Thank you so much for already forking out this project into a separate GitHub repo to make it easier to re-use.

I was wondering if it were possible to add a method for the BLE device to send and receive data to/from a Websocket connection, to allow arbitrary information transfer between a BLE device and a websocket endpoint, preferably in the form of a BLE characteristic (like the old BT SPP channel).

This shouldn't be too hard to add since the app itself should perform little to no intermediate processing apart from stitching packets together from the 8-Byte BLE limit, but I don't know how complex the Java libraries are for this kind of situation.

If this is something you would be willing to add I'd be delighted, otherwise I'd probably nip on this myself eventually and open a PR once I get something working.

I'd want to use this for one of my upcoming projects, the TapV2 badge, to allow continuous communication of my BLE-based wearable with a central server.

@Bellafaire
Copy link
Owner

That's a very cool idea that could open a lot of possibilities for a connected device. I will give it a look

@Xasin
Copy link
Author

Xasin commented Jul 26, 2021

Thanks a lot!
As long as the BLE device can set which WebSocket connection it wants to talk to, and can transmit arbitrary (reasonably sized) binary packets, I'd be happy.
SLIP encoding or similar over a standard "BLE SPP" Characteristic could almost be enough, and that way the app can remain basically the same for a wide variety of BLE projects that could then interface with all sorts of services.

👍

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