如何在Ubuntu中找到串口?

2024-09-23 22:30:16 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在使用CANtact工具箱来发送CAN消息。以下代码通过高速发送标识符为0的消息来执行拒绝服务攻击

from canard import can

from canard.hw import cantact

dev = cantact.CantactDev("/dev/cu.usbmodem14511")

dev.start()

while True:

     print(dev.recv())

您需要正确设置串行端口(在本例中是/dev/cu.usbmodem14511)。在

如何找到笔记本电脑的串行端口?我使用的是Ubuntu 18.04 I Get the following output when is give ls/dev how to find my serial port from that?


Tags: 端口代码fromdevimport消息工具箱标识符