Sample - IOT Session
The following is a sample Python code for calling QDC public APIs to start and connect interactive session.
- Available chipsets
IOT sessions have no chipset restrictions. To get the list of available targets, call this QDC public API.
- Artifacts limitation
Type | Artifacts Number | Suffix |
---|---|---|
test package | optional | .zip |
test script | N/A |
- Sample code is similar to Mobile Session except
Section (1)
part
# Section (1): preparing the parameters and submitting the sessionsession_device_target = "QCS6490" # device target chipsettest_package_file = r"interactive/iot/InteractiveIotTestPackageExample.zip" # optionalssh_public_key_id = 1001 # ssh key owned by the user, taking 1001 as an exampletest_package_response = qdc_api.upload_file(public_api_client, test_package_file, ArtifactType.TESTPACKAGE) # optionalsession_target_id = qdc_api.get_target_id(public_api_client, session_device_target)session_id = qdc_api.submit_session(public_api_client=public_api_client,target_id=session_target_id,session_name="Example session",timeout=600,session_artifacts=[test_package_response],ssh_public_key_id=ssh_public_key_id)
SSH Connection
- SSH connection can refer to SSH.