适用于 HoloLens 的 Device PortalDevice Portal for HoloLens

在 HoloLens 上设置 Device PortalSet up device portal on HoloLens

启用 Device PortalEnable Device Portal

  1. 打开 HoloLens 的电源,然后戴上设备。Power on your HoloLens and put on the device.
  2. 在 HoloLens(第一代)上执行开始手势开花手势,以启动主菜单。Perform the Start gesture or bloom gesture for HoloLens (1st Gen) to launch the main menu.
  3. 凝视“设置”磁贴,然后在 HoloLens(第一代)上执行敲击手势,或者在 HoloLens 2 上通过触摸或手部射线选择该磁贴 。Gaze at the Settings tile and perform the tap gesture on HoloLens (1st Gen) or select it on HoloLens 2 by touching it or using a Hand ray. 在选择“设置”应用后,将启动该应用。The Settings app will launch after you select it.
  4. 选择“更新” 菜单项。Select the Update menu item.
  5. 选择“面向开发人员” 菜单项。Select the For developers menu item.
  6. 启用“开发人员模式” 。Enable Developer Mode.
  7. 向下滚动,然后启用 Device Portal。Scroll down and enable Device Portal.

配对设备Pair your device

通过 WLAN 连接Connect over Wi-Fi

  1. 将 HoloLens 连接到 WLAN。Connect your HoloLens to Wi-Fi.

  2. 查找设备的 IP 地址。Look up your device's IP address. 在设备上的“设置”>“网络和 Internet”>“Wi-Fi”>“硬件属性”下查找 IP 地址 。Find the IP address on the device under Settings > Network & Internet > Wi-Fi > Hardware properties. 你还可以问“你好小娜,我的 IP 地址是多少?”You can also ask, "Hey Cortana, what is my IP address?"

  3. 在电脑上的 Web 浏览器中,转到 https://<YOUR_HOLOLENS_IP_ADDRESS>From a web browser on your PC, go to https://<YOUR_HOLOLENS_IP_ADDRESS>

    • 浏览器中将显示以下消息:“此网站的安全证书有问题。”The browser will display the following message: "There's a problem with this website's security certificate". 由于颁发给 Device Portal 的证书是测试证书,因此会显示上述消息。This happens because the certificate which is issued to the Device Portal is a test certificate. 你可以暂时忽略此证书错误并继续。You can ignore this certificate error for now and proceed.

通过 USB 连接Connect over USB

  1. 安装工具,以确保 Windows 10 开发人员工具随附的 Visual Studio Update 1 已安装在电脑上。Install the tools to make sure you have Visual Studio Update 1 with the Windows 10 developer tools installed on your PC. 这支持 USB 连接。This enables USB connectivity.
  2. 使用适用于 HoloLens(第一代)的 micro-USB 数据线或适用于 HoloLens 2 的 USB-C 数据线将 HoloLens 连接到电脑。Connect your HoloLens to your PC with a micro-USB cable for HoloLens (1st Gen) or USB-C for HoloLens 2.
  3. 通过电脑上的 Web 浏览器,转到 a web browser on your PC, go to


如果你的电脑找不到设备,请尝试使用 HoloLens 设备的实际网络 IP 地址,而不是 your PC is unable to find the device, try using the real network IP address of the HoloLens device, rather than

连接到仿真器Connect to an emulator

也可以将 Device Portal 与仿真器结合使用。You can also use the Device Portal with your emulator. 若要连接到 Device Portal,请使用工具栏。To connect to the Device Portal, use the toolbar. 单击此图标:Click on this icon:

  • 打开设备门户:在仿真器中打开 HoloLens OS 的 Windows 设备门户。Open Device Portal: Open the Windows Device Portal for the HoloLens OS in the emulator.

创建用户名和密码Create a Username and Password

首次连接到 HoloLens 上的 Device Portal 时,需要创建用户名和密码。The first time you connect to the Device Portal on your HoloLens, you will need to create a username and password.

  1. 在电脑上的 Web 浏览器中,输入 HoloLens 的 IP 地址。In a web browser on your PC, enter the IP address of the HoloLens. 将打开“设置访问”页面。The Set up access page opens.
  2. 单击或点击“请求 PIN”,然后查看 HoloLens 屏幕以获取生成的 PIN。Click or tap Request pin and look at the HoloLens display to get the generated PIN.
  3. 输入设备文本框上显示的 PIN。Enter the PIN in the PIN displayed on your device textbox.
  4. 输入将用于连接到 Device Portal 的用户名。Enter the user name you will use to connect to the Device Portal. 无需使用 Microsoft 帐户 (MSA) 名称或域名作为用户名。It doesn't need to be a Microsoft Account (MSA) name or a domain name.
  5. 输入密码并进行确认。Enter a password and confirm it. 密码长度必须至少为七个字符。The password must be at least seven characters in length. 无需使用 MSA 密码或域密码作为密码。It doesn't need to be an MSA or domain password.
  6. 单击“配对”以连接到 HoloLens 上的 Windows Device Portal。Click Pair to connect to Windows Device Portal on the HoloLens.

