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

add persistence demonstration to SM example #152

Merged
merged 11 commits into from Aug 23, 2018

Conversation

paul-szczepanek-arm
Copy link
Member

doesn't change the flow, and doesn't implement actual persistence but shows how

Copy link
Member

@pan- pan- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the cost of littlefs in term of flash and RAM consumed ?

SMDevicePeripheral peripheral(ble, queue, peer_address);
peripheral.run();
/* if filesystem creation fails or there is no filesystem the security manager
* will fallback to storing the security databse in memory */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo databse -> database

@@ -159,9 +162,19 @@ class SMDevice : private mbed::NonCopyable<SMDevice>,
return;
}

/* This path will be used to store bonding information but will fallback
* to storing in memory if file access fails (for example due to lack of a filesystem) */
const char* db_path = "/fs/bt_sec_db";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May we use a configuration parameter ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you mean for the path in the example or to toggle the feature as a whole in the mbed-os?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added to config

@paul-szczepanek-arm
Copy link
Member Author

paul-szczepanek-arm commented May 31, 2018

@pan- memory usage of fs:
ram 512 bytes
flash 16 616 bytes

@MarceloSalazar
Copy link
Contributor

Please note for OOB, we're working with mbed-os-5.9.0-oob branch.
If you think that branch should be updated to fix a critical issue, then retarget this PR. Thanks!

@AGlass0fMilk
Copy link
Member

What is the status of this PR?

@donatieng
Copy link
Contributor

donatieng commented Aug 8, 2018

Waiting for these to go in before merging: ARMmbed/mbed-os#7681 ARMmbed/mbed-os#7687 ARMmbed/mbed-os#7688

@donatieng donatieng merged commit 2043493 into ARMmbed:master Aug 23, 2018
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.

None yet

5 participants