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

host: sm: secure connection only pairing might fail with no reason #1961

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

guy-m
Copy link
Contributor

@guy-m guy-m commented Jan 22, 2025

When BLE_SM_SC_ONLY is on during pairing request, the process might fail even though both SC is supported by the peer and the key size meet the requirements.

@github-actions github-actions bot added host size/S Small PR labels Jan 22, 2025
When BLE_SM_SC_ONLY is on during pairing request, the process might fail even though both SC is supported by the peer and the key size meet the requirements.
@guy-m guy-m force-pushed the guym/sm_sc_only_fix branch from a792cc0 to d26c105 Compare January 23, 2025 14:36
Copy link
Contributor

@sjanc sjanc left a comment

Choose a reason for hiding this comment

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

looks ok but lets wait for bot result

@sjanc
Copy link
Contributor

sjanc commented Jan 24, 2025

#AutoPTS run mynewt SM

@codecoup-tester
Copy link

Scheduled PR #1961 (comment), board: nrf52, estimated start time: 11:18:43, test case count: 60, estimated duration: 0:36:09

Test cases to be runSM/CEN/PROT/BV-01-C
SM/CEN/JW/BV-05-C
SM/CEN/JW/BI-04-C
SM/CEN/JW/BI-01-C
SM/CEN/PKE/BV-01-C
SM/CEN/PKE/BV-04-C
SM/CEN/PKE/BI-01-C
SM/CEN/PKE/BI-02-C
SM/CEN/OOB/BV-01-C
SM/CEN/OOB/BV-03-C
SM/CEN/OOB/BV-09-C
SM/CEN/OOB/BI-01-C
SM/CEN/EKS/BV-01-C
SM/CEN/EKS/BI-01-C
SM/CEN/KDU/BV-05-C
SM/CEN/KDU/BV-06-C
SM/CEN/KDU/BV-10-C
SM/CEN/PIS/BV-02-C
SM/CEN/PIS/BV-03-C
SM/CEN/SCJW/BV-01-C
SM/CEN/SCJW/BV-04-C
SM/CEN/SCJW/BI-01-C
SM/CEN/SCPK/BV-01-C
SM/CEN/SCPK/BV-04-C
SM/CEN/SCPK/BI-01-C
SM/CEN/SCPK/BI-02-C
SM/CEN/SCOB/BV-01-C
SM/CEN/SCOB/BV-04-C
SM/CEN/SCOB/BI-01-C
SM/CEN/SCOB/BI-04-C
SM/PER/PROT/BV-02-C
SM/PER/JW/BV-02-C
SM/PER/JW/BI-03-C
SM/PER/JW/BI-02-C
SM/PER/PKE/BV-02-C
SM/PER/PKE/BV-05-C
SM/PER/PKE/BI-03-C
SM/PER/OOB/BV-02-C
SM/PER/OOB/BV-04-C
SM/PER/OOB/BV-10-C
SM/PER/OOB/BI-02-C
SM/PER/EKS/BV-02-C
SM/PER/EKS/BI-02-C
SM/PER/KDU/BV-01-C
SM/PER/KDU/BV-02-C
SM/PER/KDU/BV-07-C
SM/PER/KDU/BV-08-C
SM/PER/PIS/BV-01-C
SM/PER/PIS/BV-02-C
SM/PER/SCJW/BV-02-C
SM/PER/SCJW/BV-03-C
SM/PER/SCJW/BI-02-C
SM/PER/SCPK/BV-02-C
SM/PER/SCPK/BV-03-C
SM/PER/SCPK/BI-03-C
SM/PER/SCPK/BI-04-C
SM/PER/SCOB/BV-02-C
SM/PER/SCOB/BV-03-C
SM/PER/SCOB/BI-02-C
SM/PER/SCOB/BI-03-C

@codecoup-tester
Copy link

AutoPTS Bot results:
No failed test found.

