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

Introduce the BleHandler struct #8

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

lukipuki
Copy link
Collaborator

It handles the low-level meshtastic BLE protocol, including the 3 characteristics used to read from and write to the radio. It also converts BLE errors into internal errors.

The high-level protocol remains to be added, especially the sequence mentioned in https://meshtastic.org/docs/development/device/client-api

@ajmcquilkin
Copy link
Member

Would the pattern of the BLE connection match the pattern for using the other two connection methods? My ideal world would be that the pattern of all three match, even if we have to change the other two a bit

@lukipuki
Copy link
Collaborator Author

lukipuki commented Jan 29, 2024

I'm not sure I understand your concern. BleHandler is an internal utility, its equivalent for e.g. TCP is hidden deep inside tokio or the Linux kernel, so there is no equivalent pattern inside this library.

The final user-facing API will be the same though, here's a snippet from my WIP code returning a StreamHandle, just like the other two connection types: lukipuki@bf62d6f#diff-56b28e06d43da250d6266d02c8008187338880c638671064e312eab6aef1e2e8R270-R273

But that's not part of this PR, it will come in later ones.

This has been moved to the `ble_handler` mod.
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

Successfully merging this pull request may close these issues.

2 participants