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::P192Present,
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: 0x01,
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    IUT -> Upper Tester: RemoteOobDataRequest {
84        bd_addr: context.peer_address(),
85    }
86    Upper Tester -> IUT: RemoteOobDataRequestReply {
87        bd_addr: context.peer_address(),
88        c: [0; 16],
89        r: [0; 16],
90    }
91    IUT -> Upper Tester: RemoteOobDataRequestReplyComplete {
92        num_hci_command_packets: 1,
93        status: ErrorCode::Success,
94        bd_addr: context.peer_address(),
95    }
96    Lower Tester -> IUT: SimplePairingNumber {
97        transaction_id: 0,
98        nonce: [0; 16],
99    }
100    IUT -> Lower Tester: Accepted {
101        transaction_id: 0,
102        accepted_opcode: Opcode::SimplePairingNumber,
103    }
104    IUT -> Lower Tester: SimplePairingNumber {
105        transaction_id: 0,
106        nonce: [0; 16],
107    }
108    Lower Tester -> IUT: Accepted {
109        transaction_id: 0,
110        accepted_opcode: Opcode::SimplePairingNumber,
111    }
112    // Authentication Stage 2
113    Lower Tester -> IUT: DhkeyCheck {
114        transaction_id: 0,
115        confirmation_value: [0; 16],
116    }
117    IUT -> Lower Tester: Accepted { transaction_id: 0, accepted_opcode: Opcode::DhkeyCheck }
118    IUT -> Lower Tester: DhkeyCheck {
119        transaction_id: 0,
120        confirmation_value: [0; 16],
121    }
122    Lower Tester -> IUT: Accepted { transaction_id: 0, accepted_opcode: Opcode::DhkeyCheck }
123    IUT -> Upper Tester: SimplePairingComplete {
124        status: ErrorCode::Success,
125        bd_addr: context.peer_address(),
126    }
127    // Link Key Calculation
128    Lower Tester -> IUT: AuRand {
129        transaction_id: 0,
130        random_number: [0; 16],
131    }
132    IUT -> Lower Tester: Sres {
133        transaction_id: 0,
134        authentication_rsp: [0; 4],
135    }
136    IUT -> Lower Tester: AuRand {
137        transaction_id: 0,
138        random_number: [0; 16],
139    }
140    Lower Tester -> IUT: Sres {
141        transaction_id: 0,
142        authentication_rsp: [0; 4],
143    }
144    IUT -> Upper Tester: LinkKeyNotification {
145        bd_addr: context.peer_address(),
146        key_type: KeyType::AuthenticatedP192,
147        link_key: [0; 16],
148    }
149}
150