如何在PuTTY串行通信中仅在按回车时发送字符?
我正在尝试使用 PuTTY 通过计算机的串行线路进行通信。我已经配置了正确的串行线路、波特率、数据位数、停止位、奇偶校验和流量控制,并建立了连接。当我单击“确定”打开连接时,我会看到黑屏,并且每次按键都会发送,但不会显示在屏幕上(窗口保持黑色)。如何配置 PuTTY,使其仅在我按 Enter 键后发送我的命令或操作码?
我在大学时使用 PuTTY 进行 Telnet / SSH,它总是显示我的命令,并且只有在我按下 Enter 键后才输入它们,所以我有点困惑。
I am trying to use PuTTY to communicate over my computer's serial line. I have configured the correct serial line, baud rate, number of data bits, stop bits, parity, and flow control, and established the connection. When I click OK to open the connection, I am shown a black screen and each of my key presses are sent without being shown on the screen (the window remains black). How do I configure PuTTY so that it only sends my commands or opcodes after I press enter?
I have used PuTTY while at college for Telnet / SSH and it always showed my commands and input them only after I pressed the enter key, so I am a bit confused.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要的设置是左侧“终端”类别下的“本地回显”和“行编辑”。
要让字符在输入时显示在屏幕上,请将“本地回显”设置为“强制启用”。
要让终端在按 Enter 之前不发送命令,请将“本地行编辑”设置为“强制启用”。
说明:
来自 PuTTY 用户手册(通过单击 PuTTY 中的“帮助”按钮找到):
当为这些选项启用“自动”时,Putty 有时会做出错误的选择,因为它会尝试检测连接配置。应用于串行线,这有点棘手。
The settings you need are "Local echo" and "Line editing" under the "Terminal" category on the left.
To get the characters to display on the screen as you enter them, set "Local echo" to "Force on".
To get the terminal to not send the command until you press Enter, set "Local line editing" to "Force on".
Explanation:
From the PuTTY User Manual (Found by clicking on the "Help" button in PuTTY):
Putty sometimes makes wrong choices when "Auto" is enabled for these options because it tries to detect the connection configuration. Applied to serial line, this is a bit trickier to do.