1sequence! { procedure, context,
2    Upper Tester ->IUT: ReadLocalOobData {}
3    IUT -> Upper Tester: ReadLocalOobDataComplete {
4       status: ErrorCode::Success,
5        c: [0; 16],
6        r: [0; 16],
7    }
8    // ACL Connection Established
9    Lower Tester -> IUT: IoCapabilityReq {
10        transaction_id: 0,
11        io_capabilities: 0x01,
12        oob_authentication_data: 0x01,
13        authentication_requirement: 0x01,
14    }
15    IUT -> Upper Tester: IoCapabilityResponse {
16        bd_addr: context.peer_address(),
17        io_capability: IoCapability::DisplayYesNo,
18        oob_data_present: OobDataPresent::P192Present,
19        authentication_requirements: AuthenticationRequirements::NoBondingMitmProtection,
20    }
21    IUT -> Upper Tester: IoCapabilityRequest {
22        bd_addr: context.peer_address(),
23    }
24    Upper Tester -> IUT: IoCapabilityRequestReply {
25        bd_addr: context.peer_address(),
26        io_capability: IoCapability::DisplayYesNo,
27        oob_present: OobDataPresent::NotPresent,
28        authentication_requirements: AuthenticationRequirements::NoBondingMitmProtection,
29    }
30    IUT -> Upper Tester: IoCapabilityRequestReplyComplete {
31        num_hci_command_packets: 1,
32        status: ErrorCode::Success,
33        bd_addr: context.peer_address(),
34    }
35    IUT -> Lower Tester: IoCapabilityRes {
36        transaction_id: 0,
37        io_capabilities: 0x01,
38        oob_authentication_data: 0x00,
39        authentication_requirement: 0x01,
40    }
41    // Public Key Exchange
42    Lower Tester -> IUT: EncapsulatedHeader {
43        transaction_id: 0,
44        major_type: 1,
45        minor_type: 1,
46        payload_length: 48,
47    }
48    IUT -> Lower Tester: Accepted {
49        transaction_id: 0,
50        accepted_opcode: Opcode::EncapsulatedHeader,
51    }
52    repeat 3 times with (part in peer_p192_public_key()) {
53        Lower Tester -> IUT: EncapsulatedPayload {
54            transaction_id: 0,
55            data: part,
56        }
57        IUT -> Lower Tester: Accepted {
58            transaction_id: 0,
59            accepted_opcode: Opcode::EncapsulatedPayload,
60        }
61    }
62    IUT -> Lower Tester: EncapsulatedHeader {
63        transaction_id: 0,
64        major_type: 1,
65        minor_type: 1,
66        payload_length: 48,
67    }
68    Lower Tester -> IUT: Accepted {
69        transaction_id: 0,
70        accepted_opcode: Opcode::EncapsulatedHeader,
71    }
72    repeat 3 times with (part in local_p192_public_key(&context)) {
73        IUT -> Lower Tester: EncapsulatedPayload {
74            transaction_id: 0,
75            data: part,
76        }
77        Lower Tester -> IUT: Accepted {
78            transaction_id: 0,
79            accepted_opcode: Opcode::EncapsulatedPayload,
80        }
81    }
82    // Authentication Stage 1: OOB Protocol
83    Lower Tester -> IUT: SimplePairingNumber {
84        transaction_id: 0,
85        nonce: [0; 16],
86    }
87    IUT -> Lower Tester: Accepted {
88        transaction_id: 0,
89        accepted_opcode: Opcode::SimplePairingNumber,
90    }
91    IUT -> Lower Tester: SimplePairingNumber {
92        transaction_id: 0,
93        nonce: [0; 16],
94    }
95    Lower Tester -> IUT: Accepted {
96        transaction_id: 0,
97        accepted_opcode: Opcode::SimplePairingNumber,
98    }
99    // Authentication Stage 2
100    Lower Tester -> IUT: DhkeyCheck {
101        transaction_id: 0,
102        confirmation_value: [0; 16],
103    }
104    IUT -> Lower Tester: Accepted { transaction_id: 0, accepted_opcode: Opcode::DhkeyCheck }
105    IUT -> Lower Tester: DhkeyCheck {
106        transaction_id: 0,
107        confirmation_value: [0; 16],
108    }
109    Lower Tester -> IUT: Accepted { transaction_id: 0, accepted_opcode: Opcode::DhkeyCheck }
110    IUT -> Upper Tester: SimplePairingComplete {
111        status: ErrorCode::Success,
112        bd_addr: context.peer_address(),
113    }
114    // Link Key Calculation
115    Lower Tester -> IUT: AuRand {
116        transaction_id: 0,
117        random_number: [0; 16],
118    }
119    IUT -> Lower Tester: Sres {
120        transaction_id: 0,
121        authentication_rsp: [0; 4],
122    }
123    IUT -> Lower Tester: AuRand {
124        transaction_id: 0,
125        random_number: [0; 16],
126    }
127    Lower Tester -> IUT: Sres {
128        transaction_id: 0,
129        authentication_rsp: [0; 4],
130    }
131    IUT -> Upper Tester: LinkKeyNotification {
132        bd_addr: context.peer_address(),
133        key_type: KeyType::AuthenticatedP192,
134        link_key: [0; 16],
135    }
136}
137