Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using screen to communicate with arduino over serial port, i start screen like this:

screen /dev/ttyACM0 115200

then I try to send a command but every key I press on the keyboard get sent straight away, how to make it wait until I press Enter key before sending input to arduino?


Here's my serial device /dev/ttyACM0 settings:

$ sudo ssty -F /dev/ttyACM0 -a
speed 115200 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^H; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; discard = ^O; min = 100; time = 2;
-parenb -parodd -cmspar 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 -flusho -extproc

My .screenrc file is empty.

share|improve this question
    
-icanon indicates canonical (line-based) processing is disabled, so one thing to try would be using stty to flip that (the screen docs I have don't list a direct means to change that). – thrig Nov 10 '16 at 21:13
    
@thrig I enabled icanon with sudo stty -F /dev/ttyACM0 icanon but nothing changed. – razzak Nov 10 '16 at 21:20
    
Hmm, is there a different tty that screen is presenting to type in whose inputs then get shuffled off to ttyACM0? (Other options to consider include minicom or on OpenBSD cu is maintained.) – thrig Nov 10 '16 at 21:38

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.