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

Improve memory footprint #71

Merged
merged 8 commits into from
Jan 31, 2025
Merged

Improve memory footprint #71

merged 8 commits into from
Jan 31, 2025

Conversation

AzonInc
Copy link
Collaborator

@AzonInc AzonInc commented Jan 20, 2025

I tried to reduce the memory footprint and improve efficiency.
Would be nice if someone could give it a try and report about the stability.

Changes

  • Replaced std::string with a fixed-size character array, using memset, strcpy, and strcmp to save additional bytes.
  • Fixed the deviceName log line.

Additions

  • Added the build flag CONFIG_BT_NIMBLE_MEM_ALLOC_MODE_EXTERNAL when using the psram component to enable PSRAM usage for the NimBLE host.
  • Added an option to disable the alternative connect mode.
  • Enabled support for pairing as an app.
  • Added a Bluetooth Signal Strength Sensor

Validation Enhancements

  • Added error checks to prevent issues related to BLE incompatibilities.
  • Show a warning when compiling with API encryption enabled.
  • Display an info message when compiling without PSRAM.

Miscellaneous

  • Updated the README to reflect these changes and additions.

@AzonInc AzonInc added the help wanted Extra attention is needed label Jan 20, 2025
@AzonInc AzonInc marked this pull request as draft January 20, 2025 13:27
@AzonInc AzonInc force-pushed the improve-memory-footprint branch 3 times, most recently from 3538c5a to 934ff51 Compare January 21, 2025 13:30
@AzonInc AzonInc force-pushed the improve-memory-footprint branch from 934ff51 to 3ac9f88 Compare January 21, 2025 13:34
@AzonInc AzonInc mentioned this pull request Jan 21, 2025
@uriyacovy
Copy link
Owner

@AzonInc I installed it now, I'll update if I experience stability issues.

@uriyacovy uriyacovy marked this pull request as ready for review January 31, 2025 07:30
@uriyacovy uriyacovy merged commit d2be6ea into main Jan 31, 2025
2 checks passed
@AzonInc
Copy link
Collaborator Author

AzonInc commented Jan 31, 2025

So no restarts within the week and event logs enabled?

Also were there any API disconnects or no issues at all as it happened in #66

@uriyacovy
Copy link
Owner

No restarts while event logs enabled. I didn't experience any API disconnects, but couldn't monitor for the whole week.

@AzonInc
Copy link
Collaborator Author

AzonInc commented Jan 31, 2025

Okay cool.
I think it's a malformed message that's causing the api to disconnect.
Depends whats the name of the lock and also the users.

@AzonInc AzonInc deleted the improve-memory-footprint branch February 4, 2025 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants