我已将CP2108设备连接到我的硬件,它具有4个接口:/ dev / ttyUSB0,/ dev / ttyUSB1,/ dev / ttyUSB2,/ dev / ttyUSB3
我将/ dev / ttyUSB0连接到/ dev / ttyUSB1
我们还使用stty命令将波特率正确设置为9600
我正在从echo "hello" > /dev/ttyUSB0
发送问候
我在/ dev / ttyUSB1和/ dev / ttyUSB0中收到“你好”
cat /dev/ttyUSB0
cat /dev/ttyUSB1
查看驱动程序日志,在USB1上执行read_callback后,它还会调用write_callback,为什么会发生这种情况,因为预期的行为是仅在USB1上接收
感谢您的耐心和时间
更新:
stty -a -F /dev/ttyUSB1
speed 600 baud;stty: /dev/ttyUSB1
line = 216;
intr = f; quit = ^B; erase = M-'; kill = 8; eof = <undef>; eol = <undef>; eol2 = <undef>; swtch = ^?; start = s;
stop = @; susp = <undef>; rprnt = <undef>; werase = <undef>; lnext = ^C; flush = <undef>; min = 0; time = 0;
-parenb parodd cs5 -hupcl -cstopb cread -clocal crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip inlcr -igncr icrnl -ixon -ixoff iuclc -ixany imaxbel -iutf8
-opost olcuc ocrnl onlcr onocr onlret ofill ofdel nl1 cr3 tab3 bs1 vt1 ff0
-isig icanon -iexten echo echoe echok echonl noflsh xcase tostop echoprt echoctl echoke