|
67 | 67 |
|
68 | 68 | # Values that identify the Linux tv-app and are noted in the 'Device Configuration' in the Linux tv-app output
|
69 | 69 | # as well as under the 'Discovered Commissioner' details in the Linux tv-casting-app output.
|
70 |
| -VENDOR_ID = 0xFFF1 # 0xFFF1 = 65521; Spec 7.20.2.1 MEI code: test vendor IDs are 0xFFF1 to 0xFFF4 |
71 |
| -PRODUCT_ID = 0x8001 # 0x8001 = 32769 = Test product id |
72 |
| -DEVICE_TYPE_CASTING_VIDEO_PLAYER = 0x23 # 0x23 = 35 = Device type library 10.3: Casting Video Player |
73 |
| - |
74 |
| -# 0x457 = 1111 = Target Content Application Vendor ID for the commissioner generated passcode flow |
75 |
| -COMMISSIONER_GENERATED_PASSCODE_VENDOR_ID = 0x457 |
76 |
| -COMMISSIONER_GENERATED_PASSCODE = '0x00BC_614E' # 0x00BC_614E = 12345678 = Default commissioner generated passcode |
| 70 | +VENDOR_ID = 0xFFF1 # Spec 7.20.2.1 MEI code: test vendor IDs are 0xFFF1 to 0xFFF4 |
| 71 | +PRODUCT_ID = 0x8001 # Test product id |
| 72 | +DEVICE_TYPE_CASTING_VIDEO_PLAYER = 0x23 # Device type library 10.3: Casting Video Player |
77 | 73 |
|
78 | 74 | # Value to verify the subscription state against in the Linux tv-casting-app output.
|
79 | 75 | ATTRIBUTE_CURRENT_PLAYBACK_STATE = 0x0000_0000 # Application Cluster Spec 6.10.6 Attribute ID: Current State of Playback
|
|
98 | 94 | Step(app=App.TV_CASTING_APP, output_msg=['Discovered CastingPlayer #0', f'Product ID: {PRODUCT_ID}', f'Vendor ID: {VENDOR_ID}',
|
99 | 95 | f'Device Type: {DEVICE_TYPE_CASTING_VIDEO_PLAYER}', 'Supports Commissioner Generated Passcode: true']),
|
100 | 96 |
|
101 |
| - # Send `cast request {valid_discovered_castingplayer_number}\n` command to the tv-casting-app subprocess. |
| 97 | + # Send `cast request {valid_discovered_commissioner_number}\n` command to the tv-casting-app subprocess. |
102 | 98 | Step(app=App.TV_CASTING_APP, input_cmd='cast request 0\n'),
|
103 | 99 |
|
104 | 100 | # Validate that the tv-casting-app begins the commissioning process.
|
|
116 | 112 | # Validate that we received the instructions on the tv-app output for sending the `controller ux ok` command.
|
117 | 113 | Step(app=App.TV_APP, output_msg=['Via Shell Enter: controller ux ok|cancel']),
|
118 | 114 |
|
119 |
| - # Send `controller ux ok\n` command to the tv-app subprocess. |
| 115 | + # Send `controller ux ok` command to the tv-app subprocess. |
120 | 116 | Step(app=App.TV_APP, input_cmd='controller ux ok\n'),
|
121 | 117 |
|
122 | 118 | # Validate that pairing succeeded between the tv-casting-app and the tv-app.
|
|
144 | 140 | # Signal to stop the tv-casting-app as we finished validation.
|
145 | 141 | Step(app=App.TV_CASTING_APP, input_cmd=STOP_APP),
|
146 | 142 |
|
147 |
| - # Signal to stop the tv-app as we finished validation. |
148 |
| - Step(app=App.TV_APP, input_cmd=STOP_APP) |
149 |
| - ] |
150 |
| - ), |
151 |
| - Sequence( |
152 |
| - name='commissioner_generated_passcode_test', |
153 |
| - steps=[ |
154 |
| - # Signal to start the tv-app. |
155 |
| - Step(app=App.TV_APP, input_cmd=START_APP), |
156 |
| - |
157 |
| - # Validate that the tv-app is up and running. |
158 |
| - Step(app=App.TV_APP, timeout_sec=APP_MAX_START_WAIT_SEC, output_msg=['Started commissioner']), |
159 |
| - |
160 |
| - # Signal to start the tv-casting-app. |
161 |
| - Step(app=App.TV_CASTING_APP, input_cmd=START_APP), |
162 |
| - |
163 |
| - # Validate that the server is properly initialized in the tv-casting-app output. |
164 |
| - Step(app=App.TV_CASTING_APP, timeout_sec=APP_MAX_START_WAIT_SEC, output_msg=['Server initialization complete']), |
165 |
| - |
166 |
| - # Validate that there is a valid discovered casting player with {PRODUCT_ID}, {VENDOR_ID}, {DEVICE_TYPE_CASTING_VIDEO_PLAYER}, and the |
167 |
| - # `Commissioner Generated Passcode` flag is set to true in the tv-casting-app output. |
168 |
| - Step(app=App.TV_CASTING_APP, output_msg=['Discovered CastingPlayer #0', f'Product ID: {PRODUCT_ID}', f'Vendor ID: {VENDOR_ID}', |
169 |
| - f'Device Type: {DEVICE_TYPE_CASTING_VIDEO_PLAYER}', 'Supports Commissioner Generated Passcode: true']), |
170 |
| - |
171 |
| - # Send `cast request {valid_discovered_castingplayer_number} commissioner-generated-passcode\n` command to the tv-casting-app subprocess. |
172 |
| - Step(app=App.TV_CASTING_APP, input_cmd='cast request 0 commissioner-generated-passcode\n'), |
173 |
| - |
174 |
| - # Validate that the tv-casting-app begins the commissioning process. |
175 |
| - Step(app=App.TV_CASTING_APP, output_msg=[ |
176 |
| - 'CastingPlayer::VerifyOrEstablishConnection() calling OpenBasicCommissioningWindow()']), |
177 |
| - |
178 |
| - # Validate that the `IdentificationDeclaration` message sent from the tv-casting-app to the tv-app will contain the following entries: |
179 |
| - # mCommissionerPasscode: true -> This flag instructs the commissioner to use the commissioner-generated-passcode flow for commissioning. |
180 |
| - # mCommissionerPasscodeReady: false -> This flag indicates that the commissionee has not obtained the commissioner passcode from the user and |
181 |
| - # thus is not ready for commissioning. |
182 |
| - # Vendor ID: {COMMISSIONER_GENERATED_PASSCODE_VENDOR_ID} -> The initial VENDOR_ID of the casting player will be overridden to {COMMISSIONER_GENERATED_PASSCODE_VENDOR_ID}. |
183 |
| - # Otherwise we will enter the commissionee-generated-passcode flow. |
184 |
| - Step(app=App.TV_CASTING_APP, output_msg=['IdentificationDeclarationOptions::LogDetail()', 'IdentificationDeclarationOptions::mCommissionerPasscode: true', |
185 |
| - 'IdentificationDeclarationOptions::mCommissionerPasscodeReady: false', 'IdentificationDeclarationOptions::TargetAppInfos list:', f'TargetAppInfo 1, Vendor ID: {COMMISSIONER_GENERATED_PASSCODE_VENDOR_ID}']), |
186 |
| - |
187 |
| - # Validate that we received the cast request from the tv-casting-app on the tv-app output. |
188 |
| - Step(app=App.TV_APP, |
189 |
| - output_msg=['------PROMPT USER: Test TV casting app is requesting permission to cast to this TV, approve?']), |
190 |
| - |
191 |
| - # Validate that we received the instructions on the tv-app output for sending the `controller ux ok` command. |
192 |
| - Step(app=App.TV_APP, output_msg=['Via Shell Enter: controller ux ok|cancel']), |
193 |
| - |
194 |
| - # Send `controller ux ok` command to the tv-app subprocess. |
195 |
| - Step(app=App.TV_APP, input_cmd='controller ux ok\n'), |
196 |
| - |
197 |
| - # Validate that the tv-app sent a message to the tv-casting-app indicating that the tv-app is now displaying the passcode to the user. |
198 |
| - Step(app=App.TV_APP, output_msg=['Commissioner Declaration Start', |
199 |
| - 'commissioner passcode: true', 'Commissioner Declaration End']), |
200 |
| - |
201 |
| - # Validate that we received the cast request with the casting passcode on the tv-app output. |
202 |
| - Step(app=App.TV_APP, output_msg=[ |
203 |
| - f'------PROMPT USER: Test TV casting app is requesting permission to cast to this TV. Casting passcode: [{COMMISSIONER_GENERATED_PASSCODE}].']), |
204 |
| - |
205 |
| - # Validate that the tv-casting-app received the message from the tv-app indicating that the tv-app is now displaying the passcode to the user. |
206 |
| - Step(app=App.TV_CASTING_APP, output_msg=['Commissioner Declaration Start', |
207 |
| - 'commissioner passcode: true', 'Commissioner Declaration End']), |
208 |
| - |
209 |
| - # Validate that the user is prompted to input passcode from the tv-app on the tv-casting-app output. |
210 |
| - Step(app=App.TV_CASTING_APP, output_msg=['Awaiting user input', 'Input the Commissioner-Generated passcode displayed on the CastingPlayer UX.', |
211 |
| - f'cast setcommissionerpasscode {int(COMMISSIONER_GENERATED_PASSCODE, 16)}', 'Awaiting user input']), |
212 |
| - |
213 |
| - # Send `cast setcommissionerpasscode {COMMISSIONER_GENERATED_PASSCODE}\n` to the tv-casting-app subprocess. |
214 |
| - Step(app=App.TV_CASTING_APP, input_cmd=f'cast setcommissionerpasscode {int(COMMISSIONER_GENERATED_PASSCODE, 16)}\n'), |
215 |
| - |
216 |
| - # Validate the commissioner passcode that the user entered on the tv-casting-app output. |
217 |
| - Step(app=App.TV_CASTING_APP, output_msg=[ |
218 |
| - f'CommandHandler() setcommissionerpasscode user entered passcode: {int(COMMISSIONER_GENERATED_PASSCODE, 16)}']), |
219 |
| - |
220 |
| - # Validate that the `IdentificationDeclaration` message sent from the tv-casting-app to the tv-app will contain the following entries: |
221 |
| - # mCommissionerPasscode: true -> This flag instructs the commissioner to use the commissioner-generated-passcode flow for commissioning. |
222 |
| - # mCommissionerPasscodeReady: true -> This flag indicates that the commissionee has obtained the commissioner passcode from the user and |
223 |
| - # thus is ready for commissioning. |
224 |
| - # Vendor ID: {COMMISSIONER_GENERATED_PASSCODE_VENDOR_ID} -> The initial VENDOR_ID of the casting player will be overridden to {COMMISSIONER_GENERATED_PASSCODE_VENDOR_ID}. |
225 |
| - # Otherwise we will enter the commissionee-generated-passcode flow. |
226 |
| - Step(app=App.TV_CASTING_APP, output_msg=['IdentificationDeclarationOptions::LogDetail()', 'IdentificationDeclarationOptions::mCommissionerPasscode: true', |
227 |
| - 'IdentificationDeclarationOptions::mCommissionerPasscodeReady: true', 'IdentificationDeclarationOptions::TargetAppInfos list:', f'TargetAppInfo 1, Vendor ID: {COMMISSIONER_GENERATED_PASSCODE_VENDOR_ID}']), |
228 |
| - |
229 |
| - # Validate that pairing succeeded between the tv-casting-app and the tv-app. |
230 |
| - Step(app=App.TV_APP, output_msg=['Secure Pairing Success']), |
231 |
| - |
232 |
| - # Validate that the connection succeeded in the tv-casting-app output. |
233 |
| - Step(app=App.TV_CASTING_APP, output_msg=['Successfully connected to CastingPlayer']), |
234 |
| - |
235 |
| - # Validate that commissioning succeeded in the tv-app output. |
236 |
| - Step(app=App.TV_APP, output_msg=['------PROMPT USER: commissioning success']), |
237 |
| - |
238 |
| - # Validate that we are able to subscribe to the media playback cluster by reading the CurrentState value and that it matches {ATTRIBUTE_CURRENT_PLAYBACK_STATE}. |
239 |
| - Step(app=App.TV_CASTING_APP, output_msg=[f'Read CurrentState value: {ATTRIBUTE_CURRENT_PLAYBACK_STATE}']), |
240 |
| - |
241 |
| - # Validate the LaunchURL in the tv-app output. |
242 |
| - Step(app=App.TV_APP, |
243 |
| - output_msg=['ContentLauncherManager::HandleLaunchUrl TEST CASE ContentURL=https://www.test.com/videoid DisplayString=Test video']), |
244 |
| - |
245 |
| - # Validate the LaunchURL in the tv-casting-app output. |
246 |
| - Step(app=App.TV_CASTING_APP, output_msg=['LaunchURL Success with response.data: exampleData']), |
247 |
| - |
248 |
| - # Signal to stop the tv-casting-app as we finished validation. |
249 |
| - Step(app=App.TV_CASTING_APP, input_cmd=STOP_APP), |
250 |
| - |
251 | 143 | # Signal to stop the tv-app as we finished validation.
|
252 | 144 | Step(app=App.TV_APP, input_cmd=STOP_APP)
|
253 | 145 | ]
|
|
0 commit comments