pts/sm_test: suppprt numeric comparison failed. SCJW tests complete

This commit is contained in:
Matthias Ringwald 2018-03-31 22:06:04 +02:00
parent 97a8d07355
commit 8493626b86
3 changed files with 15 additions and 3 deletions

View File

@ -271,7 +271,9 @@ static void app_packet_handler (uint8_t packet_type, uint16_t channel, uint8_t *
break;
case SM_EVENT_JUST_WORKS_REQUEST:
printf("JUST_WORKS_REQUEST\n");
// sm_just_works_confirm(little_endian_read_16(packet, 2));
break;
case SM_EVENT_NUMERIC_COMPARISON_REQUEST:
printf("NUMERIC_COMPARISON_REQUEST\n");
break;
case SM_EVENT_PASSKEY_INPUT_NUMBER:
// display number

View File

@ -57,8 +57,10 @@ SM/MAS/SCJW/BI-01-C/02,0,0,8,8,0,0,8
SM/MAS/SCJW/BI-01-C/03,0,0,8,8,0,0,5
SM/MAS/SCJW/BI-01-C/04,0,0,8,8,0,0,9
# TODO: tester responds with pairing failure during phase 2
SM/MAS/SCJW/BI-01-C/05,0,0,8,8,0,0,12
SM/MAS/SCJW/BI-01-C/05,1,1,12,12,0,0,12
# IO Cababilities + MITM -> Numeric Comparison -> Numeric Comparison Failed
SM/MAS/SCJW/BI-01-C/05,1,1,12,12,0,0,12
# tester responds with pairing failure during phase 2
SM/SLA/SCJW/BI-02-C,0,3,8,8,0,0,4

1 name,iut_io_capabilities,tester_io_capabilities,iut_auth_req,tester_auth_req,iut_oob_data,tester_oob_data,tester_failure
57 # additional bits set in authreq SM/SLA/SCPK/BV-02-C/02,2,4,24,28,0,0,0
58 SM/SLA/SCPK/BV-03-C/01,0,2,8,76,0,0,0 # additional bits set in authreq
59 SM/SLA/SCPK/BV-03-C/02,0,2,8,140,0,0,0 SM/SLA/SCPK/BV-03-C/01,0,2,8,76,0,0,0
60 SM/SLA/SCPK/BV-03-C/03,0,2,8,204,0,0,0 SM/SLA/SCPK/BV-03-C/02,0,2,8,140,0,0,0
61 # same as SM/SLA/SCPK/BV-03-C, just with IUT in Initiator role SM/SLA/SCPK/BV-03-C/03,0,2,8,204,0,0,0
62 # same as SM/SLA/SCPK/BV-03-C, just with IUT in Initiator role
63 SM/MAS/SCPK/BV-03-C/01,0,2,8,76,0,0,0
64 SM/MAS/SCPK/BV-03-C/01,0,2,8,76,0,0,0 SM/MAS/SCPK/BV-03-C/02,0,2,8,140,0,0,0
65 SM/MAS/SCPK/BV-03-C/02,0,2,8,140,0,0,0 SM/MAS/SCPK/BV-03-C/03,0,2,8,204,0,0,0
66 SM/MAS/SCPK/BV-03-C/03,0,2,8,204,0,0,0 # tester responds with pairing failure in responder role

View File

@ -196,6 +196,14 @@ def run(test_descriptor, nodes):
else:
print('Accept bonding')
node.write('a')
elif line.startswith('NUMERIC_COMPARISON_REQUEST'):
print('%s numeric comparison requested' % node.get_name())
if node.get_name() == 'tester' and test_descriptor['tester_failure'] == '12':
print('Decline bonding')
node.write('d')
else:
print('Accept bonding')
node.write('a')
elif line.startswith('PASSKEY_DISPLAY_NUMBER'):
passkey = line.split(': ')[1]
print('%s passkey display %s' % (node.get_name(), passkey))