title | author | ms.author | ms.date | ms.topic | description | keywords |
---|---|---|---|---|---|---|
Embedded mode |
lilyhou |
lihou |
11/10/2017 |
article |
Learn how to configure Windows to allow embedded mode, enabling background applications and other capabilities. |
windows iot, embedded mode, background applications |
Embedded Mode is supported on Windows IoT Core and Windows IoT Enterprise. Embedded Mode enables:
- Background Applications (read more)
- Use of the lowLevelDevice capability
- Use of systemManagement capability
Embedded mode is always enabled on Window IoT Core. Embedded mode must be enabled by following the steps below on Windows IoT Enterprise.
Background Applications are created using the Background Application (IoT) template in Visual Studio. Read more about creating Background Applications.
Background applications run without stopping and without resource limits. Also, if the background application stops for some reason and embedded mode is enabled the background application will be restarted by the system.
While the system will automatically restart background applications, system lockdown features must be enabled to prevent users from stopping or interfering with the operation of Background Applications.
The lowLevel device Capability gives access to low-level hardware interfaces like GPIO, SPI, and I2C.
The lowLevelDevices Capability allows apps to access custom devices when a number of additional requirements are met. This capability should not be confused with the lowLevel device capability, which allows access to GPIO, I2C, SPI, and PWM devices.
Refer to App capability declarations for details.
When you enable the systemManagment capabilities for your application this is the set of APIs that gets unlocked:
- Windows.System.ProcessLauncher
- Windows.System.TimeZoneSettings
- Windows.System.ShutdownManager
- Windows.Globalization.Language.TrySetInputMethodLanguageTag
If you are debugging on a device that is not running Windows IoT Core and you see either of the following error messages you need to ensure AllowEmbeddedMode is enabled on the device and that the Embedded Mode service is running:
- There are no more endpoints available from the endpoint mapper.
- This program is blocked by group policy. For more information, contact your system administrator.
To enable embedded mode you will need to create a provisioning package in Imaging and Configuration Designer (ICD) that sets AllowEmbeddedMode=1. To install ICD you need to download and install the Windows ADK for Windows 10.
-
When installing the ADK select Imaging and Configuration Designer (ICD)
-
After installation is complete run Windows Imaging and Configuration Designer (WICD).
-
Click Advanced provisioning. Name the project AllowEmbeddedMode and click Next.
-
Click Finish.
-
In the search box type EmbeddedMode and then click on AllowEmbeddedMode.
-
In the center pane set the value of AllowEmbeddedMode to Yes
-
Click Export > Provisioning Package
-
Click Next.
-
Click Next.
-
Click Next.
-
Click Build.
-
To install the embedded mode .PPKG on Windows IoT Enterprise double-click on the .PPKG.
-
Click Yes, add it. Click yes on the LUA dialog if it appears, and the click Yes, add it on the dialog shown below.
-
To configure a Background Application to automatically run you will need to follow the directions to create an MinnowBoardMax SD Card and copy
D:\windows\system32\iotstartup.exe
(where D: is your SD Card). -
To get a list of installed Background Applications type:
C:\> iotstartup list BackgroundApplication1
-
The output should include the full name of each installed Background Application, which will look like this:
Headless : BackgroundApplication1-uwp_1.0.0.0_x86__cqewk5knvpvee
-
To configure this app to run at boot type:
C:\> iotstartup add headless BackgroundApplication1
-
If the Background Application has been successfully added to the startup list you should see this:
Added Headless: BackgroundApplication1-uwp_1.0.0.0_x86__cqewk5knvpveeplication1
-
Restart the embedded mode device:
-
Once the device has restarted, your Background Application will start automatically. The Embedded Mode service which manages Background Applications can take a few minutes to start. The embedded mode service will monitor Background Applications on the startup list and make sure they get restarted if they stops. If a Background Application stops several times in a short period of time it will no longer be restarted.
-
To remove your Background Application from the startup list type:
C:\> iotstartup remove headless BackgroundApplication1
-
If the Background Application is removed from the startup list the output will look like this:
Removed headless: BackgroundApplication1-uwp_1.0.0.0_x86__cqewk5knvpvee