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

Expose function in DM to calculate BLE hash #17

Merged
merged 3 commits into from
Jan 11, 2016

Conversation

andresag01
Copy link

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

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
Copy link
Contributor

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.

Copy link
Author

Choose a reason for hiding this comment

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

*
* @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
Copy link
Contributor

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

@iriark01
Copy link

Yes

@LiyouZhou
Copy link
Contributor

@andresag01 Please act on the above comment.

@andresag01
Copy link
Author

@LiyouZhou Fixed typo.

@LiyouZhou
Copy link
Contributor

+1

pan- added a commit that referenced this pull request Jan 11, 2016
Expose function in DM to calculate BLE hash
@pan- pan- merged commit 60bfeb3 into ARMmbed:master Jan 11, 2016
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.

4 participants