BLE Host - Persist bonding material to sys/config#280
BLE Host - Persist bonding material to sys/config#280ccollins476ad merged 1 commit intoapache:masterfrom
Conversation
598a437 to
9af2789
Compare
9af2789 to
cedad79
Compare
|
I could review this. Do you mind resolving the conflicts first, given that the other PRs have been merged? That would make the patch easier to read :) |
cedad79 to
618e9d7
Compare
|
Thanks, Marko. I didn't realize so many conflicts had sprouted. They should be resolved now. |
| dst += idx * value_size; | ||
| src = dst + value_size; | ||
|
|
||
| move_count = *num_values - idx; |
There was a problem hiding this comment.
Should this be multiplied by value_size?
There was a problem hiding this comment.
Yes, good catch. I will fix that and see if I can add some unit tests for this.
There was a problem hiding this comment.
It turns out there already were unit tests, but they were using the old deprecated store package (net/nimble/host/store/ram)!
In addition to the above change, I also had to reduce some setting defaults:
- BLE_STORE_MAX_BONDS: 3 (was: 4)
- BLE_STORE_MAX_CCCDS: 8 (was: 16)
The problem is that sys/config limits a value to <= 256 bytes. We should probably make this configurable, but even if we do, we don't have a good way to ensure these settings are in sync. The best we can do is raise an error with #if/#error.
618e9d7 to
858e595
Compare
This pull request adds a new package: ble/host/store/config. This package holds security material and CCCDs in RAM, and optionally saves them to sys/config. Because this package is a superset of store/ram, it deprecates that one.
This PR incorporates changes from other PRs:
Therefore, this PR should only be merged after those.