Successful tests (60)SM SM/CEN/EKS/BI-01-C PASS
SM SM/CEN/EKS/BV-01-C PASS
SM SM/CEN/JW/BI-01-C PASS
SM SM/CEN/JW/BI-04-C PASS
SM SM/CEN/JW/BV-05-C PASS
SM SM/CEN/KDU/BV-05-C PASS
SM SM/CEN/KDU/BV-06-C PASS
SM SM/CEN/KDU/BV-10-C PASS
SM SM/CEN/OOB/BI-01-C PASS
SM SM/CEN/OOB/BV-01-C PASS
SM SM/CEN/OOB/BV-03-C PASS
SM SM/CEN/OOB/BV-09-C PASS
SM SM/CEN/PIS/BV-02-C PASS
SM SM/CEN/PIS/BV-03-C PASS
SM SM/CEN/PKE/BI-01-C PASS
SM SM/CEN/PKE/BI-02-C PASS
SM SM/CEN/PKE/BV-01-C PASS
SM SM/CEN/PKE/BV-04-C PASS
SM SM/CEN/PROT/BV-01-C PASS
SM SM/CEN/SCJW/BI-01-C PASS
SM SM/CEN/SCJW/BV-01-C PASS
SM SM/CEN/SCJW/BV-04-C PASS
SM SM/CEN/SCOB/BI-01-C PASS
SM SM/CEN/SCOB/BI-04-C PASS
SM SM/CEN/SCOB/BV-01-C PASS
SM SM/CEN/SCOB/BV-04-C PASS
SM SM/CEN/SCPK/BI-01-C PASS
SM SM/CEN/SCPK/BI-02-C PASS
SM SM/CEN/SCPK/BV-01-C PASS
SM SM/CEN/SCPK/BV-04-C PASS
SM SM/PER/EKS/BI-02-C PASS
SM SM/PER/EKS/BV-02-C PASS
SM SM/PER/JW/BI-02-C PASS
SM SM/PER/JW/BI-03-C PASS
SM SM/PER/JW/BV-02-C PASS
SM SM/PER/KDU/BV-01-C PASS
SM SM/PER/KDU/BV-02-C PASS
SM SM/PER/KDU/BV-07-C PASS
SM SM/PER/KDU/BV-08-C PASS
SM SM/PER/OOB/BI-02-C PASS
SM SM/PER/OOB/BV-02-C PASS
SM SM/PER/OOB/BV-04-C PASS
SM SM/PER/OOB/BV-10-C PASS
SM SM/PER/PIS/BV-01-C PASS
SM SM/PER/PIS/BV-02-C PASS
SM SM/PER/PKE/BI-03-C PASS
SM SM/PER/PKE/BV-02-C PASS
SM SM/PER/PKE/BV-05-C PASS
SM SM/PER/PROT/BV-02-C PASS
SM SM/PER/SCJW/BI-02-C PASS
SM SM/PER/SCJW/BV-02-C PASS
SM SM/PER/SCJW/BV-03-C PASS
SM SM/PER/SCOB/BI-02-C PASS
SM SM/PER/SCOB/BI-03-C PASS
SM SM/PER/SCOB/BV-02-C PASS
SM SM/PER/SCOB/BV-03-C PASS
SM SM/PER/SCPK/BI-03-C PASS
SM SM/PER/SCPK/BI-04-C PASS
SM SM/PER/SCPK/BV-02-C PASS
SM SM/PER/SCPK/BV-03-C PASS

}
res->sm_err = BLE_SM_ERR_AUTHREQ;
res->app_status = BLE_HS_SM_US_ERR(BLE_SM_ERR_AUTHREQ);
res->enc_cb = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

btw why setting enc_cb=1 is needed?

Copy link
Contributor Author

@guy-m guy-m Jan 24, 2025

Choose a reason for hiding this comment

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

It is not mandatory. However, The addition of "res->enc_cb = 1;" triggers the BLE_GAP_EVENT_ENC_CHANGE with the corresponding error code. This allows the application / upper tester to be aware of the pairing failure and also to verify the IUT correct behavior without having over-the-air capture or PTS logs.
I also added it for the other error codes both for pair_rsp_rx and pair_req_rx in the other PR: #1957
If needed I can remove it from here and I can update the second PR with this addition after rebase so it won't be tight together....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants