-
Notifications
You must be signed in to change notification settings - Fork 280
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
Storage alignment issues aka. "max number of pairings" #231
Open
cfurter
wants to merge
40
commits into
Mixiaoxiao:master
Choose a base branch
from
cfurter:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fix: It base64 error if use with WifiManager
…nnection fix: the device is not work after reconnect wifi
- Might fix Mixiaoxiao#103, Mixiaoxiao#139, Mixiaoxiao#147, Mixiaoxiao#184, Mixiaoxiao#198 - Also adds changes by @ruleechen - Also adds changes by @thiti-y
ruleechen
added a commit
to ruleechen/Arduino-HomeKit-ESP8266
that referenced
this pull request
Aug 8, 2023
(cherry picked from commit d4959fd)
@jgstroud Attempting to use 1KB from stack is risky as the ESP8266 has very small stack to start with.
…rtesy of @jgstroud Attempt keep the session alive while pairing Add optimistic_yields to try and prevent the session from timing out
(cherry picked from commit eab3d41)
(cherry picked from commit e85342a)
When performing a OTA firmware update, we need to shutdown the HomeKit sever because all network processing (including pings) stop during file uploads. So system cannot process incoming TCP requests, risking out-of-memory crashes as buffers fill up.
Memory and performance imrovements
homekit_value_copy was failing on non-initialized value struct which results in inacurrate characterisitic updates
…/sdk/lwip2/include/glue.h:98:37: warning: 'struct ip_info' declared inside parameter list will not be visible outside of this definition or declaration
…e declared size can hold.
… of the functions that use them!
Memset the homekit value object.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've taken the work of @thiti-y and @paullj1 and added my own fixes to the storage issues.
TLDR; the alignment issues and read write protection of the ESP flash issues are now resolved.
With ESP8266 flash, you can only write data in 4 byte alignments to addresses that have been erased. Once you've written data to an address, you cannot write to the address again until the sector is erased. I've corrected the logic in
storage.c
based on this and all seems to work well now.I am now able to added and remove pairing without the "max number of pairings" issues. You may need to do a
homekit_storage_reset()
or erase the "EEPROM" sector before it will work well.I have also added a bunch of changes to remove Platform.io warnings.