当你自我炫耀时,便会受到谄媚者的青睐

首页 » 阅读时间 » 科技 » EdgeRouter 怎样连接到串行端口

EdgeRouter 怎样连接到串行端口

发布时间:2022年11月20日 修改时间:2024年05月14日 已有 63399 人围观

读者将学习如何使用 console 连接到 EdgeRouter 的 RJ45 串行端口。

所支持型号和串行端口默认设置

下表列出了配有 RJ45 串行端口的所有 EdgeRouter 型号

WechatIMG19.jpeg

默认串行端口设置如下

  • 波特率:115200
  • 数据位:8
  • 奇偶校验:无
  • 停止位:1
  • 流量控制:无

**用户提示: ** * ER-10X 需要设置波特率为 57600。


连接串行端口

topology.png

使用 USB-to-Serial 适配器连接 EdgeRouter 的串行端口

用户提示: 为了连接串行端口,我们需要使用以下配件/程序:* RJ45 转 DB9 串行端口线缆(反转线)

  • USB 转 DB9 适配器
  • 终端仿真程序,如 PuTTY 或 macOS/Linux 终端
  1. 打开终端仿真器,设置串行 COM 线和波特率/速率。---
Windows 客户端

在“PuTTY”窗口中输入如下信息。

putty.png


macOS 客户端

打开终端应用程序并找到串行接口 ID。

ls -ltr /dev/*usb*

串行界面会显示 tty。输出结果如下:

ls -ltr /dev/*usb*
crw-rw-rw-  1 root  wheel   21,   3 Feb  8 15:48 /dev/cu.usbserial-AI038TPF
crw-rw-rw-  1 root  wheel   21,   2 Feb  9 08:56 /dev/tty.usbserial-AI038TPF

使用 screen 命令,通过粘贴串行端口的路径来连接到串行界面。

screen /dev/tty.usbserial-AI038TPF 115200

用户提示: 当使用 ls -ltr /dev/*usb* 命令时,用给到的值替换 /dev/tty.usbserial-AI038TPF

  1. 连接到 EdgeRouter 并使用您的凭据登录。
Welcome to EdgeOS ubnt ttyS0

By logging in, accessing, or using the Ubiquiti product, you
acknowledge that you have read and understood the Ubiquiti
License Agreement (available in the Web UI at, by default,
http://192.168.1.1) and agree to be bound by its terms.

Login: <username>
Password: <password>

用户提示:默认的用户名和密码组合为 “ubnt/ubnt”
  1. 点击 ? 获取所有可用命令的列表