GNU Screen: How to send text over serial only after pressing enter?
by displace from LinuxQuestions.org on (#6Q4MZ)
Hello, I have a question about sending commands over a USB->UART serial line.
I'm using the GNU screen program by invoking it like: "screen /dev/ttyUSB0 9600". This brings up a terminal that allows me to send characters down the TX line of my USB-to-serial converter and receive them via the RX line, which are then displayed in the terminal. Pretty standard stuff, but I have a small issue with this. The problem is that the characters seem to be sent immediately as I type them on the keyboard. I would like to somehow be able to delay this (to type the command in its entirety) and *then* send it down the line by pressing the enter key. Is this possible? I saw some Windows terminals have this function.
Backstory: I have a small device with AT firmware on it. I have to send some AT commands to it over the serial, but I'm unable to do so because the device doesn't differentiate between the commands and treats all of them as the AT test command. For example, consider the two following commands: "AT+" and "AT+INFO". The problem is that whenever I try to type "AT+(anything)", the modem device will automatically assume that I typed the "AT+" test command and print out an "OK" while ignoring the rest of input. As a workaround I currently have to type the commands in a notepad, and then copy-pasta them to the terminal for it to work.
Thanks in advance.
I'm using the GNU screen program by invoking it like: "screen /dev/ttyUSB0 9600". This brings up a terminal that allows me to send characters down the TX line of my USB-to-serial converter and receive them via the RX line, which are then displayed in the terminal. Pretty standard stuff, but I have a small issue with this. The problem is that the characters seem to be sent immediately as I type them on the keyboard. I would like to somehow be able to delay this (to type the command in its entirety) and *then* send it down the line by pressing the enter key. Is this possible? I saw some Windows terminals have this function.
Backstory: I have a small device with AT firmware on it. I have to send some AT commands to it over the serial, but I'm unable to do so because the device doesn't differentiate between the commands and treats all of them as the AT test command. For example, consider the two following commands: "AT+" and "AT+INFO". The problem is that whenever I try to type "AT+(anything)", the modem device will automatically assume that I typed the "AT+" test command and print out an "OK" while ignoring the rest of input. As a workaround I currently have to type the commands in a notepad, and then copy-pasta them to the terminal for it to work.
Thanks in advance.