> ## Documentation Index
> Fetch the complete documentation index at: https://dragonwingdocs.qualcomm.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 设置设备

> 在刷写 Qualcomm Linux 后，连接串行控制台，验证软件版本，然后选择 USB (ADB)、Wi-Fi 或以太网，实现主机与 IQ-9075 EVK 之间的持续连接。

在[刷写 Qualcomm Linux](./update-software/overview) 之后，请使用本页面来启动设备。首先使用调试串行控制台登录并验证软件版本。之后，根据您的环境选择以下**其中一种**连接方式：

| 选项            | 适用场景                    |
| ------------- | ----------------------- |
| **USB (ADB)** | 无可用网络；主机通过 USB 线缆直接连接设备 |
| **Wi-Fi**     | 无线访问；通过网络 SSH 连接设备      |
| **以太网**       | 有线网络访问；通过网络 SSH 连接设备    |

<Note>
  如果您**尚未**刷写设备，请先从[**更新软件**](./update-software/overview)开始。
</Note>

## 设置调试 UART

调试 UART 为您提供进入设备的串行控制台，是刷写后登录和检查设备的主要方式。

1. 将 micro-USB 线缆的一端连接到 IQ-9075 EVK 上的 micro-USB 端口。
2. 将另一端连接到主机。

<img src="https://mintcdn.com/qualcomm-prod/T1k4QQ7G3l_dE-rX/Linux/images/device-setup/iq9075-evk-microUSBport.png?fit=max&auto=format&n=T1k4QQ7G3l_dE-rX&q=85&s=c1b8e6417c3db4babd0e6e4abd44379b" alt="Micro-USB 端口位置" width="926" height="709" data-path="Linux/images/device-setup/iq9075-evk-microUSBport.png" />

3. 根据主机操作系统打开串行控制台：

<Tabs>
  <Tab title="Ubuntu">
    安装 `screen`：

    ```shell theme={null}
    sudo apt update
    sudo apt install screen
    ```

    列出串行设备：

    ```shell theme={null}
    ls /dev/ttyUSB*
    ```

    **示例输出：**

    ```shell theme={null}
    /dev/ttyUSB0  /dev/ttyUSB1  /dev/ttyUSB2  /dev/ttyUSB3
    ```

    IQ-9075 EVK 的板载适配器会暴露四个串行设备；**主控制台是第二个**（`/dev/ttyUSB1`）。以 115200 波特率打开它：

    ```shell theme={null}
    sudo screen /dev/ttyUSB1 115200
    ```
  </Tab>

  <Tab title="Windows">
    1. 下载 [**PuTTY**](https://putty.software/) 并完成安装。
    2. 打开 PuTTY 并选择 **Serial**。
    3. 将 **Serial line** 设置为**设备管理器**中检测到的 COM 端口，速率设置为 **115200**。

    <Note>
      FTDI 适配器会暴露多个 COM 端口。Converter B（**第二个**功能端口）承载主域（Main Domain）控制台。右键单击每个 COM 端口 → **属性** → 查看**位置**字段来识别它。
    </Note>

    如果未检测到 UART 端口，请安装 FTDI 驱动：

    * x86 和 Arm：[FTDI VCP 驱动](https://ftdichip.com/drivers/vcp-drivers/)

          <img src="https://mintcdn.com/qualcomm-prod/T1k4QQ7G3l_dE-rX/Linux/images/device-setup/Putty_serialport_setup.png?fit=max&auto=format&n=T1k4QQ7G3l_dE-rX&q=85&s=3fa840a98481753b0a079b255eb8df6f" alt="PuTTY 串口设置" width="445" height="425" data-path="Linux/images/device-setup/Putty_serialport_setup.png" />
  </Tab>

  <Tab title="macOS">
    列出串行设备：

    ```shell theme={null}
    ls /dev/cu.*
    ```

    找到您的设备节点（例如 `/dev/cu.usbserial-DM03SDQQ`），并以 115200 波特率打开：

    ```shell theme={null}
    screen /dev/cu.usbserial-DM03SDQQ 115200
    ```
  </Tab>
</Tabs>

4. 按 **Enter** 键调出登录提示符，然后登录：
   * **用户名：** `root`
   * **密码：** `oelinux123`

## 验证软件版本

确认设备正在运行 Qualcomm Linux：

```shell theme={null}
cat /etc/os-release
```

**预期输出：**

```text theme={null}
ID=qcom-distro-sota
NAME="Qualcomm Linux Reference Distro(OTA-enabled)"
VERSION="2.0"
PRETTY_NAME="Qualcomm Linux Reference Distro (OTA-enabled) 2.0"
```

检查内核版本：

```shell theme={null}
uname -a
```

**预期输出：**

```text theme={null}
Linux iq-9075-evk 6.18.30-... #1 SMP PREEMPT ... aarch64 GNU/Linux
```

<Note>
  如果版本不匹配，或者根本无法进入登录提示符，则说明镜像缺失或已过期。请返回[**更新软件**](./update-software/overview)并刷写最新的 Qualcomm Linux。
</Note>

## 连接设备

从以下选项中选择一种。三种方式都需要通过 UART 控制台执行初始设置命令（参见[设置调试 UART](#set-up-the-debug-uart)）。首次设置完成后，USB (ADB) 提供直接的 USB shell；Wi-Fi 和以太网则允许您通过 SSH 连接。

<Tabs>
  <Tab title="USB (ADB)">
    ADB（Android 调试桥，Android Debug Bridge）为您提供进入设备的 USB shell。由于 `adbd` 默认处于禁用状态，您需要先通过 UART 启用一次，ADB 才能工作。

    **1. 在主机上安装 ADB：**

    ```shell theme={null}
    sudo apt install android-tools-adb android-tools-fastboot
    ```

    验证：

    ```shell theme={null}
    adb --version
    ```

    **2. 在设备上启用 adbd**（一次性操作，在 UART 控制台执行）：

    ```shell theme={null}
    touch /etc/usb-debugging-enabled
    systemctl enable --now android-tools-adbd
    ```

    **3. 连接并打开 shell：**

    使用 USB Type-C 线缆将主机连接到设备。

    <img src="https://mintcdn.com/qualcomm-prod/Nk4BLiVahY8YQrsL/Linux/images/device-setup/iq9-evk-ports.png?fit=max&auto=format&n=Nk4BLiVahY8YQrsL&q=85&s=0140a4ce8222b065486bc0e8443ba5b0" alt="USB Type-C 端口位置" width="926" height="656" data-path="Linux/images/device-setup/iq9-evk-ports.png" />

    ```shell theme={null}
    adb devices
    adb shell
    ```

    **示例输出：**

    ```text theme={null}
    List of devices attached
    68f592a device
    ```
  </Tab>

  <Tab title="Wi-Fi">
    **1. 连接到 Wi-Fi 网络**（在 UART 控制台执行）：

    ```shell theme={null}
    nmcli dev wifi list
    nmcli dev wifi connect <WiFi-SSID> password <WiFi-password>
    ```

    **示例** — 网络 `QualcommWiFi`，密码 `1234567890`：

    ```shell theme={null}
    nmcli dev wifi connect QualcommWiFi password 1234567890
    ```

    **示例输出：**

    ```text theme={null}
    Device 'wlp1s0' successfully activated with 'd7b990bd-3b77-4b13-b239-b706553abaf8'.
    ```

    **2. 获取设备 IP 地址：**

    ```shell theme={null}
    ip addr show wlp1s0
    ```

    **3. 从主机 SSH 连接**（必须在同一网络中）：

    ```shell theme={null}
    ssh root@<ip-address>
    ```

    在提示时输入密码 `oelinux123`。
  </Tab>

  <Tab title="以太网">
    使用以太网线缆将 EVK 上的 RJ45 端口连接到网络路由器。套件中不包含以太网线缆。

    **1. 获取设备 IP 地址**（在 UART 控制台执行）：

    ```shell theme={null}
    ip addr show end0
    ```

    输出中 `inet` 的值即为设备 IP 地址。

    **2. 从主机 SSH 连接**（必须在同一网络中）：

    ```shell theme={null}
    ssh root@<ip-address>
    ```

    **示例：**

    ```shell theme={null}
    ssh root@192.168.0.222
    ```

    在提示时输入密码 `oelinux123`。
  </Tab>
</Tabs>

## 连接显示器

使用**有源** Mini DisplayPort 转 DisplayPort 线缆（包装盒内附带）或**有源** Mini DisplayPort 转 HDMI 适配器（不附带），将显示器连接到 EVK 上的 **DisplayPort0 (JEDP0)** 或 **JEDP1**。

<Note>
  显示输出仅可通过 DisplayPort 接口实现。USB Type-C 端口不提供显示输出。
</Note>

<img src="https://mintcdn.com/qualcomm-prod/T1k4QQ7G3l_dE-rX/Linux/images/device-setup/Miniport_to_displayport_cable.png?fit=max&auto=format&n=T1k4QQ7G3l_dE-rX&q=85&s=285ec9ebb8289506838eabcf0f1deb3b" alt="Mini-DisplayPort 转 DisplayPort 线缆" width="849" height="926" data-path="Linux/images/device-setup/Miniport_to_displayport_cable.png" />

给设备上电，并确认显示器显示预期的启动输出。

## 连接 Bluetooth 外设

使用 `bluetoothctl` 配对并连接 Bluetooth 键盘或鼠标。

1. 打开 Bluetooth 管理器：

   ```shell theme={null}
   bluetoothctl
   ```

2. 上电并开始扫描：

   ```shell theme={null}
   power on
   scan on
   ```

3. 等待您的设备出现，并记下其 MAC 地址：

   ```text theme={null}
   [NEW] Device F8:7D:76:9D:9B:6B MyKeyboard
   ```

4. 配对、信任并连接：

   ```shell theme={null}
   pair F8:7D:76:9D:9B:6B
   trust F8:7D:76:9D:9B:6B
   connect F8:7D:76:9D:9B:6B
   ```

5. 停止扫描并退出：

   ```shell theme={null}
   scan off
   exit
   ```

设备在后续启动时会自动重新连接。有关完整的 Wi-Fi 和 Bluetooth 详细信息，请参见 [**Wi-Fi 和 Bluetooth**](./peripherals-interfaces/WiFi-BT)。

## SBC（单板计算机，Single Board Computer）模式

要将 EVK 作为独立计算机使用，并连接键盘、鼠标和显示器：

<img src="https://mintcdn.com/qualcomm-prod/T1k4QQ7G3l_dE-rX/Linux/images/device-setup/iq9075_evk_sbc.png?fit=max&auto=format&n=T1k4QQ7G3l_dE-rX&q=85&s=64ab3cc225e01edb8ea8f6f4bc234b7b" alt="SBC 连接示例" width="714" height="536" data-path="Linux/images/device-setup/iq9075_evk_sbc.png" />

* **电源：** 连接 12 V 适配器。
* **串行控制台：** 通过 micro-USB 连接主机以获取 UART 日志（设置完成后可选）。
* **USB 集线器：** 将带电源的 USB 集线器连接到 USB Type-C 端口，以支持多个外设。
* **键盘和鼠标：** 插入 USB 集线器。
* **USB 摄像头：** 连接到 USB 集线器（必须符合 UVC 标准）。
* **MIPI 摄像头：** 连接到主板上的 MIPI CSI 接口。
* **显示器：** Mini DisplayPort 转 DisplayPort 线缆，或有源 Mini DisplayPort 转 HDMI 适配器。

## 后续步骤

* [探索外设和接口](./peripherals-interfaces/peripheral_interface_overview)
