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

# 设置设备

> 刷写 Ubuntu 后,连接串行控制台、验证版本,并在 IQ-8275 EVK 上启用网络、SSH 和显示。

在完成 [Ubuntu 刷写](./update-software/overview)后,使用本页启动设备:连接调试串行控制台、验证软件版本、接入网络,并通过 SSH 和显示器进行连接。

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

## 为设备上电

* Dragonwing IQ-8275 开发板通过 2.10 mm 圆形电源插孔(JPWR,JACK-C-PC-10A-RA(R))接收主电源,支持 **12 V 至 36 V** 的输入电压范围。EVK 还附带一个 Type-C 转圆形插头适配器以方便使用。连接 +12 V 电源适配器为开发板供电。
* 将线缆的 USB Type-C 端连接到 **USB0**,另一端(Type-A 或 Type-C)连接到**主机设备**。此连接用于刷写软件。

## 设置调试 UART

调试 UART 显示诊断消息,并通过 UART shell 提供设备访问。要设置调试 UART,请执行以下操作:

1. 将 micro-USB 线缆的一端连接到 Dragonwing IQ-8275 设备上的 micro-USB 端口。
2. 将 micro-USB 线缆的另一端连接到主机电脑。

<img src="https://mintcdn.com/qualcomm-staging/Rg0Et_KvUD8HUuzp/Ubuntu/images/device-setup/iq8275-platform-with-cables-plugged-in.png?fit=max&auto=format&n=Rg0Et_KvUD8HUuzp&q=85&s=fee2d7435a2add490f3bf243df56aa24" alt="Micro-USB 端口位置" width="1114" height="900" data-path="Ubuntu/images/device-setup/iq8275-platform-with-cables-plugged-in.png" />

3. 打开对应主机操作系统的串行控制台:

<Tabs>
  <Tab title="Ubuntu 主机">
    在 Ubuntu 主机上运行以下命令安装 Screen 应用程序:

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

    运行以下命令验证 USB 端口连接:

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

    **示例输出:**

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

    IQ-8275 EVK 的板载适配器会暴露四个串行设备;**主控制台是第二个**(`/dev/ttyUSB1`)。以 115200 波特率打开它:

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

    <Note>
      在打开 UART 控制台会话之前，请确认没有其他进程正在使用该串口。多个应用同时访问同一个 UART 设备可能导致挂起或控制台输出不一致。<br />
      要识别当前正在使用该串口的进程，请运行：

      * `sudo lsof /dev/ttyUSB1`

      如果检测到 screen、minicom 或其他任何串行终端会话，请使用其 PID 终止对应进程：

      * `sudo kill <PID>`
    </Note>
  </Tab>

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

    <Note>
      设备运行两个控制台域:**SAIL**(常开的安全和启动岛)和**主域(Main Domain)**(运行 Linux 的应用处理器,即您登录的地方)。您需要的是主域控制台。

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

      Converter A(ADBUS0:7)分配给 SAIL 调试 UART。Converter B(BDBUS0:7)承载主域 UART。
    </Note>

    在安装驱动之前,适配器通常出现在设备管理器的**其他设备**下(具体名称各异,例如 Qualcomm 命名的设备或未知设备),而不在\*\*端口(COM 和 LPT)\*\*下。在那里右键单击该设备以安装驱动。

    如果未检测到 UART 端口,请安装 FTDI 驱动:

    * x86:[USB-to-UART 串行驱动](https://ftdichip.com/wp-content/uploads/2023/09/CDM-v2.12.36.4-WHQL-Certified.zip)
    * Arm:[FTDI VCP 驱动](https://oemdrivers.com/usb-ft232r-usb-uart-arm64)

          <img src="https://mintcdn.com/qualcomm-staging/5j1H6H_NhFpsAqlq/Ubuntu/images/device-setup/Selection-of_correct-comport.png?fit=max&auto=format&n=5j1H6H_NhFpsAqlq&q=85&s=c7e723a74f427bab4032a609b82bcb43" alt="COM 端口选择" width="667" height="624" data-path="Ubuntu/images/device-setup/Selection-of_correct-comport.png" />

          <img src="https://mintcdn.com/qualcomm-staging/5j1H6H_NhFpsAqlq/Ubuntu/images/device-setup/Putty_serialport_setup.png?fit=max&auto=format&n=5j1H6H_NhFpsAqlq&q=85&s=d34713077ab98b35088520a27b39887e" alt="PuTTY 串口设置" width="445" height="425" data-path="Ubuntu/images/device-setup/Putty_serialport_setup.png" />
  </Tab>

  <Tab title="macOS 主机">
    列出串行设备:

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

    <img src="https://mintcdn.com/qualcomm-staging/5j1H6H_NhFpsAqlq/Ubuntu/images/device-setup/Mac_serial_port_details.png?fit=max&auto=format&n=5j1H6H_NhFpsAqlq&q=85&s=1896b9e2c72b56e4b0bde9c7ff156e42" alt="macOS 串行端口列表" width="560" height="80" data-path="Ubuntu/images/device-setup/Mac_serial_port_details.png" />

    找到您的设备节点(例如 `/dev/cu.usbserial-DM03SDQQ`),并以 115200 波特率打开:

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

4. 按 **Enter** 键调出登录提示,然后登录:

   * **用户名:** `ubuntu`
   * **密码:** `ubuntu`

   首次登录时系统会提示您设置新密码。

## 验证软件版本

确认设备正在运行 Ubuntu:

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

**预期输出:**

```text theme={null}
PRETTY_NAME="Ubuntu 24.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.3 LTS (Noble Numbat)"
```

检查内核版本:

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

**预期输出:**

```text theme={null}
Linux ubuntu 6.8.0-1057-qcom #58-Ubuntu SMP PREEMPT_DYNAMIC ... aarch64 GNU/Linux
```

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

## 连接网络

使用以下方法之一建立互联网连接。

### Wi-Fi

设备以 station 模式运行 Wi-Fi。使用 `nmcli` 连接:

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

**示例** — 网络 `QualcommWiFi`,密码 `1234567890`:

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

**示例输出:**

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

验证连接并获取 IP 地址:

```shell theme={null}
nmcli -p device
ip addr show wlp1s0
```

<img src="https://mintcdn.com/qualcomm-staging/5j1H6H_NhFpsAqlq/Ubuntu/images/device-setup/iq9075-evk-wlan0_ipaddress.png?fit=max&auto=format&n=5j1H6H_NhFpsAqlq&q=85&s=eb0d0a1255a1ec745b385b47c7707a04" alt="Wi-Fi IP 地址" width="847" height="159" data-path="Ubuntu/images/device-setup/iq9075-evk-wlan0_ipaddress.png" />

确认互联网访问:

```shell theme={null}
ping qualcomm.com
```

### 以太网

用以太网线缆将 EVK 上的 RJ45 端口连接到您的网络路由器。

读取 IP 地址:

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

<img src="https://mintcdn.com/qualcomm-staging/5j1H6H_NhFpsAqlq/Ubuntu/images/device-setup/iq9075-evk-eth0_ipaddress.png?fit=max&auto=format&n=5j1H6H_NhFpsAqlq&q=85&s=334a17c9cfd0bd87d940da4fda281575" alt="以太网 IP 地址" width="808" height="134" data-path="Ubuntu/images/device-setup/iq9075-evk-eth0_ipaddress.png" />

## 通过 SSH 连接

SSH 让您可以从主机电脑通过网络终端访问设备。

<Note>
  确保您的主机电脑与设备在同一网络中。
</Note>

1. 查找设备 IP 地址(来自上面的网络步骤):
   * 以太网:`ip addr show end0`
   * Wi-Fi:`ip addr show wlp1s0`
2. 从主机连接:
   ```shell theme={null}
   ssh ubuntu@<ip-address>
   ```
   **示例:**
   ```shell theme={null}
   ssh ubuntu@192.168.0.222
   ```
3. 出现提示时输入密码。

## 连接显示器

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

<img src="https://mintcdn.com/qualcomm-staging/5j1H6H_NhFpsAqlq/Ubuntu/images/device-setup/Miniport_to_displayport_cable.png?fit=max&auto=format&n=5j1H6H_NhFpsAqlq&q=85&s=9d43f1ae882283f4f8f18f39f628570b" alt="Mini-DisplayPort 转 DisplayPort 线缆" width="849" height="926" data-path="Ubuntu/images/device-setup/Miniport_to_displayport_cable.png" />

<img src="https://mintcdn.com/qualcomm-staging/5j1H6H_NhFpsAqlq/Ubuntu/images/device-setup/Miniport_to_HDMI_adapter.png?fit=max&auto=format&n=5j1H6H_NhFpsAqlq&q=85&s=98d0b5606d074829e550ac3869e8b2f3" alt="有源 Mini-DisplayPort 转 HDMI 适配器" width="867" height="537" data-path="Ubuntu/images/device-setup/Miniport_to_HDMI_adapter.png" />

为设备上电并验证显示。您应该看到以下之一:

**服务器:**

<img src="https://mintcdn.com/qualcomm-staging/5j1H6H_NhFpsAqlq/Ubuntu/images/device-setup/hdmi_monitor_Server.png?fit=max&auto=format&n=5j1H6H_NhFpsAqlq&q=85&s=37122d3d213458b921fdf81160277a23" alt="Ubuntu 服务器显示" width="700" height="393" data-path="Ubuntu/images/device-setup/hdmi_monitor_Server.png" />

**桌面:**

<img src="https://mintcdn.com/qualcomm-staging/5j1H6H_NhFpsAqlq/Ubuntu/images/update-software/hdmi_monitor_Desktop.png?fit=max&auto=format&n=5j1H6H_NhFpsAqlq&q=85&s=c3153b3301a76bdd1cdb2076463e74e9" alt="Ubuntu 桌面显示" width="2601" height="1435" data-path="Ubuntu/images/update-software/hdmi_monitor_Desktop.png" />

<Note>
  请在设备上电**之前**连接显示器。如果在设备启动后再连接或更换显示器且屏幕保持黑屏,请对设备进行断电重启以恢复显示。
</Note>

## SBC(单板计算机)模式

要将 EVK 作为带键盘、鼠标和显示器的独立计算机使用:

<img src="https://mintcdn.com/qualcomm-staging/5j1H6H_NhFpsAqlq/Ubuntu/images/device-setup/iq9075_evk_sbc.png?fit=max&auto=format&n=5j1H6H_NhFpsAqlq&q=85&s=2825d26fbbab67d05289fc0417c92bac" alt="SBC 连接示例" width="714" height="536" data-path="Ubuntu/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)
