Skip to content

[NRF52840]: SecurityManager::getAddressesFromBondTable #4178

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 1 commit into from
Jun 1, 2017

Conversation

nvlsianpu
Copy link
Contributor

Description

Implementation of SecurityManager::getAddressesFromBondTable (SD API <3, 5>)

Status

READY

@nvlsianpu
Copy link
Contributor Author

@pan-

@pan-
Copy link
Member

pan- commented Apr 12, 2017

@nvlsianpu If it needs #4132 , could you indicate it in the description ?

@nvlsianpu
Copy link
Contributor Author

@pan- It is completely independent form mentioned #4132 .

@nvlsianpu nvlsianpu changed the title [NRF5_SDK13]: SecurityManager::getAddressesFromBondTable [NRF52840]: SecurityManager::getAddressesFromBondTable Apr 13, 2017
@0xc0170
Copy link
Contributor

0xc0170 commented Apr 18, 2017

I restarted Travis, please have a look once it finishes.

As @pan- is not available these days, who could help reviewing this?

@nvlsianpu
Copy link
Contributor Author

@anangl Could you review the PR.

@theotherjimmy
Copy link
Contributor

@anangl Could you review? (bump)

*
* @return
* BLE_ERROR_NONE if successful.
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

And what if not successful?
BLE_ERROR_UNSPECIFIED could be mentioned here, or at least "error code indicating reason for failure", like it is for other functions.

if (addrList.capacity <= addrList.size) {
/* Ran out of space in the output Gap::Whitelist_t */
return BLE_ERROR_NONE;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

When there is no more space in the output list, there is no point in reading the bonding data. Hence, I'd move this checking to while condition, and change it to addrList.size < addrList.capacity (IMHO this would better express what is actually checked).

} else {
memcpy( &addrList.addresses[addrList.size].address,
&bond_data.peer_ble_id.id_addr_info.addr,
sizeof(addrList.addresses[0].address));
Copy link
Contributor

Choose a reason for hiding this comment

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

This indentation looks a bit strange.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

unwanted tabulation

*
* @return
* BLE_ERROR_NONE if successful.
*/
Copy link
Contributor

Choose a reason for hiding this comment

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

Again, it would be good to mention something about what is returned when an error occurs.

* Fill addresses list:
* Copy addresses from bond table, or
* for every private resolvable address in the bond table check if
* there is maching address in th provided whitelist and copy resolvable address.
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe I'm missing something, but I feel a bit confused with this comment. I can't see below any checking if there is a matching address. And what is the provided whitelist?

@theotherjimmy
Copy link
Contributor

could you address @anangl 's comments?

@theotherjimmy
Copy link
Contributor

retest uvisor

1 similar comment
@adbridge
Copy link
Contributor

adbridge commented May 8, 2017

retest uvisor

@0xc0170
Copy link
Contributor

0xc0170 commented May 9, 2017

java exception,

retest uvisor

@0xc0170
Copy link
Contributor

0xc0170 commented May 9, 2017

retest uvisor

@nvlsianpu nvlsianpu force-pushed the getAddrFromPeerTab_sd_api_5 branch from 30d7d8e to 39c1b3f Compare May 16, 2017 11:50
@nvlsianpu
Copy link
Contributor Author

nvlsianpu commented May 16, 2017

I rebased and redirected previous changes of NRF5_SDK13 port to NRF5 port because #4245 move nRF52840 support to common NRF5 sources and NRF5_SDK13 sources will be removed.
(Previous changes: nvlsianpu@d413677 + nvlsianpu@caa7e54 on https://github.com/nvlsianpu/mbed/commits/gettAddrFromPeerTab_sd_api_5_backup)

@pan-
Copy link
Member

pan- commented May 16, 2017

test ble

{ 
    "targets": ["NRF51_DK", "NRF52_DK"],
    "toolchains": ["GCC_ARM", "ARM"]
}

@adbridge
Copy link
Contributor

Not sure why this failed, I've restarted it

@nvlsianpu
Copy link
Contributor Author

Any update on this?

@adbridge
Copy link
Contributor

@pan- bump

@pan-
Copy link
Member

pan- commented May 30, 2017

test ble

{ 
    "targets": ["NRF52_DK"],
    "toolchains": ["GCC_ARM", "ARM"]
}

@theotherjimmy
Copy link
Contributor

@pan- it looks like the BLE tests are still failing. Any news? code freeze is tomorrow.

@pan-
Copy link
Member

pan- commented Jun 1, 2017

@theotherjimmy Some tests are not supported by the Nordic target and therefore will report a failure, looking at the tests results, this PR is good to go.

@0xc0170
Copy link
Contributor

0xc0170 commented Jun 1, 2017

Thanks for the update. As this touches BLE files only, I believe morph test is not needed, thus all CI done that is required for these changes, should be good to go.

@0xc0170 0xc0170 merged commit 3553a45 into ARMmbed:master Jun 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants