├── .gitignore ├── LICENSE ├── README.md ├── docs ├── application-management.md ├── apply-all-desired-properties.md ├── azure-dm-certification.md ├── building-the-dm-binaries.md ├── certificate-management.md ├── debugging.md ├── device-factory-reset.md ├── device-health-attestation.md ├── device-info.md ├── dha-architecture-detail1.png ├── dha-architecture-detail2.png ├── dha-architecture-detail3.png ├── dha-architecture-overview.png ├── dha-architecture.md ├── dha-deploy.md ├── dha-report-sample.png ├── diagnostic-logs-management.md ├── dm-application-anatomy.png ├── dm-architecture-all.png ├── dm-architecture-application-library.png ├── dm-client-architecture.md ├── dm-hello-world-coding.md ├── dm-hello-world-deploying.md ├── dm-hello-world-managing.md ├── dm-hello-world-overview.md ├── dm-validator.png ├── exposing-new-configuration.md ├── external-storage.md ├── library-reference.md ├── oem-device-setup.md ├── reboot-management.md ├── release-notes-2017-10.md ├── release-notes-2018-06.md ├── remote-wipe.md ├── report-all-device-properties.md ├── running-e2e-tests.md ├── samples.md ├── source-policy.md ├── status-reporting.md ├── time-management.md ├── wifi-management.md ├── windows-telemetry-management.md └── windows-update-management.md ├── external ├── WinSDKRS2 │ ├── arm │ │ └── mdmlocalmanagement.lib │ ├── x64 │ │ └── mdmlocalmanagement.lib │ └── x86 │ │ └── mdmlocalmanagement.lib └── limpet │ ├── dll │ ├── arm │ │ └── LimpetLib.dll │ ├── x64 │ │ ├── LimpetLib.dll │ │ └── LimpetLib.pdb │ └── x86 │ │ ├── LimpetLib.dll │ │ └── LimpetLib.pdb │ ├── inc │ ├── LimpetDefs.h │ └── LimpetLib.h │ └── lib │ ├── arm │ └── LimpetLib.lib │ ├── x64 │ └── LimpetLib.lib │ └── x86 │ └── LimpetLib.lib ├── nuget ├── IoTDMClientLib.nuspec ├── IoTDMClientLib.targets └── PackIoTDMClientLib.cmd ├── samples ├── DMController │ ├── App.xaml │ ├── App.xaml.cs │ ├── Assets │ │ ├── LockScreenLogo.scale-200.png │ │ ├── SplashScreen.scale-200.png │ │ ├── Square150x150Logo.scale-200.png │ │ ├── Square44x44Logo.scale-200.png │ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ │ ├── StoreLogo.backup.png │ │ ├── StoreLogo.png │ │ └── Wide310x150Logo.scale-200.png │ ├── DMController.csproj │ ├── DeviceTwinAndMethods.cs │ ├── MainPage.xaml │ ├── MainPage.xaml.cs │ ├── Package.appxmanifest │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── Default.rd.xml │ ├── README.md │ ├── Views │ │ ├── ApplicationsUserControl.xaml │ │ ├── ApplicationsUserControl.xaml.cs │ │ ├── CertificatesUserControl.xaml │ │ ├── CertificatesUserControl.xaml.cs │ │ ├── DHAUserControl.xaml │ │ ├── DHAUserControl.xaml.cs │ │ ├── DeviceInfoUserControl.xaml │ │ ├── DeviceInfoUserControl.xaml.cs │ │ ├── DiagnosticLogsUserControl.xaml │ │ ├── DiagnosticLogsUserControl.xaml.cs │ │ ├── FactoryResetUserControl.xaml │ │ ├── FactoryResetUserControl.xaml.cs │ │ ├── RebootUserControl.xaml │ │ ├── RebootUserControl.xaml.cs │ │ ├── TimeUserControl.xaml │ │ ├── TimeUserControl.xaml.cs │ │ ├── WifiUserControl.xaml │ │ ├── WifiUserControl.xaml.cs │ │ ├── WindowsTelemetryUserControl.xaml │ │ ├── WindowsTelemetryUserControl.xaml.cs │ │ ├── WindowsUpdateUserControl.xaml │ │ └── WindowsUpdateUserControl.xaml.cs │ └── imgs │ │ ├── deviceinfo-buttons.png │ │ ├── settings.png │ │ └── test-buttons.png ├── DMDashboard │ ├── App.config │ ├── App.xaml │ ├── App.xaml.cs │ ├── Appx │ │ ├── AppDesiredStateControl.xaml │ │ ├── AppDesiredStateControl.xaml.cs │ │ ├── AppReportedStateControl.xaml │ │ ├── AppReportedStateControl.xaml.cs │ │ ├── AppsDesiredStateControl.xaml │ │ ├── AppsDesiredStateControl.xaml.cs │ │ ├── AppsReportedStateControl.xaml │ │ └── AppsReportedStateControl.xaml.cs │ ├── AzureBlobSelector.xaml │ ├── AzureBlobSelector.xaml.cs │ ├── AzureStorageHelpers.cs │ ├── Certificates │ │ ├── CertificateDetails.xaml │ │ ├── CertificateDetails.xaml.cs │ │ ├── CertificateExportDetails.xaml │ │ ├── CertificateExportDetails.xaml.cs │ │ ├── CertificateHelpers.cs │ │ ├── CertificateSelector.xaml │ │ └── CertificateSelector.xaml.cs │ ├── Common │ │ ├── Converters.cs │ │ ├── DMComboBox.xaml │ │ ├── DMComboBox.xaml.cs │ │ ├── DMControl.cs │ │ ├── DMControlList.cs │ │ ├── DMSectionControl.cs │ │ ├── DMTextBlock.xaml │ │ ├── DMTextBlock.xaml.cs │ │ ├── DMTextBox.xaml │ │ └── DMTextBox.xaml.cs │ ├── DMDashboard.csproj │ ├── DeviceHealthAttestation │ │ ├── DeviceHealthAttestationDesiredStateControl.xaml │ │ ├── DeviceHealthAttestationDesiredStateControl.xaml.cs │ │ ├── DeviceHealthAttestationReportedStateControl.xaml │ │ └── DeviceHealthAttestationReportedStateControl.xaml.cs │ ├── DeviceInfo │ │ ├── DeviceInfoReportedStateControl.xaml │ │ └── DeviceInfoReportedStateControl.xaml.cs │ ├── DeviceTwinAndMethod.cs │ ├── DiagnosticLogs │ │ ├── CollectorDesiredStateControl.xaml │ │ ├── CollectorDesiredStateControl.xaml.cs │ │ ├── CollectorReportedStateControl.xaml │ │ ├── CollectorReportedStateControl.xaml.cs │ │ ├── CollectorsDesiredStateControl.xaml │ │ ├── CollectorsDesiredStateControl.xaml.cs │ │ ├── CollectorsReportedStateControl.xaml │ │ ├── CollectorsReportedStateControl.xaml.cs │ │ ├── ProviderDesiredStateControl.xaml │ │ ├── ProviderDesiredStateControl.xaml.cs │ │ ├── ProviderDesiredStateListControl.xaml │ │ ├── ProviderDesiredStateListControl.xaml.cs │ │ ├── ProviderReportedStateControl.xaml │ │ ├── ProviderReportedStateControl.xaml.cs │ │ ├── ProviderReportedStateListControl.xaml │ │ └── ProviderReportedStateListControl.xaml.cs │ ├── DmAppStoreUpdate │ │ ├── DmAppStoreUpdateReportedStateControl.xaml │ │ └── DmAppStoreUpdateReportedStateControl.xaml.cs │ ├── MainWindow.xaml │ ├── MainWindow.xaml.cs │ ├── Models.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ ├── Resources.Designer.cs │ │ ├── Resources.resx │ │ ├── Settings.Designer.cs │ │ └── Settings.settings │ ├── Reboot │ │ ├── RebootCmdReportedStateControl.xaml │ │ ├── RebootCmdReportedStateControl.xaml.cs │ │ ├── RebootInfoDesiredStateControl.xaml │ │ ├── RebootInfoDesiredStateControl.xaml.cs │ │ ├── RebootInfoReportedStateControl.xaml │ │ └── RebootInfoReportedStateControl.xaml.cs │ ├── StorageManagement │ │ ├── AzureStorageManager.xaml │ │ ├── AzureStorageManager.xaml.cs │ │ ├── DeviceDeleteFile.xaml │ │ ├── DeviceDeleteFile.xaml.cs │ │ ├── DeviceFileSelectionControl.xaml │ │ ├── DeviceFileSelectionControl.xaml.cs │ │ ├── DeviceUploadFile.xaml │ │ └── DeviceUploadFile.xaml.cs │ ├── Telemetry │ │ ├── WindowsTelemetryDesiredStateControl.xaml │ │ ├── WindowsTelemetryDesiredStateControl.xaml.cs │ │ ├── WindowsTelemetryReportedStateControl.xaml │ │ └── WindowsTelemetryReportedStateControl.xaml.cs │ ├── TimeSettings │ │ ├── TimeDesiredStateControl.xaml │ │ ├── TimeDesiredStateControl.xaml.cs │ │ ├── TimeReportedStateControl.xaml │ │ ├── TimeReportedStateControl.xaml.cs │ │ ├── TimeSvcDesiredStateControl.xaml │ │ ├── TimeSvcDesiredStateControl.xaml.cs │ │ ├── TimeSvcReportedStateControl.xaml │ │ └── TimeSvcReportedStateControl.xaml.cs │ ├── Utils.cs │ ├── WPFUtils.cs │ ├── Wifi │ │ ├── WifiDesiredStateControl.xaml │ │ ├── WifiDesiredStateControl.xaml.cs │ │ ├── WifiDetails.xaml │ │ ├── WifiDetails.xaml.cs │ │ ├── WifiProfileConfiguration.cs │ │ ├── WifiProfilesDesiredStateControl.xaml │ │ ├── WifiProfilesDesiredStateControl.xaml.cs │ │ ├── WifiProfilesReportedStateControl.xaml │ │ ├── WifiProfilesReportedStateControl.xaml.cs │ │ ├── WifiReportedStateControl.xaml │ │ └── WifiReportedStateControl.xaml.cs │ ├── WindowsUpdatePolicy │ │ ├── WindowsUpdatePolicyDesiredStateControl.xaml │ │ ├── WindowsUpdatePolicyDesiredStateControl.xaml.cs │ │ ├── WindowsUpdatePolicyReportedStateControl.xaml │ │ └── WindowsUpdatePolicyReportedStateControl.xaml.cs │ └── packages.config ├── IoTDMBackground │ ├── Assets │ │ ├── LockScreenLogo.scale-200.png │ │ ├── SplashScreen.scale-200.png │ │ ├── Square150x150Logo.scale-200.png │ │ ├── Square44x44Logo.scale-200.png │ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ │ ├── StoreLogo.png │ │ └── Wide310x150Logo.scale-200.png │ ├── DMClientBackgroundApplication.cs │ ├── IoTDMBackground.csproj │ ├── IoTDMBackground_TemporaryKey.pfx │ ├── Package.appxmanifest │ └── Properties │ │ ├── AssemblyInfo.cs │ │ └── Default.rd.xml ├── IotDeviceManagementCapability.SCCD └── ToasterApp │ ├── App.xaml │ ├── App.xaml.cs │ ├── Assets │ ├── LockScreenLogo.scale-200.png │ ├── SplashScreen.scale-200.png │ ├── Square150x150Logo.scale-200.png │ ├── Square44x44Logo.scale-200.png │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ ├── StoreLogo.png │ ├── Wide310x150Logo.scale-200.png │ ├── gear.png │ ├── hot.png │ └── toaster.png │ ├── MainPage.xaml │ ├── MainPage.xaml.cs │ ├── Package.appxmanifest │ ├── Properties │ ├── AssemblyInfo.cs │ └── Default.rd.xml │ ├── Toaster.csproj │ ├── ToasterDeviceManagementRequestHandler.cs │ ├── UserDialog.xaml │ └── UserDialog.xaml.cs ├── src ├── DHA │ ├── DHA-test │ │ ├── AppSettings.cs │ │ ├── DHA-test.csproj │ │ ├── DeviceHealthAttestationServerTest.cs │ │ ├── Extension.cs │ │ ├── NonceTable.cs │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── ReportTable.cs │ │ ├── app.config │ │ └── packages.config │ ├── DHA.sln │ ├── DHA │ │ ├── DHA.funproj │ │ ├── DHAServiceBusQueueHandler │ │ │ ├── HealthInspector.csx │ │ │ ├── NonceRequestHandler.csx │ │ │ ├── NonceTable.csx │ │ │ ├── ReportRequestHandler.csx │ │ │ ├── Utilities.csx │ │ │ ├── function.json │ │ │ ├── project.json │ │ │ └── run.csx │ │ ├── Project_Readme.html │ │ ├── appsettings.json │ │ └── host.json │ └── Deployment Scripts │ │ ├── AzureFunctionDeploy.json │ │ ├── AzureServiceBusDeploy.json │ │ ├── AzureServiceBusQueueDeploy.json │ │ ├── AzureStorageDeploy.json │ │ └── DHA-setup.ps1 ├── DMDataContract │ └── DMDataContract │ │ ├── AppxLifeCycle.cs │ │ ├── AppxManagement.cs │ │ ├── Certificates.cs │ │ ├── ClearReportedProperties.cs │ │ ├── Common.cs │ │ ├── DMDataContract.csproj │ │ ├── DMJSonConstants.cs │ │ ├── DeviceHealthAttestation.cs │ │ ├── DeviceInfo.cs │ │ ├── DmAppStoreUpdate.cs │ │ ├── ErrorCodes.cs │ │ ├── EventTracing.cs │ │ ├── ExternalStorage.cs │ │ ├── FactoryReset.cs │ │ ├── Policy.cs │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── RebootCmd.cs │ │ ├── RebootInfo.cs │ │ ├── RemoteWipe.cs │ │ ├── TimeService.cs │ │ ├── TimeSettings.cs │ │ ├── UsoClientCmd.cs │ │ ├── Utils.cs │ │ ├── WindowsTelemetry.cs │ │ ├── WindowsUpdatePolicy.cs │ │ ├── WindowsUpdates.cs │ │ └── packages.config ├── DMMessage │ ├── Blob.cpp │ ├── Blob.h │ ├── CurrentVersion.h │ ├── DMGarbageCollectorTempFolder.h │ ├── DMMessage.cpp │ ├── DMMessage.vcxproj │ ├── DMMessage.vcxproj.filters │ ├── DMMessageException.h │ ├── DMMessageHelper.cpp │ ├── DMMessageKind.h │ ├── DMMessageSerialization.h │ ├── IRequestIResponse.h │ ├── Models │ │ ├── AllModels.h │ │ ├── AppInstall.h │ │ ├── AppLifecycle.h │ │ ├── AppUninstall.h │ │ ├── CertificateConfiguration.h │ │ ├── CertificateDetails.h │ │ ├── CheckForUpdates.h │ │ ├── DeviceDMStorage.h │ │ ├── DeviceHealthAttestation.h │ │ ├── DeviceInfo.h │ │ ├── ErrorResponse.h │ │ ├── EventTracingConfiguration.h │ │ ├── ExitDM.h │ │ ├── FactoryReset.h │ │ ├── FileTransfer.h │ │ ├── ListApps.h │ │ ├── ModelHelper.h │ │ ├── ModelsInfo.dat │ │ ├── Policy.h │ │ ├── Reboot.h │ │ ├── RemoteWipe.h │ │ ├── StartupApp.h │ │ ├── StatusCodeResponse.h │ │ ├── StringListResponse.h │ │ ├── StringResponse.h │ │ ├── TimeInfo.h │ │ ├── TimeService.h │ │ ├── TpmRequests.h │ │ ├── UsoClientCmd.h │ │ ├── WifiConfiguration.h │ │ ├── WifiDetails.h │ │ ├── WindowsTelemetry.h │ │ ├── WindowsUpdatePolicy.h │ │ ├── WindowsUpdateRebootPolicy.h │ │ └── WindowsUpdates.h │ ├── ResponseStatus.h │ ├── SerializationHelper.cpp │ ├── SerializationHelper.h │ ├── stdafx.cpp │ └── stdafx.h ├── DMShared │ ├── DMShared.vcxitems │ ├── DMShared.vcxitems.filters │ └── ErrorCodes.h ├── DMTpm │ ├── DMTpm.vcxitems │ ├── TpmSupport.cpp │ └── TpmSupport.h ├── IoTDM.sln ├── IoTDMClientLib │ ├── AzureBlobFileTransfer.cs │ ├── AzureIoTHubDeviceTwinProxy.cs │ ├── CertificateManagement.cs │ ├── DeviceManagement.cs │ ├── DeviceManagementClient.cs │ ├── DirectMethodGuard.cs │ ├── Handlers │ │ ├── AppxLifeCycleHandler.cs │ │ ├── AppxManagement.cs │ │ ├── CertificateHandler.cs │ │ ├── ClearReportedPropertiesHandler.cs │ │ ├── DeviceHealthAttestationHandler.cs │ │ ├── DeviceInfoHandler.cs │ │ ├── DmAppStoreUpdate.cs │ │ ├── EventTracingHandler.cs │ │ ├── ExternalStorageHandler.cs │ │ ├── FactoryResetHandler.cs │ │ ├── RebootCmdHandler.cs │ │ ├── RebootInfoHandler.cs │ │ ├── RemoteWipeHandler.cs │ │ ├── StorageHandler.cs │ │ ├── TimeServiceHandler.cs │ │ ├── TimeSettingsHandler.cs │ │ ├── UsoClientCmdHandler.cs │ │ ├── WifiHandler.cs │ │ ├── WindowsTelemetryHandler.cs │ │ ├── WindowsUpdatePolicyHandler.cs │ │ └── WindowsUpdatesHandler.cs │ ├── Interfaces │ │ ├── IDeviceManagementClientHandler.cs │ │ ├── IDeviceManagementRequestHandler.cs │ │ ├── IDeviceTwin.cs │ │ └── ISystemConfiguratorProxy.cs │ ├── IoTDMClientLib.csproj │ ├── OnPremDeviceTwinProxy.cs │ ├── Properties │ │ ├── AssemblyInfo.cs │ │ └── IoTDMClient.rd.xml │ ├── SystemConfiguratorProxy.cs │ ├── TpmDevice.cs │ ├── Utils.cs │ └── include │ │ └── dm_request.h ├── SharedUtilities │ ├── AutoCloseBase.h │ ├── AutoCloseHandle.h │ ├── Constants.h │ ├── DMException.cpp │ ├── DMException.h │ ├── DMRequest.h │ ├── ETWLogger.cpp │ ├── ETWLogger.h │ ├── Impersonator.cpp │ ├── Impersonator.h │ ├── JsonHelpers.cpp │ ├── JsonHelpers.h │ ├── Logger.cpp │ ├── Logger.h │ ├── Permissions │ │ ├── PermissionsManager.cpp │ │ ├── PermissionsManager.h │ │ ├── PermissionsSnapshot.cpp │ │ ├── PermissionsSnapshot.h │ │ ├── PermissionsTracer.cpp │ │ └── PermissionsTracer.h │ ├── PolicyHelper.cpp │ ├── PolicyHelper.h │ ├── SecurityAttributes.cpp │ ├── SecurityAttributes.h │ ├── SharedUtilities.vcxitems │ ├── SharedUtilities.vcxitems.filters │ ├── StringUtils.cpp │ ├── StringUtils.h │ ├── TimeHelpers.cpp │ ├── TimeHelpers.h │ ├── Utils.cpp │ └── Utils.h ├── SystemConfigurator │ ├── AppCfg.cpp │ ├── AppCfg.h │ ├── AppInfo.h │ ├── CSPs │ │ ├── CertificateInfo.cpp │ │ ├── CertificateInfo.h │ │ ├── CertificateManagement.cpp │ │ ├── CertificateManagement.h │ │ ├── CertificateStoreCSP.cpp │ │ ├── CertificateStoreCSP.h │ │ ├── ClientCertificateInstallCSP.cpp │ │ ├── ClientCertificateInstallCSP.h │ │ ├── CustomDeviceUiCsp.cpp │ │ ├── CustomDeviceUiCsp.h │ │ ├── DeviceHealthAttestationCSP.cpp │ │ ├── DeviceHealthAttestationCSP.h │ │ ├── DiagnosticLogCSP.cpp │ │ ├── DiagnosticLogCSP.h │ │ ├── EnterpriseModernAppManagementCSP.cpp │ │ ├── EnterpriseModernAppManagementCSP.h │ │ ├── MdmProvision.cpp │ │ ├── MdmProvision.h │ │ ├── PrivateAPIs │ │ │ └── WinSDKRS2.h │ │ ├── RebootCSP.cpp │ │ ├── RebootCSP.h │ │ ├── WifiCSP.cpp │ │ ├── WifiCSP.h │ │ ├── WindowsUpdatePolicy.cpp │ │ └── WindowsUpdatePolicyCSP.h │ ├── CommandProcessor.cpp │ ├── CommandProcessor.h │ ├── DMService.cpp │ ├── DMService.h │ ├── DMStorage.cpp │ ├── DMStorage.h │ ├── Resource.rc │ ├── ServiceManager.cpp │ ├── ServiceManager.h │ ├── SystemConfigurator.cpp │ ├── SystemConfigurator.vcxproj │ ├── SystemConfigurator.vcxproj.filters │ ├── SystemConfiguratorProxyServer │ │ ├── SystemConfiguratorProxy.cpp │ │ └── SystemConfiguratorProxy.h │ ├── TaskQueue.cpp │ ├── TaskQueue.h │ ├── TimeCfg.cpp │ ├── TimeCfg.h │ ├── TimeService.cpp │ ├── TimeService.h │ ├── WindowsTelemetry.cpp │ ├── WindowsTelemetry.h │ ├── resource.h │ ├── stdafx.cpp │ ├── stdafx.h │ └── targetver.h └── SystemConfiguratorProxy │ ├── Client │ ├── SCProxyClient.cpp │ ├── SCProxyClient.h │ ├── ServiceConfiguratorProxyClientLib.vcxproj │ ├── ServiceConfiguratorProxyClientLib.vcxproj.filters │ ├── ServiceConfiguratorProxyInterface.c │ ├── SystemConfiguratorProxyInterface.c │ ├── pch.cpp │ └── pch.h │ └── Interface │ ├── SystemConfiguratorProxy.Idl │ ├── SystemConfiguratorProxyInterface.vcxproj │ └── SystemConfiguratorProxyInterface.vcxproj.filters └── tests ├── CSPTests ├── CSPTests.cpp ├── CSPTests.vcxproj ├── CSPTests.vcxproj.filters ├── CertificateManagementTest.cpp ├── CertificateManagementTest.h ├── DeviceHealthAttestationTest.cpp ├── DeviceHealthAttestationTest.h ├── ReadMe.txt ├── TestUtils.cpp ├── TestUtils.h ├── WifiManagementTest.cpp ├── WifiManagementTest.h ├── stdafx.cpp ├── stdafx.h └── targetver.h ├── DMValidator ├── App.config ├── App.xaml ├── App.xaml.cs ├── DMValidator.csproj ├── DeviceConnectionString.cs ├── IoTHubManager.cs ├── Logger.cs ├── MainWindow.xaml ├── MainWindow.xaml.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── TestCases │ ├── RebootCmd │ │ └── RebootCmd.00.json │ ├── RebootInfo │ │ └── RebootInfo.00.json │ └── WindowsUpdatePolicy │ │ └── WindowsUpdatePolicy.00.json ├── TestInfrastructure │ ├── DeviceTwinTestCase.cs │ ├── DirectMethodTestCase.cs │ ├── JsonHelpers.cs │ ├── TestCase.cs │ ├── TestCaseHelpers.cs │ ├── TestConstants.cs │ ├── TestParameters.cs │ └── TestScenario.cs └── packages.config ├── E2ETestApp ├── App.xaml ├── App.xaml.cs ├── Assets │ ├── LockScreenLogo.scale-200.png │ ├── SplashScreen.scale-200.png │ ├── Square150x150Logo.scale-200.png │ ├── Square44x44Logo.scale-200.png │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ ├── StoreLogo.png │ └── Wide310x150Logo.scale-200.png ├── Constants.cs ├── E2ETestApp.csproj ├── JsonHelpers.cs ├── MainPage.xaml ├── MainPage.xaml.cs ├── MockObjects │ ├── MockDeviceClient.cs │ ├── MockDeviceClientApp.cs │ ├── MockIoTHubDeviceTwinProxy.cs │ ├── MockRegistryManager.cs │ ├── MockTwin.cs │ └── MockTwinCollection.cs ├── Package.appxmanifest ├── Properties │ ├── AssemblyInfo.cs │ └── Default.rd.xml ├── TestCaseHandlers │ ├── DeviceTwinTestCase.cs │ ├── DirectMethodTestCase.cs │ ├── SetWindowsUpdateRingAsyncTestCase.cs │ ├── TestCase.cs │ └── TestScenario.cs ├── TestCases │ ├── Apps │ │ ├── Apps.00.arm.json │ │ ├── Apps.00.x86.RS4.Core.json │ │ ├── Apps.00.x86.RS4.Enterprise.json │ │ ├── Apps.00.x86.json │ │ ├── Apps.01.list.RS4.Core.json │ │ └── Apps.01.list.json │ ├── Certificates │ │ └── Certificates.00.json │ ├── DeviceInfo │ │ ├── DeviceInfo.MBM.00.json │ │ └── DeviceInfo.RPI2.00.json │ ├── Diagnostic Logs │ │ └── DiagnosticLogs.00.json │ ├── RebootCmd │ │ └── RebootCmd.00.json │ ├── RebootInfo │ │ └── RebootInfo.00.json │ ├── TimeInfo │ │ └── TimeInfo.00.json │ ├── TimeService │ │ └── TimeService.00.json │ ├── WiFi │ │ └── WiFi.00.json │ ├── WindowsTelemetry │ │ └── WindowsTelemetry.00.json │ ├── WindowsUpdatePolicy │ │ ├── WindowsUpdatePolicy.IoTCoreOnly.Ring.00.json │ │ └── WindowsUpdatePolicy.NoRing.00.json │ └── WindowsUpdates │ │ └── WindowsUpdates.00.json ├── TestInfrastructure │ ├── TestCaseEnumerator.cs │ ├── TestCaseHelpers.cs │ ├── TestNode.cs │ └── TestParameters.cs └── XamlConverters.cs ├── IoTDMClientLibTests ├── Assets │ ├── LockScreenLogo.scale-200.png │ ├── SplashScreen.scale-200.png │ ├── Square150x150Logo.scale-200.png │ ├── Square44x44Logo.scale-200.png │ ├── Square44x44Logo.targetsize-24_altform-unplated.png │ ├── StoreLogo.png │ └── Wide310x150Logo.scale-200.png ├── DMMessageTests.cs ├── DeviceHealthAttestationTest.cs ├── DeviceManagementClientTests.cs ├── IoTDMClientLibTests.csproj ├── IoTDMClientLibTests_TemporaryKey.pfx ├── Package.appxmanifest ├── Properties │ ├── AssemblyInfo.cs │ └── UnitTestApp.rd.xml ├── UnitTestApp.xaml └── UnitTestApp.xaml.cs └── IoTHubManager ├── App.config ├── IoTHubManager.csproj ├── Program.cs ├── Properties └── AssemblyInfo.cs └── packages.config /LICENSE: -------------------------------------------------------------------------------- 1 | Windows IoT Azure DM client library 2 | 3 | MIT License 4 | 5 | Copyright (c) 2017 6 | 7 | Permission is hereby granted, free of charge, to any person obtaining a copy 8 | of this software and associated documentation files (the "Software"), to deal 9 | in the Software without restriction, including without limitation the rights 10 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11 | copies of the Software, and to permit persons to whom the Software is 12 | furnished to do so, subject to the following conditions: 13 | 14 | The above copyright notice and this permission notice shall be included in all 15 | copies or substantial portions of the Software. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 23 | SOFTWARE. 24 | -------------------------------------------------------------------------------- /docs/apply-all-desired-properties.md: -------------------------------------------------------------------------------- 1 | ## Apply All Desired Properties 2 | 3 | The **Apply All Desired Propeties** operation is initiated by the following .NET APIs. 4 | 5 | 6 |
 7 |     Namespace:
 8 |     Microsoft.Devices.Management
 9 | 
10 | 11 |
12 |     Class:
13 |     DeviceManagementClient
14 | 
15 | 16 |
17 |     Methods:
18 |     public async Task ApplyDesiredStateAsync()
19 |     public void ApplyDesiredStateAsync(TwinCollection desiredProperties)
20 | 
21 | 22 | **public async Task ApplyDesiredStateAsync()** 23 | 24 | This tells the DM Client to get the full list of desired properties and apply them to the device. This is specially useful on application start-up since there are no guarantees about the current state of the device. Later, however, the device twin will send change notification for only the properties that have changed. In those cases, the application should call `ApplyDesiredStateAsync(TwinCollection desiredProperties)` instead - which applys only the delta specified. 25 | 26 | **public void ApplyDesiredStateAsync(TwinCollection desiredProperties)** 27 | 28 | This tells the DM Client to apply the specified desired state to the device. This should be used whenever the device twin sends a notification of a desired property change. 29 | 30 | **Example** 31 | 32 |
33 |     async Task OnApplicationStartup()
34 |     {
35 |         await ApplyDesiredStateAsync();
36 |     }
37 | 
38 |     void OnDesiredPropertiesChanged(TwinCollection desiredProperties)
39 |     {
40 |         await ApplyDesiredStateAsync(desiredProperties);
41 |     }
42 | 
43 | 44 | ---- 45 | 46 | [Home Page](../README.md) | [Library Reference](library-reference.md) -------------------------------------------------------------------------------- /docs/azure-dm-certification.md: -------------------------------------------------------------------------------- 1 | # Azure Device Management Certification 2 | 3 | The Azure Device Management Certification process defines a minimum set of features the device management client has to comply with in order to be certified. 4 | 5 | In order to verify those features, follow these steps: 6 | 7 | 1. Create an IoT Hub and a new device in that hub. 8 | 9 | 2. Build a device such that the Azure device management client is up and running and is connected to the IoT Hub with the identity of the device you have created. 10 | - You may choose to build your own client or use the client implemented in this repro as-is or modified (see more information [here](oem-device-setup.md)). 11 | 12 | 3. On a desktop machine, run the verification application (DMValidator) by pointing it to the IoT Hub and the device you have created in step 1. 13 | - The verification application can be downloaded from [here](https://github.com/ms-iot/iot-core-azure-dm-client/tree/master/tests/DMValidator). 14 | - Select all the test scenarios and then click 'Run Test Cases'. 15 | 16 | 4. Collect and compress the logs DMValidator generates after running the test scenarios. 17 | 18 | 5. Send the compressed logs to Microsoft Azure device management certification team. 19 | 20 | ---- 21 | 22 | [Home Page](../README.md) -------------------------------------------------------------------------------- /docs/building-the-dm-binaries.md: -------------------------------------------------------------------------------- 1 | # Building The Device Management Binaries 2 | 3 | The following binaries constitute the Device Management solution: 4 | 5 | - A UWP-compatible library to be included in the host UWP app (IoTDMClientLib). 6 | - SystemConfigurator.exe 7 | 8 | Below are the steps to build these components and have them ready for inclusion in your UWP application, and integrated into your device image. 9 | 10 | ### Enlist 11 | 12 | - Create a new folder, let's say `c:\iot-core-azure-dm-client`. and make it the current folder. 13 | - Run `git clone --recursive --branch master https://github.com/ms-iot/iot-core-azure-dm-client` 14 | 15 | ### Build The Binaries 16 | 17 | - Open `src\IoTDM.sln` in Visual Studio. 18 | - Set the configuration to *Release*. 19 | - Build the solution for each of the three architectures (ARM, x64, and x86). 20 | 21 | ### Build The Nuget Package 22 | 23 | - Open a Visual Studio command prompt and 24 | - Make sure `nuget.exe` is on the path. 25 | - `cd c:\iot-core-azure-dm-client\nuget` 26 | - Run `PackIoTDMClientLib.cmd 1.4.4 Release` 27 | - `1.4.4` is the next available version so that your application can pick it up. If your app has never consumed IoTDMClientLib, this can be set to 1.0.0. 28 | - `Release` is the flavor to be packaged. If you intend to debug the IoTDMClientLib code, it is recommended to create the package with `Debug` instead of `Release` in the command above. 29 | 30 | This will create `c:\iot-core-azure-dm-client\nuget\IoTDMClientLib.1.4.4.nupkg`. 31 | 32 | **Next Step**: 33 | 34 | - See the [DM Hello World! Application](dm-hello-world-overview.md). 35 | 36 | ---- 37 | 38 | [Home Page](../README.md) -------------------------------------------------------------------------------- /docs/debugging.md: -------------------------------------------------------------------------------- 1 | # Debugging Azure Device Management Client 2 | 3 | All the **Windows IoT Azure DM Client** components have been instrumented to log its progress using ETW. The provider guid is `D198EE7D-C5F1-4F5F-95BE-A2EE6FA45897`. 4 | 5 | The user can turn on event collection using either: 6 | 7 | - [Diagnostic Logs Management](diagnostic-logs-management.md) 8 | - xperf/tracerpt 9 | 10 | ## xperf/tracerpt 11 | 12 | Here are the steps you need to obtain detailed logs for a certain period of time: 13 | 14 | - Open an admin console to the device and start capturing logs using: 15 | 16 |
17 |     xperf.exe -start MySession -f c:\Data\Users\DefaultAccount\AppData\Local\Temp\dm.etl -on D198EE7D-C5F1-4F5F-95BE-A2EE6FA45897
18 |     
19 | 20 | - Run your scenarios (i.e. set the desired property in question, etc). 21 | - When done, stop capturing logs using: 22 | 23 |
24 |     xperf.exe -stop MySession
25 |     
26 | 27 | - To view the logs, copy the generated `c:\temp\dm.etl` to your desktop machine. 28 | - View the etl log using Windows Performance Analyzer (WPA). 29 | - If it is not installed, use `tracerpt.exe` to general an xml representation of the etl file. The xml file can then be opened as usual. 30 | 31 |
32 |       tracerpt.exe c:\temp\dm.etl
33 |       
34 | 35 | ## 36 | 37 | ---- 38 | 39 | [Home Page](../README.md) | [Library Reference](library-reference.md) -------------------------------------------------------------------------------- /docs/dha-architecture-detail1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/docs/dha-architecture-detail1.png -------------------------------------------------------------------------------- /docs/dha-architecture-detail2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/docs/dha-architecture-detail2.png -------------------------------------------------------------------------------- /docs/dha-architecture-detail3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/docs/dha-architecture-detail3.png -------------------------------------------------------------------------------- /docs/dha-architecture-overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/docs/dha-architecture-overview.png -------------------------------------------------------------------------------- /docs/dha-report-sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/docs/dha-report-sample.png -------------------------------------------------------------------------------- /docs/dm-application-anatomy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/docs/dm-application-anatomy.png -------------------------------------------------------------------------------- /docs/dm-architecture-all.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/docs/dm-architecture-all.png -------------------------------------------------------------------------------- /docs/dm-architecture-application-library.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/docs/dm-architecture-application-library.png -------------------------------------------------------------------------------- /docs/dm-client-architecture.md: -------------------------------------------------------------------------------- 1 | # Device Management Client Architecture 2 | 3 | Here's a diagram of how the different pieces fit together: 4 | 5 | 6 | 7 | All device management operations are implemented via the Azure IoT Hub [direct methods]() and the [device twin](). 8 | 9 | ---- 10 | 11 | [Home Page](../README.md) -------------------------------------------------------------------------------- /docs/dm-hello-world-deploying.md: -------------------------------------------------------------------------------- 1 | # DM Hello World Application 2 | ## Deployment and Running 3 | 4 | After completing the [Coding](dm-hello-world-coding.md) section, we now can start deployment. 5 | 6 | The DM application depends on two other components that need to be on the device. Both components are built when the library is built (see [Building the Device Management Binaries](building-the-dm-binaries.md)). 7 | In a production scenario, they will be part of the OS image (see [Production Device Setup](oem-device-setup.md)). For our development scenario, however, we can install them manually as follows: 8 | 9 | - **SystemConfigurator.exe** 10 | - Copy SystemConfigurator.exe to the device system folder `c:\windows\system32`. 11 | - Register the service by running: 12 | - `c:\windows\system32\SystemConfigurator.exe -install` 13 | - Start the service: 14 | - `net start SystemConfigurator` 15 | 16 | - **DMHelloWorld** 17 | - Configure the remote machine in the application and hit F5. 18 | 19 | **Next Step**: 20 | 21 | - Managing the [DM Hello World Application](dm-hello-world-managing.md). 22 | 23 | ---- 24 | 25 | [Home Page](../README.md) | [DM Hello World Application](dm-hello-world-overview.md) 26 | -------------------------------------------------------------------------------- /docs/dm-hello-world-managing.md: -------------------------------------------------------------------------------- 1 | # DM Hello World Application 2 | ## Managing the Device 3 | 4 | Note that we have deployed the DMHelloWorld application and the service is running, we can start testing some of the DM features. 5 | 6 | In order to do that, we need to either do direct method calls or configure the Device Twin desired property. Both can be done through the [Microsoft.Azure.Devices SDK](https://www.nuget.org/packages/Microsoft.Azure.Devices/1.1.0). 7 | 8 | There are two samples that can help here: 9 | 10 | - [Device Explorer](https://github.com/Azure/azure-iot-sdk-csharp/tree/master/tools/DeviceExplorer) 11 | - This tools allows the users to experiment by constructing their own json by hand and merging it into the Device Twin. It also allows the users to type in the direct method names and json parameters and sends them to the device. 12 | 13 | - DMDashboard 14 | - This is a sample that is distributed with the Windows DM client library solution. This sample demonestrates how to construct the json that the DM client library understands. It also exposes all the supported functionality through easy-to-use UI. 15 | 16 | Once the DMHelloWorld is up and running, launch the DMDashboard, connect to your IoT Hub account and device, and start experimenting by reading the current state of the device, or configuring it. 17 | 18 | ---- 19 | 20 | [Home Page](../README.md) | [DM Hello World Application](dm-hello-world-overview.md) -------------------------------------------------------------------------------- /docs/dm-hello-world-overview.md: -------------------------------------------------------------------------------- 1 | # DM Hello World Application 2 | ## Overview 3 | 4 | - [Coding](dm-hello-world-coding.md) 5 | - [Deploying and Running](dm-hello-world-deploying.md) 6 | - [Managing the Device](dm-hello-world-managing.md) 7 | 8 | ---- 9 | 10 | [Home Page](../README.md) -------------------------------------------------------------------------------- /docs/dm-validator.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/docs/dm-validator.png -------------------------------------------------------------------------------- /docs/external-storage.md: -------------------------------------------------------------------------------- 1 | # Blob Storage 2 | 3 | Some device management configurations require the user to provide input files (like installing new certificates, or WiFi profiles, etc). Also, some scenarios may result in having the device generate files that need to be later transferred ourside the device (like log files, exporting WiFi profiles, certificates, etc). 4 | 5 | For these scenarios, the device twin specifies a common storage place for all configurations to use. The current implementaiton of the device management client on IoT Core assumes this is an Azure Blob Storage service. 6 | 7 | The storage is described in the desired properties section as follows: 8 |
 9 |   "properties": {
10 |     "desired" : {
11 |       "windows": {
12 |         "externalStorage": {
13 |         "connectionString": "connection string",
14 |         }
15 |       }
16 |     }
17 |   }
18 | 
19 | 20 | The inidividual configuration section may then refer to files in that location - either at the root or under containers. The relative location is left for the individual sections to define. 21 | 22 | ---- 23 | 24 | [Home Page](../README.md) | [Library Reference](library-reference.md) -------------------------------------------------------------------------------- /docs/report-all-device-properties.md: -------------------------------------------------------------------------------- 1 | # Report All Device Properties 2 | 3 | When a desired device management property changes in the device twin, the device management client gets notified and does two things: 4 | 5 | - Applies the new desired state. 6 | - Reads the current device state (that corresponds to the desired state) and reports it to the device twin. 7 | 8 | For example, if the operator sets the time zone to be Mountain Time, the device management client will: 9 | 10 | - Set the time zone to Mountain Time. 11 | - Read the time zone from the device, and report it to the device twin. 12 | 13 | The operator (or more specifically, the code running on in the Portal) can then compare the desired state to the reported state and decide whether the device is compliant or not. 14 | 15 | This is a conservative reporting approach and is meant to report only the properties that are configured (rather than reporting everything the device can report). 16 | 17 | Should the operator want to force the device to report all its properties, `windows.reportAllAsync` method can be invoked. 18 | 19 | ## windows.reportAllAsync 20 | 21 | Reports all properties supported by the Windows IoT Azure Device Client. 22 | 23 | #### Input Payload 24 | Input payload is empty 25 | 26 | #### Output Payload 27 | 28 | This method is asynchronous, so it returns immediately and sets the Status Object to `pending`. For more details on the Status Object, see [Status Reporting](status-reporting.md). 29 | 30 |
31 | {
32 |     "status" : {
33 |         <Status Object>
34 |     }
35 | }
36 | 
37 | 38 | ---- 39 | 40 | [Home Page](../README.md) | [Library Reference](library-reference.md) -------------------------------------------------------------------------------- /docs/source-policy.md: -------------------------------------------------------------------------------- 1 | # Source Policy 2 | 3 | For some device management areas, the desired state of a given property can be set: 4 | 5 | - *Remotely* through the Device Twin. 6 | - *Locally* through a .Net API interface. This interface can be called by the hosting UWP application. 7 | 8 | Both, the remote configuration and the local configuration, can co-exist on the same device - however, only one of them can be applied. To specify which one, a priority has to be set. The priority can be set through either interface. 9 | 10 | For example, consider the following: 11 | 12 | - The administrator wants all devices to have the Time Service running. 13 | - The administrator wants to give the option to the application user (on the device) to turn off the Time Service. 14 | - The application exposes a way to turn on and off the Time Service (through its UI, for example). 15 | 16 | For the above scenario, 17 | 18 | - The administrator will set the device twin properties to have the Time Service started and set the priority to `local`. 19 | - The application can then call the .Net API (see below), and start/stop the service. 20 | 21 | Should the administrator decide to take over, and override the application settings, the administrator can set the priority to `remote`, and then apply the desired settings. 22 | 23 | Note that both the device twin and the .Net API can control the priority property - which gives them equal rights. 24 | 25 | When reporting, it is the current state of the service that is reported - regardless of whether it is configured using the local or the remote settings. 26 | 27 | ---- 28 | 29 | [Home Page](../README.md) | [Library Reference](library-reference.md) -------------------------------------------------------------------------------- /external/WinSDKRS2/arm/mdmlocalmanagement.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/external/WinSDKRS2/arm/mdmlocalmanagement.lib -------------------------------------------------------------------------------- /external/WinSDKRS2/x64/mdmlocalmanagement.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/external/WinSDKRS2/x64/mdmlocalmanagement.lib -------------------------------------------------------------------------------- /external/WinSDKRS2/x86/mdmlocalmanagement.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/external/WinSDKRS2/x86/mdmlocalmanagement.lib -------------------------------------------------------------------------------- /external/limpet/dll/arm/LimpetLib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/external/limpet/dll/arm/LimpetLib.dll -------------------------------------------------------------------------------- /external/limpet/dll/x64/LimpetLib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/external/limpet/dll/x64/LimpetLib.dll -------------------------------------------------------------------------------- /external/limpet/dll/x64/LimpetLib.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/external/limpet/dll/x64/LimpetLib.pdb -------------------------------------------------------------------------------- /external/limpet/dll/x86/LimpetLib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/external/limpet/dll/x86/LimpetLib.dll -------------------------------------------------------------------------------- /external/limpet/dll/x86/LimpetLib.pdb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/external/limpet/dll/x86/LimpetLib.pdb -------------------------------------------------------------------------------- /external/limpet/inc/LimpetDefs.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Microsoft 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 4 | and associated documentation files (the "Software"), to deal in the Software without restriction, 5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 7 | subject to the following conditions: 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 14 | */ 15 | #pragma once 16 | 17 | #define LIMPET_TPM_OBJECT_NAME (sizeof(UINT16) + SHA256_DIGEST_SIZE) 18 | #define LIMPET_DEVICE_ID_STRING_LENGTH (70) 19 | #define LIMPET_STRING_SIZE (512) 20 | #define MAX_CONNECTION_STRING_LEN (1024) 21 | 22 | #define LIMPET_TPM20_SRK_HANDLE (0x81000001) 23 | #define LIMPET_TPM20_ERK_HANDLE (0x81010001) 24 | #define LIMPET_TPM20_PERSISTED_KEY_INDEX (0x81000100) 25 | 26 | #define LIMPET_TPM20_HT_NV_INDEX (0x01) 27 | #define LIMPET_TPM20_OWNER_NV_SPACE ((LIMPET_TPM20_HT_NV_INDEX << 24) | (0x01 << 22)) 28 | #define LIMPET_TPM20_PERSISTED_URI_INDEX (LIMPET_TPM20_OWNER_NV_SPACE + 0x100) 29 | #define LIMPET_TPM20_MAX_LOGICAL_DEVICE (10) 30 | #define LIMPET_HARDWARE_DEVICE_ID_SIZE (0x22) 31 | -------------------------------------------------------------------------------- /external/limpet/lib/arm/LimpetLib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/external/limpet/lib/arm/LimpetLib.lib -------------------------------------------------------------------------------- /external/limpet/lib/x64/LimpetLib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/external/limpet/lib/x64/LimpetLib.lib -------------------------------------------------------------------------------- /external/limpet/lib/x86/LimpetLib.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/external/limpet/lib/x86/LimpetLib.lib -------------------------------------------------------------------------------- /nuget/IoTDMClientLib.targets: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | $(MSBuildThisFileDirectory)$(Platform)\IoTDMClient.dll 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /nuget/PackIoTDMClientLib.cmd: -------------------------------------------------------------------------------- 1 | @echo off 2 | @REM Examples: 3 | @REM PackIoTDMClientLib.cmd 1.4.4 Release 4 | @REM PackIoTDMClientLib.cmd 1.4.4 Debug 5 | 6 | @if "%1"=="" goto MissingParameters 7 | @if "%2"=="" goto MissingParameters 8 | 9 | NuGet.exe pack "IoTDMClientLib.nuspec" -Prop Version=%1 -Prop Flavor=%2 10 | goto End 11 | 12 | :MissingParameters 13 | @echo. 14 | @echo Usage: 15 | @echo PackIoTDMClientLib.cmd version flavor 16 | @echo. 17 | @echo where: 18 | @echo version: the version of the nuget package to be genered in the form: major.minor.revision. 19 | @echo flavor : Debug or Release 20 | @echo. 21 | @echo Example: 22 | @echo PackIoTDMClientLib.cmd 1.4.4 Release 23 | @echo. 24 | 25 | :End 26 | -------------------------------------------------------------------------------- /samples/DMController/App.xaml: -------------------------------------------------------------------------------- 1 |  7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/DMController/Assets/LockScreenLogo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/DMController/Assets/LockScreenLogo.scale-200.png -------------------------------------------------------------------------------- /samples/DMController/Assets/SplashScreen.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/DMController/Assets/SplashScreen.scale-200.png -------------------------------------------------------------------------------- /samples/DMController/Assets/Square150x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/DMController/Assets/Square150x150Logo.scale-200.png -------------------------------------------------------------------------------- /samples/DMController/Assets/Square44x44Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/DMController/Assets/Square44x44Logo.scale-200.png -------------------------------------------------------------------------------- /samples/DMController/Assets/Square44x44Logo.targetsize-24_altform-unplated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/DMController/Assets/Square44x44Logo.targetsize-24_altform-unplated.png -------------------------------------------------------------------------------- /samples/DMController/Assets/StoreLogo.backup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/DMController/Assets/StoreLogo.backup.png -------------------------------------------------------------------------------- /samples/DMController/Assets/StoreLogo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/DMController/Assets/StoreLogo.png -------------------------------------------------------------------------------- /samples/DMController/Assets/Wide310x150Logo.scale-200.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/DMController/Assets/Wide310x150Logo.scale-200.png -------------------------------------------------------------------------------- /samples/DMController/Package.appxmanifest: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | DMController 7 | Sample 8 | Assets\StoreLogo.png 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /samples/DMController/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("DMController")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("DMController")] 13 | [assembly: AssemblyCopyright("Copyright © 2017")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Version information for an assembly consists of the following four values: 18 | // 19 | // Major Version 20 | // Minor Version 21 | // Build Number 22 | // Revision 23 | // 24 | // You can specify all the values or you can default the Build and Revision Numbers 25 | // by using the '*' as shown below: 26 | // [assembly: AssemblyVersion("1.0.*")] 27 | [assembly: AssemblyVersion("1.0.0.0")] 28 | [assembly: AssemblyFileVersion("1.0.0.0")] 29 | [assembly: ComVisible(false)] -------------------------------------------------------------------------------- /samples/DMController/Properties/Default.rd.xml: -------------------------------------------------------------------------------- 1 | 17 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /samples/DMController/README.md: -------------------------------------------------------------------------------- 1 | # Introduction 2 | DMController is an UWP app that will be used by the operator to configure and query the devices remotely. This must be customized for devices by the device OEM or operator. As part of this solution, we also provide an open source data model and implementation for easier interaction with the IoT Hub storage and the Windows IoT client. 3 | 4 | ## System Requirements 5 | ### Developer's Box 6 | 7 | - Visual Studio 2017 ([download](https://www.visualstudio.com/downloads)) with the following: 8 | - Windows 10 SDK (10.0.16299.0) for UWP (*For DMController*) 9 | 10 | ## Getting Started 11 | ### Basic controls 12 | 13 | 14 | - When the application first launches, enter the **IoT Hub Connection String** in the Settings section to connect to the devices. 15 | - **The Storage Connection String** is required for specific features such as installing an applications, certificates, wifi profiles, etc. 16 | - Select a **Device** on the bottom left to configure and query the selected device remotely. 17 | 18 | 19 | 20 | - The **Get All Device Properties** button will reports all device properties supported by the Windows IoT Azure Device Client. 21 | - The green refresh button will get the latest Device Information of the selected device. 22 | 23 | ### Test scenarios 24 | The two buttons beside the Settings button will perform the following test scenario: 25 | 26 | 27 | - Start an UWP in the foreground on all connected devices. 28 | - Stop an UWP in the foreground on all connected devices. 29 | - Change the test UWP Package Family name in DMController/MainPage.cs: 30 | 31 | const string DemoAppPackage = "DMClientOverview_jv0mnc6v5g12j"; 32 | -------------------------------------------------------------------------------- /samples/DMController/Views/FactoryResetUserControl.xaml.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.Devices.Management.DMDataContract; 2 | using Windows.UI.Xaml; 3 | using Windows.UI.Xaml.Controls; 4 | 5 | // The User Control item template is documented at https://go.microsoft.com/fwlink/?LinkId=234236 6 | 7 | namespace DMController.Views 8 | { 9 | public sealed partial class FactoryResetUserControl : UserControl 10 | { 11 | public FactoryResetUserControl() 12 | { 13 | this.InitializeComponent(); 14 | } 15 | 16 | private MainPage _mainPage; 17 | /// 18 | /// Saves the reference to MainPage object 19 | /// 20 | /// The MainPage object. 21 | public void SetMainPage(MainPage mainPage) 22 | { 23 | _mainPage = mainPage; 24 | } 25 | 26 | /// 27 | /// Start factory reset via direct methods. 28 | /// 29 | private void SetFactoryStatusButton_Click(object sender, RoutedEventArgs e) 30 | { 31 | var resetParam = new FactoryResetDataContract.ResetParams(); 32 | if (RecoveryPartitionGUIDInput.Text.Length == 0) 33 | { 34 | _mainPage.ShowDialogAsync("Invaid Input", "Please enter all fields to start Factory Reset"); 35 | return; 36 | } 37 | resetParam.recoveryPartitionGUID = RecoveryPartitionGUIDInput.Text; 38 | resetParam.clearTPM = ClearTPMChckbx.IsChecked == true; 39 | 40 | var result = _mainPage.CallDeviceMethod(FactoryResetDataContract.StartFactoryResetAsync, resetParam.ToJsonString()); 41 | 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /samples/DMController/imgs/deviceinfo-buttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/DMController/imgs/deviceinfo-buttons.png -------------------------------------------------------------------------------- /samples/DMController/imgs/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/DMController/imgs/settings.png -------------------------------------------------------------------------------- /samples/DMController/imgs/test-buttons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ms-iot/iot-core-azure-dm-client/8918c9aabb3d4bdd5cfea03c399d47704cde47c7/samples/DMController/imgs/test-buttons.png -------------------------------------------------------------------------------- /samples/DMDashboard/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/DMDashboard/App.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /samples/DMDashboard/App.xaml.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright 2017 Microsoft 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software 4 | and associated documentation files (the "Software"), to deal in the Software without restriction, 5 | including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, 6 | and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, 7 | subject to the following conditions: 8 | 9 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 10 | LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 12 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH 13 | THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 14 | */ 15 | using System; 16 | using System.Collections.Generic; 17 | using System.Configuration; 18 | using System.Data; 19 | using System.Linq; 20 | using System.Threading.Tasks; 21 | using System.Windows; 22 | 23 | namespace DMDashboard 24 | { 25 | /// 26 | /// Interaction logic for App.xaml 27 | /// 28 | public partial class App : Application 29 | { 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /samples/DMDashboard/Appx/AppsDesiredStateControl.xaml: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |