-
Notifications
You must be signed in to change notification settings - Fork 409
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
base: master
Are you sure you want to change the base?
Conversation
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.
a792cc0
to
d26c105
Compare
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.
looks ok but lets wait for bot result
#AutoPTS run mynewt SM |
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-CSM/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 |
AutoPTS Bot results: Successful tests (60)SM SM/CEN/EKS/BI-01-C PASSSM 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; |
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.
btw why setting enc_cb=1 is needed?
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.
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....
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.