console - ubuntu 16.04 force serial terminal speed - Ask Ubuntu


i'm not able keep fixed speed on serial terminal /dev/ttys0. use:

stty -f /dev/ttys0 115200 root@ubuntu:/# stty -f /dev/ttys0 -a speed 115200 baud; rows 24; columns 80; line = 0; intr = ^c; quit = ^\; erase = ^?; kill = ^u; eof = ^d; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^q; stop = ^s; susp = ^z; rprnt = ^r; werase = ^w; lnext = <undef>; discard = ^o; min = 1; time = 0; -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 

apparently, changed. however, when start sending few characters through serial port (i 100% positive use 115200, verified connecting windows com port), ubuntu terminal changes automatically 9600 again!

stty -f /dev/ttys0 -a speed 9600 baud; rows 24; columns 80; line = 0; intr = ^c; quit = ^\; erase = ^?; kill = ^u; eof = ^d; eol = <undef>; eol2 = <undef>; swtch = <undef>; start = ^q; stop = ^s; susp = ^z; rprnt = ^r; werase = ^w; lnext = <undef>; discard = ^o; min = 1; time = 0; -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 

how force terminal use fixed 115200?
apparently either it's changing 9600 unknown reason, or (tries to) automatically detect serial speed?

more information. grub (configured via /etc/default/grub) outputting correctly @ 115200

error: no video mode activated.                      gnu grub  version 2.02~beta2-36ubuntu3.2   +----------------------------------------------------------------------------+  |*ubuntu                                                                     |  | advanced options ubuntu                                                |  | memory test (memtest86+)                                                   |  | memory test (memtest86+, serial console 115200)                            |  |                                                                            |  |                                                                            |  |                                                                            |  |                                                                            |  |                                                                            |  |                                                                            |  |                                                                            |  |                                                                            |  +----------------------------------------------------------------------------+        use ^ , v keys select entry highlighted.       press enter boot selected os, `e' edit commands       before booting or `c' command-line.    highlighted entry executed automatically in 0s. 

but after grub, garbage, ubuntu 16.04 sending @ 9600 again.

more updates: according this, can bug of agetty
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1571500

systemctl status serial-getty@ttys0.service ● serial-getty@ttys0.service - serial getty on ttys0    loaded: loaded (/lib/systemd/system/serial-getty@.service; disabled; vendor p    active: active (running) since du 2016-11-13 17:58:28 eet; 1s ago      docs: man:agetty(8)            man:systemd-getty-generator(8)            http://0pointer.de/blog/projects/serial-console.html  main pid: 12526 (agetty)    cgroup: /system.slice/system-serial\x2dgetty.slice/serial-getty@ttys0.service            └─12526 /sbin/agetty --keep-baud 115200 38400 9600 ttys0 vt220 

when issue manually, without --keep-baud, works

/sbin/agetty 115200 ttys0 vt220 

so question how disable --keep-baud option forever. cannot find initialization of agetty.

thanks in advance!


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User