# 这个tty.usbserial-A9KXFHCD就是我们com口的设备 $ ls /dev/* |grep usb /dev/tty.usbserial-A9KXFHCD
安装minicom来通过com连接交换机
1
➜ ~ brew install minicom
配置minicom
1 2 3 4 5 6 7 8 9 10 11 12 13
# 进入到配置 $ minicom -s +-----[configuration]------+ | Filenames and paths | | File transfer protocols | | Serial port setup | # 选择此项回车 | Modem and dialing | | Screen and keyboard | | Save setup as dfl | | Save setup as.. | | Exit | | Exit from Minicom | +--------------------------+
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
+-----------------------------------------------------------------------+ | A - Serial Device : /dev/tty.usbserial-A9KXFHCD | # 将此设备名称改为前面ls查看到的设备名称 | B - Lockfile Location : /opt/homebrew/Cellar/minicom/2.8/var | | C - Callin Program : | | D - Callout Program : | | E - Bps/Par/Bits : 9600 8N1 | # 将此项改为9600 8N1 | F - Hardware Flow Control : No | # 将此项改为No | G - Software Flow Control : No | | H - RS485 Enable : No | | I - RS485 Rts On Send : No | | J - RS485 Rts After Send : No | | K - RS485 Rx During Tx : No | | L - RS485 Terminate Bus : No | | M - RS485 Delay Rts Before: 0 | | N - RS485 Delay Rts After : 0 | | | | Change which setting? | +-----------------------------------------------------------------------+ # 回车
1 2 3 4 5 6 7 8 9 10 11
+-----[configuration]------+ | Filenames and paths | | File transfer protocols | | Serial port setup | | Modem and dialing | | Screen and keyboard | | Save setup as dfl | # 选择此项保存 | Save setup as.. | | Exit | | Exit from Minicom | +--------------------------+
1 2 3 4 5 6 7 8 9 10 11
+-----[configuration]------+ | Filenames and paths | | File transfer protocols | | Serial port setup | | Modem and dialing | | Screen and keyboard | | Save setup as dfl | | Save setup as.. | | Exit | # 选择此项进入到终端 | Exit from Minicom | +--------------------------+