如果你希望能随时更改此用户名和密码,可通过以下方式访问设备的安全页面来重复此过程:单击右上角的“安全”链接或导航到 https://<YOUR_HOLOLENS_IP_ADDRESS>/devicesecurity.htmIf you wish to change this username or password at any time, you can repeat this process by visiting the device security page by either clicking the Security link along the top right, or navigating to: https://<YOUR_HOLOLENS_IP_ADDRESS>/devicesecurity.htm.

安全证书Security certificate

如果你在浏览器中看到“证书错误”,可以通过创建与该设备的信任关系来修复该错误。If you are see a "certificate error" in your browser, you can fix it by creating a trust relationship with the device.

每个 HoloLens 会生成唯一的自签名证书以供其 SSL 连接使用。Each HoloLens generates a unique self-signed certificate for its SSL connection. 默认情况下,此证书不受电脑的 Web 浏览器信任,因此你可能会看到“证书错误”。By default, this certificate is not trusted by your PC's web browser and you may get a "certificate error". 通过从你的 HoloLens 下载此证书(借助 USB 或信任的 WLAN 网络)并在你的电脑上信任该证书,可以安全地连接到设备。By downloading this certificate from your HoloLens (over USB or a Wi-Fi network you trust) and trusting it on your PC, you can securely connect to your device.

  1. 确保你处于安全网络(USB 或信任的 WLAN 网络)中。Make sure you are on a secure network (USB or a Wi-Fi network you trust).

  2. 从 Device Portal 的“安全”页下载此设备的证书 - 单击图标列表右上角的“安全”链接或导航到 https://<YOUR_HOLOLENS_IP_ADDRESS>/devicesecurity.htmDownload this device's certificate from the "Security" page on the Device Portal.- Either click the Security link from the top right list of icons or navigate to: https://<YOUR_HOLOLENS_IP_ADDRESS>/devicesecurity.htm

  3. 在电脑上安装“受信任的根证书颁发机构”存储中的证书 - 在 Windows 菜单中键入:管理计算机证书并启动小程序。Install the certificate in the "Trusted Root Certification Authorities" store on your PC.- From the Windows menu, type: Manage Computer Certificates and start the applet.

    • 展开“受信任的根证书颁发机构”文件夹。Expand the Trusted Root Certification Authority folder.
    • 单击“证书”文件夹。Click on the Certificates folder.
    • 在“操作”菜单中选择:“所有任务”>“导入...”From the Action menu, select: All Tasks > Import...
    • 使用从 Device Portal 下载的证书文件,完成“证书导入向导”。Complete the Certificate Import Wizard, using the certificate file you downloaded from the Device Portal.
  4. 重新启动浏览器。Restart the browser.

Device Portal 页面Device Portal Pages


Device Portal 会话从主页开始。Your Device Portal session starts at the Home page. 可从主页的左侧导航栏访问其他页面。Access other pages from the navigation bar along the left side of the home page.

主页顶部的工具栏提供对常用状态和功能的访问。The toolbar at the top of the page provides access to commonly used status and features.

  • 联机:指示设备是否已连接到 Wi-Fi。Online: Indicates whether the device is connected to Wi-Fi.
  • 关机:关闭设备。Shutdown: Turns off the device.
  • 重启:关闭再打开设备的电源。Restart: Cycles power on the device.
  • 安全:打开“设备安全性”页。Security: Opens the Device Security page.
  • :指示设备的温度。Cool: Indicates the temperature of the device.
  • 交流电源:指示设备是否已接上电源并正在充电。A/C: Indicates whether the device is plugged in and charging.
  • 帮助:打开 REST 接口文档页。Help: Opens the REST interface documentation page.

主页将显示以下信息:The home page shows the following info:

  • 设备状态:监视设备的运行状况并报告致命错误。Device Status: monitors the health of your device and reports critical errors.
  • Windows 信息:显示 HoloLens 的名称和当前安装的 Windows 版本。Windows information: shows the name of the HoloLens and the currently installed version of Windows.
  • 首选项部分包含以下设置:Preferences section contains the following settings:
    • IPD:设置瞳孔间距 (IPD),它是在用户直视前方时两个瞳孔中心之间的距离,以毫米为单位。IPD: Sets the interpupillary distance (IPD), which is the distance, in millimeters, between the center of the user's pupils when looking straight ahead. 该设置将立即生效。The setting takes effect immediately. 在设置你的设备时,会自动计算该默认值。The default value was calculated automatically when you set up your device. 此设置仅适用于 HoloLens(第一代),Hololens 2 会计算眼睛位置。 Valid for HoloLens (1st Gen) only, Hololens 2 computes eye position.
    • 设备名称:为 HoloLens 指定一个名称。Device name: Assign a name to the HoloLens. 更改此值后,必须重新启动设备才能使该值生效。You must reboot the device after changing this value for it to take effect. 单击“保存”后,对话框将询问是要立即重新启动设备还是稍后重新启动它。After clicking Save, a dialog will ask if you want to reboot the device immediately or reboot later.
    • 睡眠设置:设置当设备已接上电源并使用电池时进入睡眠状态之前要等待的时长。Sleep settings: Sets the length of time to wait before the device goes to sleep when it's plugged in and when it's on battery.

