Sending “ENTER” key through serial port

后端 未结 8 1912
独厮守ぢ
独厮守ぢ 2020-12-17 00:11

Hi I want to send some command to my device which is connected via serial port. How to send it?

For example i found this on google search but for me it\'s useless.

相关标签:
8条回答
  • 2020-12-17 01:02

    What the previous answers have told you is how to send a NEWLINE character - this is not the same as "the enter key". If what you want to do is to actually indicate to the remote machine that the "enter key" on the keyboard has been pressed, that is entirely different, and may not be possible, depending on your operating system and hardware.

    0 讨论(0)
  • 2020-12-17 01:04

    It depends on what is ENTER for your device. In Windows it is CRLF (13 and then 10), Linux is LF (only 10.) It's just a matter of what your device expects, because it can't see ENTER, just "byte 10, byte 13, byte whatever..."

    0 讨论(0)
提交回复
热议问题