有一个USB /串行转换器连接两个盒子。
盒A有USB端,盒B有串口端。
在框A上:
屏幕/ dev / ttyUSB0 9600
在框B(我试图连接到框A):
/ etc / inittab中: ... T0:23:respawn:/ sbin / getty -L ttyS0 9600 vt100 ...
在框B上的terminal(通过屏幕)中看到我在框B上写入/ dev / ttyS0的内容,
但在框A上写入到dev / ttyUSB0的数据在框B上没有收到,例如,我无法input任何内容,但我看到login提示。
有任何想法吗? 谢谢
EDIT1:
我已经试过minicom和picocom与上面的结果相同。
这是框A上的lsusb的输出:
总线005设备002:ID 14dd:0002 总线005设备001:ID 0000:0000 总线004设备001:ID 0000:0000 总线002设备001:ID 0000:0000 总线003设备002:ID 067b:2303 Prolific Technology,Inc. PL2303串行端口 总线003设备001:ID 0000:0000 总线001设备001:ID 0000:0000
EDIT2:
框A上DMESG的输出:
USB3-2:新的全速USB设备使用uhci_hcd和地址2 usb 3-2:从1选项中selectconfiguration#1 usbcore:注册新的驱动程序usbserial 驱动程序/ usb / serial / usb-serial.c:USB串行支持注册为通用 usbcore:注册新的驱动程序usbserial_generic 驱动程序/ usb / serial / usb-serial.c:USB串行驱动程序核心 驱动程序/ usb / serial / usb-serial.c:USB串口支持注册为pl2303 pl2303 3-2:1.0:检测到pl2303转换器 usb 3-2:现在连接到ttyUSB0的pl2303转换器 usbcore:注册新的驱动程序pl2303 驱动程序/ USB /串行/ PL2303.c:Prolific PL2303 USB到串行适配器驱动程序
EDIT3:
方框B(我从此增加了波特率):
stty -a -F / dev / ttyS0 速度115200波特; 行0; 0列; line = 0; intr = ^ C; quit = ^ \; 擦除= ^?; 杀= ^ H; eof = ^ D; eol =; eol2 =; swtch =; start = ^ Q; stop = ^ S; susp = ^ Z; rprnt = ^ R; werase = ^ W; lnext = ^ V; flush = ^ O; min = 1; 时间= 0; -parenb -parodd cs8 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 nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt -echoctl -echoke
在框A上运行这样的参数的屏幕以相同的方式结束:
screen / dev / ttyUSB0 115200,-parenb,-parodd,cs8,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,NL0,CR0,TAB0 ,BS0,VT0,FF0,-isig,-icanon,-iexten,-echo,-echoe,-echok,-echonl,-noflsh,-xcase,-tostop,-echoprt,-echoctl,-echoke
你有没有尝试所有不同的选项在屏幕手册页周围的波特率?
<baud_rate> Usually 300, 1200, 9600 or 19200. This affects transmission as well as receive speed. cs8 or cs7 Specify the transmission of eight (or seven) bits per byte. ixon or -ixon Enables (or disables) software flow-control (CTRL-S/CTRL-Q) for sending data. ixoff or -ixoff Enables (or disables) software flow-control for receiving data. istrip or -istrip Clear (or keep) the eight bit in each received byte.
另外,也许在服务器上运行以下命令的输出可能会有所帮助?
sudo stty -a -F /dev/ttyS0
即使有错误的波特率,你仍然应该看到至less一些垃圾。 仔细检查你的连接是否良好。 这听起来像一个不好的连接 – 无论是在连接器之一,或者转换器上的干焊料?