3D 视图3D View

使用“3D 视图”页面可查看 HoloLens 感知周围环境的方式。Use the 3D View page to see how HoloLens interprets your surroundings. 使用鼠标即可导览该视图:Navigate the view by using the mouse:

  • 旋转:左键单击 + 鼠标;Rotate: left click + mouse;

  • 平移:右键单击 + 鼠标;Pan: right click + mouse;

  • 缩放:鼠标滚轮滚动。Zoom: mouse scroll.

  • 跟踪选项:通过选中“强制视觉跟踪”可启用持续视觉跟踪。Tracking options: Turn on continuous visual tracking by checking Force visual tracking. “暂停”会停止视觉跟踪。Pause stops visual tracking.

  • 视图选项:设置 3D 视图中的选项:- 跟踪:指示视觉跟踪是否处于活动状态。View options: Set options on the 3D view:- Tracking: Indicates whether visual tracking is active.

  • 显示地面:显示方格形式的地平面。Show floor: Displays a checkered floor plane.

  • 显示锥体:显示视锥。Show frustum: Displays the view frustum.

  • 显示防抖动平面:显示 HoloLens 用于稳定动作的平面。Show stabilization plane: Displays the plane that HoloLens uses for stabilizing motion.

  • 显示网格:显示代表你周围环境的图面映射网格。Show mesh: Displays the surface mapping mesh that represents your surroundings.

  • 显示细节:显示手的位置、头部旋转四元数,以及设备原点矢量的实时变化。Show details: Displays hand positions, head rotation quaternions, and the device origin vector as they change in real time.

  • 全屏按钮:以全屏模式显示 3D 视图。Full screen button: Shows the 3D View in full screen mode. 按 ESC 键可退出全屏视图。Press ESC to exit full screen view.

  • 图面重构:单击或敲击“更新”可显示设备的最新空间映射网格。Surface reconstruction: Click or tap Update to display the latest spatial mapping mesh from the device. 完成全面检查可能需要一些时间,最多只需几秒钟。A full pass may take some time to complete, up to a few seconds. 在 3D 视图中,网格不会自动更新,必须手动单击“更新”才能获取设备的最新网格。The mesh does not update automatically in the 3D view, and you must manually click Update to get the latest mesh from the device. 单击“保存”可在电脑上将当前的空间映射网格保存为 obj 文件。Click Save to save the current spatial mapping mesh as an obj file on your PC.

混合现实捕获Mixed Reality Capture

使用“混合现实捕获”页面可保存 HoloLens 中的媒体流。Use the Mixed Reality Capture page to save media streams from the HoloLens.

  • 设置:通过检查以下设置来控制捕获的媒体流:- 全息图:捕获视频流中的全息内容。Settings: Control the media streams that are captured by checking the following settings:- Holograms: Captures the holographic content in the video stream. 呈现全息图时使用的是单声道,而不是立体声。Holograms are rendered in mono, not stereo.

  • PV 相机:捕获照片/视频相机中的视频流。PV camera: Captures the video stream from the photo/video camera.

  • 麦克风音频:捕获麦克风阵列中的音频。Mic Audio: Captures audio from the microphone array.

  • 应用音频:捕获当前正在运行的应用中的音频。App Audio: Captures audio from the currently running app.

  • 实时预览质量:选择用于实时预览的屏幕分辨率、帧速率和流处理速率。Live preview quality: Select the screen resolution, frame rate, and streaming rate for the live preview.

  • 单击或点击“实时预览”按钮可显示捕获流。Click or tap the Live preview button to show the capture stream. “停止实时预览”会停止捕获流。Stop live preview stops the capture stream.

  • 单击或点击“录制”可使用指定的设置开始录制混合现实流。Click or tap Record to start recording the mixed-reality stream, using the specified settings. “停止录制”会结束录制,并保存该录制。Stop recording ends the recording and saves it.

  • 单击或点击“拍摄照片”可从捕获流中捕获静止图像。Click or tap Take photo to take a still image from the capture stream.

  • 视频和照片:显示在设备上捕获的视频和照片列表。Videos and photos: Shows a list of video and photo captures taken on the device.

请注意,当你正从 Device Portal 中录制或流处理实时预览时,HoloLens 应用将无法捕获 MRC 照片或视频。Note that HoloLens apps will not be able to capture an MRC photo or video while you are recording or streaming a live preview from the Device Portal.

系统性能System Performance

HoloLens 上的“系统性能”工具有 3 个可以记录的附加指标。The System Performance tool on HoloLens has 3 additional metrics that can be recorded.

可用的指标如下所示:These are the available metrics:

  • SoC 电源:片上系统的瞬时用电量,为一分钟平均值SoC power: Instantaneous system-on-chip power utilization, averaged over one minute
  • 系统电源:系统的瞬时用电量,为一分钟平均值System power: Instantaneous system power utilization, averaged over one minute
  • 帧速率:每秒帧数、每秒丢失的垂直消隐数和连续丢失的垂直消隐数Frame rate: Frames per second, missed VBlanks per second, and consecutive missed VBlanks

应用故障转储页面App Crash Dumps Page

此页面允许你收集旁加载应用的故障转储。This page allows you to collect crash dumps for your side-loaded apps. 对于要收集其故障转储的每个应用,请选中对应的“故障转储启用”复选框。Check the Crash Dumps Enabled checkbox for each app for which you want to collect crash dumps. 返回到此页面可收集故障转储。Return to this page to collect crash dumps. 可在 Visual Studio 中打开转储文件以供调试。Dump files can be opened in Visual Studio for debugging.

展台模式Kiosk Mode

展台模式的启用会限制用户启动新应用或更改正在运行的应用。Enables kiosk mode, which limits the user's ability to launch new apps or change the running app. 启用展台模式后,“绽放”手势和 Cortana 处于禁用状态,并且已放置的应用不会显示在用户周围环境中。When kiosk mode is enabled, the Bloom gesture and Cortana are disabled, and placed apps aren't shown in the user's surroundings.

选中“启用展台模式”会将 HoloLens 置于展台模式中。Check Enable Kiosk Mode to put the HoloLens into kiosk mode. 从启动应用下拉列表中选择启动时要运行的应用。Select the app to run at startup from the Startup app dropdown. 单击或点击“保存”以提交设置。Click or tap Save to commit the settings.

请注意,即使展台模式未启用,该应用也会在启动时运行。Note that the app will run at startup even if kiosk mode is not enabled. 选择“无”可使在启动时不运行任何应用。Select None to have no app run at startup.


允许你记录和播放用于测试的输入数据。Allows you to record and play back input data for testing.

  • 捕获房间:用于下载模拟房间文件,该文件包含用户周围环境的空间映射网格。Capture room: Used to download a simulated room file that contains the spatial mapping mesh for the user's surroundings. 命名该房间,然后单击“捕获”以在电脑上将该数据保存为 .xef 文件。Name the room and then click Capture to save the data as a .xef file on your PC. 此房间文件可以加载到 HoloLens 仿真器中。This room file can be loaded into the HoloLens emulator.
  • 录制:选中要录制的流、为录制内容命名,然后单击或敲击“录制”开始录制。Recording: Check the streams to record, name the recording, and click or tap Record to start recording. 使用你的 HoloLens 执行操作,然后单击“停止”可在电脑上将该数据保存为 .xef 文件。Perform actions with your HoloLens and then click Stop to save the data as a .xef file on your PC. 可以在 HoloLens 仿真器或设备上加载此文件。This file can be loaded on the HoloLens emulator or device.
  • 播放:单击或敲击“上传录制内容”可从电脑中选择 xef 文件,然后将数据发送到 HoloLens。Playback: Click or tap Upload recording to select a xef file from your PC and send the data to the HoloLens.
  • 控制模式:在 HoloLens 上,从下拉列表中选择“默认”或“模拟”,然后单击或敲击“设置”按钮选中该模式。Control mode: Select Default or Simulation from the dropdown, and click or tap the Set button to select the mode on the HoloLens. 相反,选择“模拟”会禁用 HoloLens 上的真实传感器,并使用已上载的模拟数据。Choosing "Simulation" disables the real sensors on your HoloLens and uses uploaded simulated data instead. 如果切换到“模拟”,HoloLens 将不会响应真实用户,除非切换回“默认”。If you switch to "Simulation", your HoloLens will not respond to the real user until you switch back to "Default".

虚拟输入Virtual Input

将键盘输入从远程计算机发送到 HoloLens。Sends keyboard input from the remote machine to the HoloLens.

单击或点击虚拟键盘下的区域,即可将键击发送到 HoloLens。Click or tap the region under Virtual keyboard to enable sending keystrokes to the HoloLens. 在“输入文本”文本框中键入,然后单击或点击“发送”以将键击发送到活动应用。Type in the Input text textbox and click or tap Send to send the keystrokes to the active app.

另请参阅See also