Skip to content

implement comprehensive LESC and Legacy pairing #466

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

Merged
merged 81 commits into from
Sep 11, 2020
Merged

implement comprehensive LESC and Legacy pairing #466

merged 81 commits into from
Sep 11, 2020

Conversation

hathach
Copy link
Member

@hathach hathach commented Mar 19, 2020

Fix #39 , fix #124

NOTE: Although the work is complete, DONT merge this yet. Due to the Arduino IDE 1.8.12 changes, that break the compilation of mixed code for precompiled library Adafruit_nRFCrypto. Which is needed for LESC pairing. We could merge it later when this is issued is resolved and new IDE version is released (and ci re-run passed)

Copied from changedlog
This version implement comprehensive LESC and Legacy pairing using dynamic & staic Passkey.

  • Support static passkey (Legacy only)
  • Support LESC on nRF52840 using hardware-accelerated ARM CryptoCell CC310 provided by Adafruit_nRFCypto, therefore nRFCrypto library must be installed
  • Rework bonding mechanism to use IRK for peer finding. It is advisable to run clearbonds example to clean up bond files of previous version

BLESecurity

A new class BLESecurity (access with Bluefruit.Security) is added to handle security and pairing.

  • setPIN() to set static passkey, this will force to use Legacy Pairing
  • setIOCaps() to congiure IO capacities
  • setMITM() to enable/disable Man in The Middle protection (passkey), it is auto-enabled when using passkey
  • setPairPasskeyCallback() to register callback for displaying pairing passkey to user
  • setPairCompleteCallback() to register callback for the result of pairing procedure (succeeded or failed)
  • setSecuredCallback() to register callback which invoked when connection is secured. This happens after he pairing procedure is complete, or we re-connect with preivously bonded peer device

For other changes, please check out the changelog for detailed.

@hathach
Copy link
Member Author

hathach commented Mar 19, 2020

e33fa24 revert temporary changes to use latest arduino-cli (which is bundled with Arduino IDE 1.8.12). This will cause ci failed due to above IDE issue. We should wait until it is out, then re-run this PR before merging.

@hathach hathach requested a review from ladyada March 19, 2020 17:06
@hathach hathach changed the title [WIP] implement comprehensive LESC and Legacy pairing implement comprehensive LESC and Legacy pairing Sep 11, 2020
@hathach
Copy link
Member Author

hathach commented Sep 11, 2020

This PR is updated/merged, functionality is tested. Everything seems OK, It should be consider to be ready for merging. Adafruit_nRFCypto is also included as submodule, this is handy since the library can be used by others but still being released together with BSP. This PR uses the mixed precompiled cc310 required Arduino IDE must be updated to 1.8.13

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.

support pairing using LESC procedure Pair with passkey
1 participant