-
Notifications
You must be signed in to change notification settings - Fork 17
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
Expose function in DM to calculate BLE hash #17
Conversation
The hash function is needed to generate this a new Private Resolvable address. This functionality is required to generate a table with a list of addresses from the information in the bond table (See the getAddressesFromBondTable() API in BLE API SecurityManager). However, this function is not exposed by the nRF51 SDK to external code. This pull requests simply adds the function declaration to the relevant .h file to make external use possible.
@@ -229,6 +229,31 @@ ret_code_t im_wlist_create(pm_peer_id_t * p_peer_ids, | |||
*/ | |||
bool im_address_resolve(ble_gap_addr_t const * p_addr, ble_gap_irk_t const * p_irk); | |||
|
|||
/**@brief Function for calculating the ah() hash function described in Bluetooth core specification |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make a note here to say this is special modification needed in mbed. and write down the reason you need it. Make it prominent as well, enclose it in something like ==========. Next time when we make the port to a newer version (v11 is on the horizon) the porter will know to keep this modification in.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LiyouZhou I have just added the @note
as you requested. See https://github.com/ARMmbed/nrf51-sdk/pull/17/files#diff-999146604efce71bca279e64873ab799R255.
* | ||
* @note ====IMPORTANT==== | ||
* This is a special modification to the original nRF51 SDK required by the mbed BLE API | ||
* to being able to generate BLE private resolvable addresses. This function is used by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be "to be able to"? @iriark01
Yes |
@andresag01 Please act on the above comment. |
@LiyouZhou Fixed typo. |
+1 |
Expose function in DM to calculate BLE hash
The hash function is needed to generate this a new Private Resolvable address.
This functionality is required to generate a table with a list of addresses
from the information in the bond table (See the getAddressesFromBondTable() API
in BLE API SecurityManager). However, this function is not exposed by the
nRF51 SDK to external code. This pull requests simply adds the function
declaration to the relevant .h file to make external use possible.
Refer to https://github.com/ARMmbed/ble-nrf51822/pull/103/files#diff-e2ce540b25070fc6f3c585a68f7d8000R315 for and example usage in the ble-nrf51822 module.
@pan- @LiyouZhou