MacOS 通过 FTDI 连接串口控制台
NAS 从 x86 迁移到 arm,这设备没有显示接口,只提供了通过 FTDI 协议支持的 USB 串口。这里记录 MacOS 连接设备串口控制台的方法。
安装驱动
可以到 FTDI 官网下载驱动,也可以直接 brew 安装:
$ brew cask install homebrew/cask-drivers/ftdi-vcp-driver
命令行输出:
If you don't want to reboot, you can load the driver using the following
command:
sudo /sbin/kextload -b com.FTDI.driver.FTDIUSBSerialDriver
Once you've rebooted or loaded the driver, you can connect your FTDI
based cable to a USB port and it will show up in /dev, usually like this:
/dev/tty.usbserial-XXXXXXXX
where XXXXXXXX is a random ID, based on the serial number of your FTDI
based cable.
NOTE: If your FTDI based cable was already connected before you installed
the driver, you'll need to unplug the cable from the USB port and
reconnect it for it to show up in /dev.
To install and/or use ftdi-vcp-driver you may need to enable its kernel extension in:
System Preferences → Security & Privacy → General
For more information refer to vendor documentation or this Apple Technical Note:
https://developer.apple.com/library/content/technotes/tn2459/_index.html
You must reboot for the installation of ftdi-vcp-driver to take effect.
根据命令行输出可以知道,让驱动生效需要重启系统,如果不想重启可以手动执行命令:
$ sudo /sbin/kextload -b com.FTDI.driver.FTDIUSBSerialDriver
安装 picocom
驱动安装好以后,想与设备的串口通信,还需要一个客户端。这里使用 picocom
$ brew install picocom
Ubuntu/Debian 可通过 apt 命令安装 picocom
连接设备
设备和 Macbook 通过 USB 连接,查看设备名:
$ ls /dev | grep usb
cu.usbserial-DJ00K181
tty.usbserial-DJ00K181
连接设备串口控制台:
$ picocom -b 115200 /dev/tty.usbserial-DJ00K181
picocom v3.1
port is : /dev/tty.usbserial-DJ00K181
flowcontrol : none
baudrate is : 115200
parity is : none
databits are : 8
stopbits are : 1
escape is : C-a
local echo is : no
noinit is : no
noreset is : no
hangup is : no
nolock is : no
send_cmd is : sz -vv
receive_cmd is : rz -vv -E
imap is :
omap is :
emap is : crcrlf,delbs,
logfile is : none
initstring : none
exit_after is : not set
exit is : no
Type [C-a] [C-h] to see available commands
Terminal ready
> 确认信息无误后按回车即可
openmediavault 4.1.23-1 (Arrakis) hinas ttyS0
Copyright (C) 2009-2019 by Volker Theile. All rights reserved.
To manage the system visit the openmediavault web control panel:
eth0: 192.168.1.115
By default the web control panel administrator account has the
username 'admin' and password 'openmediavault'.
It is recommended that you change the password for this account
within the web control panel or using the 'omv-firstaid' CLI
command.
For more information regarding this appliance, please visit the
web site: https://www.openmediavault.org
hinas login:
Linux 下,设备名格式为 /dev/ttyUSBx
会员讨论区