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

Usability refactor #118

Merged
merged 5 commits into from
Jan 2, 2025
Merged

Usability refactor #118

merged 5 commits into from
Jan 2, 2025

Conversation

ConnorRigby
Copy link
Collaborator

@ConnorRigby ConnorRigby commented Dec 23, 2024

This is a work in progress PR that addresses a handful of larger issues with BlueHeron. Of note, several things will change when this PR is complete

  1. :blue_heron is now an application as opposed to a library. This is done to better use supervision
  2. :blue_heron_transport_uart will be depreciated. This could be seen as a small regression, however to my knowledge, there isn't anyone using the "pluggable" transports as of right now. Please speak up if this isn't true. The reason for this change is just to simplify and reduce code.
  3. creating a Peripheral will now be supervised and backed by PropertyTable instead of existing only in process memory. This solves a couple problems, and enables a few new features. Notably, Peripheral code is now allowed to crash "safely" without bringing down entire applications, or requiring the entire bluetooth stack to be restarted. This also enabled "readvertising" when a device disconnects without user code needing to implement it.
  4. SMP will be "first class" and enabled by default. This has been the case for ESP32 and other BLE development boards for a long time, we should follow suit.
  5. updating Advertising params and data will be much more streamlined, and should not require manually creating binaries
  6. implementing Central should now be easier, tho out of the scope of the initial changes in this PR.

Closes #26

This is a large change that enables a few changes later on:
1) transport is no longer swappable. This means we will only support
   the UART HCI transport for now. This is done to remove code and
   better handle errors.
2) BlueHeron is now it's own Application with it's own supervision
   structure. This enables robust error handling for Peripherals.
3) Enable SMP by default. This is a noop in the case of non-permissions
   enabled services, but allows encryption by supplying permissions.
@ConnorRigby ConnorRigby marked this pull request as ready for review December 24, 2024 19:25
@ConnorRigby
Copy link
Collaborator Author

I've marked this PR as ready for review for anyone watching. It's a rather large set of changes, so i do apologize for that, but i think it's been long enough that the public APIs needed defining and this is a step in that direction.

@ConnorRigby
Copy link
Collaborator Author

I've been using this in anger for the last week or so. Going to merge as it sits to keep moving forward. If anyone finds any problems, feel free to open up an issue and i'll address.

@ConnorRigby ConnorRigby merged commit ed986fd into main Jan 2, 2025
1 check passed
@ConnorRigby ConnorRigby deleted the ng branch January 2, 2025 17:38
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.

Does BlueHeron.Context need to exist?
1 participant